Develop\r
=======\r
\r
+\r
+Version 5.3.2\r
+=============\r
+\r
+Change\r
+------\r
+The behaviour of an UndoManager used by an AudioProcessorValueTreeState has\r
+been improved.\r
+\r
+Possible Issues\r
+---------------\r
+If your plug-in contains an UndoManager used by an AudioProcessorValueTreeState\r
+and relies upon the old behaviour of the UndoManager then it is possible that\r
+the new behaviour is no longer appropriate for your use case.\r
+\r
+Workaround\r
+----------\r
+Use an external UndoManager to reproduce the old behaviour manually.\r
+\r
+Rationale\r
+---------\r
+This change fixes a few bugs in the behaviour of an UndoManager used by an\r
+AudioProcessorValueTreeState.\r
+\r
+\r
+Change\r
+------\r
+JUCE no longer supports OS X deployment targets earlier than 10.7.\r
+\r
+Possible Issues\r
+---------------\r
+If you were previously targeting OS X 10.5 or 10.6 you will no longer be able\r
+to build JUCE-based products compatible with those platforms.\r
+\r
+Workaround\r
+----------\r
+None. With the appropriate JUCE licence you may be able to backport new JUCE\r
+features, but there will be no official support for this.\r
+\r
+Rationale\r
+---------\r
+Increasing the minimum supported OS X version allows the JUCE codebase to make\r
+use of the more modern C++ features found in the 10.7 standard library, which\r
+in turn will increase thread and memory safety.\r
+\r
+\r
Version 5.3.0\r
=============\r
\r
Change\r
------\r
-The JUCE examples have been cleaned up, modernised and converted into \r
-PIPs (Projucer Instant Projects). The JUCE Demo has been removed and replaced by the \r
-DemoRunner application and larger projects such as the Audio Plugin Host and the \r
-Network Graphics Demo have been moved into the extras directory.\r
+The JUCE examples have been cleaned up, modernised and converted into PIPs\r
+(Projucer Instant Projects). The JUCE Demo has been removed and replaced by the\r
+DemoRunner application and larger projects such as the Audio Plugin Host and\r
+the Network Graphics Demo have been moved into the extras directory.\r
\r
Possible Issues\r
---------------\r
-1. Due to the large number of changes that have occured in the JUCE Git repository, \r
-pulling this version may result in a messy folder structure with empty directories \r
-that have been removed.\r
+1. Due to the large number of changes that have occured in the JUCE Git\r
+ repository, pulling this version may result in a messy folder structure with\r
+ empty directories that have been removed.\r
2. The JUCE Demo project is no longer in the JUCE repository.\r
-3. The Audio Plugin Host project has moved from the examples directory to the extras\r
-directory.\r
+3. The Audio Plugin Host project has moved from the examples directory to the\r
+ extras directory.\r
\r
Workaround\r
----------\r
-1. Run a Git clean command (git clean -xdf) in your JUCE directory to remove all untracked \r
-files, directories and build products.\r
-2. The new DemoRunner application, located in extras/DemoRunner, can be used to preview\r
-all the JUCE examples and see the code side-by-side.\r
-3. Change any file paths that depended on the plugin host project being located in the examples\r
-directory to use the extras directory instead.\r
+1. Run a Git clean command (git clean -xdf) in your JUCE directory to remove\r
+ all untracked files, directories and build products.\r
+2. The new DemoRunner application, located in extras/DemoRunner, can be used to\r
+ preview all the JUCE examples and see the code side-by-side.\r
+3. Change any file paths that depended on the plugin host project being located\r
+ in the examples directory to use the extras directory instead.\r
\r
Rationale\r
---------\r
-The JUCE examples had inconsistent naming, coding styles and the projects and build products\r
-took up a large amount of space in the repository. Replacing them with PIPs reduces the file size\r
-and allows us to categorise the examples better, as well as cleaning up the code.\r
+The JUCE examples had inconsistent naming, coding styles and the projects and\r
+build products took up a large amount of space in the repository. Replacing\r
+them with PIPs reduces the file size and allows us to categorise the examples\r
+better, as well as cleaning up the code.\r
\r
\r
Change\r
\r
Possible Issues\r
---------------\r
-Any code using InAppPurchases needs to be updated to retrieve a singleton pointer\r
-to InAppPurchases.\r
+Any code using InAppPurchases needs to be updated to retrieve a singleton\r
+pointer to InAppPurchases.\r
\r
Workaround\r
----------\r
\r
This file just lists the more notable headline features. For more detailed info\r
about minor changes and bugfixes, please see the git log!\r
-
+\r
+Version 5.3.2\r
+ - Removed the OSX 10.5 and 10.6 deployment target options from the Projucer and enabled more C++11 features across all platforms\r
+ - Replaced all usage of ScopedPointer with std::unique_ptr\r
+ - Added camera support for iOS and Android\r
+ - Fixed some issues using an UndoManager with an AudioProcessorValueTreeState\r
+ - Added MIDI input to IAA plug-ins\r
+ - Made multiple calls to MidiInput::openDevice share the same underlying win32 MIDI handle\r
+ - Added a config flag to juce_audio_processors for enabling LADSPA plugin hosting and enabled it in the AudioPluginHost\r
+ - Added a "plug-in can do" callback to the VSTCallbackHandler interface\r
+ - Fixed various undefined behavior in SIMDRegister\r
+ - Added the methods AudioBlock::copyTo/AudioBlock::copyFrom which facilitate copying to/from an AudioBuffer\r
+ - Added a lambda callback to OpenGLGraphicsContextCustomShader to allow custom set-up when the shader is activated\r
+ - Fixed a bug causing an unintentional menu item highlight disco party when using a popup menu in a plug-in's UI\r
+ - Marked as deprecated: String::empty, var::null, File::nonexistent, ValueTree::invalid and other problematic statically-initialised null values\r
+\r
Version 5.3.1\r
- Add Android and iOS support to AudioPluginHost\r
- Added support for Bela in the form of an AudioIODeviceType\r
- Added options for setting plugin categories and characteristics with MultiChoicePropertyComponent in the Projucer\r
- Fixed a Projucer bug where the OSX base SDK version was not being set\r
- Added a command-line option to use LF as linefeeds rather than CRLF in the Projucer cleanup tools\r
- - Multiple documentation updates
+ - Multiple documentation updates\r
\r
Version 5.3.0\r
- Added support for Android OBOE (developer preview)\r
return;\r
}\r
\r
- fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif");\r
+ fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"));\r
\r
fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles,\r
[safeThis] (const FileChooser& fc) mutable\r
ToggleButton loopButton { "Loop File" };\r
\r
AudioFileReaderComponent& audioFileReader;\r
- ScopedPointer<FileChooser> fileChooser;\r
+ std::unique_ptr<FileChooser> fileChooser;\r
};\r
\r
//==============================================================================\r
uint32 currentBlockSize = 512;\r
uint32 currentNumChannels = 2;\r
\r
- ScopedPointer<AudioFormatReader> reader;\r
- ScopedPointer<AudioFormatReaderSource> readerSource;\r
- ScopedPointer<AudioTransportSource> transportSource;\r
- ScopedPointer<DSPDemo<DemoType>> currentDemo;\r
+ std::unique_ptr<AudioFormatReader> reader;\r
+ std::unique_ptr<AudioFormatReaderSource> readerSource;\r
+ std::unique_ptr<AudioTransportSource> transportSource;\r
+ std::unique_ptr<DSPDemo<DemoType>> currentDemo;\r
\r
AudioSourcePlayer audioSourcePlayer;\r
\r
\r
AudioBuffer<float> fileReadBuffer;\r
\r
- ScopedPointer<DemoParametersComponent> parametersComponent;\r
+ std::unique_ptr<DemoParametersComponent> parametersComponent;\r
};\r
MemoryOutputStream mo;\r
\r
auto success = Base64::convertFromBase64 (mo, JUCE_STRINGIFY (PIP_JUCE_EXAMPLES_DIRECTORY));\r
+ ignoreUnused (success);\r
jassert (success);\r
\r
return mo.toString();\r
#if JUCE_IOS\r
auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)\r
.getParentDirectory().getChildFile ("Assets");\r
+ #elif JUCE_MAC\r
+ auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)\r
+ .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile ("Assets");\r
+\r
+ if (! assetsDir.exists())\r
+ assetsDir = getExamplesDirectory().getChildFile ("Assets");\r
#else\r
auto assetsDir = getExamplesDirectory().getChildFile ("Assets");\r
#endif\r
\r
if (img.isNull())\r
{\r
- ScopedPointer<InputStream> juceIconStream (createAssetInputStream (assetName));\r
+ std::unique_ptr<InputStream> juceIconStream (createAssetInputStream (assetName));\r
\r
if (juceIconStream == nullptr)\r
return {};\r
\r
inline String loadEntireAssetIntoString (const char* assetName)\r
{\r
- ScopedPointer<InputStream> input (createAssetInputStream (assetName));\r
+ std::unique_ptr<InputStream> input (createAssetInputStream (assetName));\r
\r
if (input == nullptr)\r
return {};\r
if (faceGroup.size() == 0)\r
return nullptr;\r
\r
- ScopedPointer<Shape> shape (new Shape());\r
+ std::unique_ptr<Shape> shape (new Shape());\r
shape->name = name;\r
shape->material = material;\r
\r
AudioDeviceManager& audioDeviceManager { getSharedAudioDeviceManager (1, 2) };\r
#endif\r
\r
- ScopedPointer<LatencyTester> latencyTester;\r
- ScopedPointer<LiveScrollingAudioDisplay> liveAudioScroller;\r
+ std::unique_ptr<LatencyTester> latencyTester;\r
+ std::unique_ptr<LiveScrollingAudioDisplay> liveAudioScroller;\r
\r
TextButton startTestButton { "Test Latency" };\r
TextEditor resultsBox;\r
TimeSliceThread thread { "audio file preview" };\r
\r
#if (JUCE_ANDROID || JUCE_IOS)\r
- ScopedPointer<FileChooser> fileChooser;\r
+ std::unique_ptr<FileChooser> fileChooser;\r
TextButton chooseFileButton {"Choose Audio File...", "Choose an audio file for playback"};\r
#else\r
DirectoryContentsList directoryList {nullptr, thread};\r
URL currentAudioFile;\r
AudioSourcePlayer audioSourcePlayer;\r
AudioTransportSource transportSource;\r
- ScopedPointer<AudioFormatReaderSource> currentAudioFileSource;\r
+ std::unique_ptr<AudioFormatReaderSource> currentAudioFileSource;\r
\r
- ScopedPointer<DemoThumbnailComp> thumbnail;\r
+ std::unique_ptr<DemoThumbnailComp> thumbnail;\r
Label zoomLabel { {}, "zoom:" },\r
explanation { {}, "Select an audio file in the treeview above, and this page will display its waveform, and let you play it.." };\r
Slider zoomSlider { Slider::LinearHorizontal, Slider::NoTextBox };\r
#if (JUCE_ANDROID || JUCE_IOS)\r
void buttonClicked (Button* btn) override\r
{\r
- if (btn == &chooseFileButton && fileChooser == nullptr)\r
+ if (btn == &chooseFileButton && fileChooser.get() == nullptr)\r
{\r
SafePointer<AudioPlaybackDemo> safeThis (this);\r
\r
\r
if (FileChooser::isPlatformDialogAvailable())\r
{\r
- fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif");\r
+ fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"));\r
\r
fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles,\r
[safeThis] (const FileChooser& fc) mutable\r
{\r
// Create an OutputStream to write to our destination file...\r
file.deleteFile();\r
- ScopedPointer<FileOutputStream> fileStream (file.createOutputStream());\r
+ std::unique_ptr<FileOutputStream> fileStream (file.createOutputStream());\r
\r
if (fileStream.get() != nullptr)\r
{\r
\r
bool isRecording() const\r
{\r
- return activeWriter != nullptr;\r
+ return activeWriter.load() != nullptr;\r
}\r
\r
//==============================================================================\r
{\r
const ScopedLock sl (writerLock);\r
\r
- if (activeWriter != nullptr && numInputChannels >= thumbnail.getNumChannels())\r
+ if (activeWriter.load() != nullptr && numInputChannels >= thumbnail.getNumChannels())\r
{\r
- activeWriter->write (inputChannelData, numSamples);\r
+ activeWriter.load()->write (inputChannelData, numSamples);\r
\r
// Create an AudioBuffer to wrap our incoming data, note that this does no allocations or copies, it simply references our input data\r
AudioBuffer<float> buffer (const_cast<float**> (inputChannelData), thumbnail.getNumChannels(), numSamples);\r
\r
private:\r
AudioThumbnail& thumbnail;\r
- TimeSliceThread backgroundThread { "Audio Recorder Thread" }; // the thread that will write our audio data to disk\r
- ScopedPointer<AudioFormatWriter::ThreadedWriter> threadedWriter; // the FIFO used to buffer the incoming data\r
- double sampleRate = 0.0;\r
+ TimeSliceThread backgroundThread { "Audio Recorder Thread" }; // the thread that will write our audio data to disk\r
+ std::unique_ptr<AudioFormatWriter::ThreadedWriter> threadedWriter; // the FIFO used to buffer the incoming data\r
+ double sampleRate = 0.0;\r
int64 nextSampleNum = 0;\r
\r
CriticalSection writerLock;\r
- AudioFormatWriter::ThreadedWriter* volatile activeWriter = nullptr;\r
+ std::atomic<AudioFormatWriter::ThreadedWriter*> activeWriter { nullptr };\r
};\r
\r
//==============================================================================\r
AudioDeviceManager& audioDeviceManager { getSharedAudioDeviceManager() };\r
#endif\r
\r
- ScopedPointer<AudioDeviceSelectorComponent> audioSetupComp;\r
+ std::unique_ptr<AudioDeviceSelectorComponent> audioSetupComp;\r
TextEditor diagnosticsBox;\r
\r
void changeListenerCallback (ChangeBroadcaster*) override\r
{\r
WavAudioFormat wavFormat;\r
\r
- ScopedPointer<AudioFormatReader> audioReader (wavFormat.createReaderFor (createAssetInputStream ("cello.wav"), true));\r
+ std::unique_ptr<AudioFormatReader> audioReader (wavFormat.createReaderFor (createAssetInputStream ("cello.wav"), true));\r
\r
BigInteger allNotes;\r
allNotes.setRange (0, 128, true);\r
MidiDeviceListEntry (const String& deviceName) : name (deviceName) {}\r
\r
String name;\r
- ScopedPointer<MidiInput> inDevice;\r
- ScopedPointer<MidiOutput> outDevice;\r
+ std::unique_ptr<MidiInput> inDevice;\r
+ std::unique_ptr<MidiOutput> outDevice;\r
\r
- typedef ReferenceCountedObjectPtr<MidiDeviceListEntry> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<MidiDeviceListEntry>;\r
};\r
\r
//==============================================================================\r
TextEditor midiMonitor { "MIDI Monitor" };\r
TextButton pairButton { "MIDI Bluetooth devices..." };\r
\r
- ScopedPointer<MidiDeviceListBox> midiInputSelector;\r
- ScopedPointer<MidiDeviceListBox> midiOutputSelector;\r
+ std::unique_ptr<MidiDeviceListBox> midiInputSelector;\r
+ std::unique_ptr<MidiDeviceListBox> midiOutputSelector;\r
\r
ReferenceCountedArray<MidiDeviceListEntry> midiInputs;\r
ReferenceCountedArray<MidiDeviceListEntry> midiOutputs;\r
\r
#if JUCE_IOS\r
connectButton.setButtonText ("Connect");\r
- connectButton.onClick = [this] { BluetoothMidiDevicePairingDialogue::open(); };\r
+ connectButton.onClick = [] { BluetoothMidiDevicePairingDialogue::open(); };\r
connectButton.setAlwaysOnTop (true);\r
addAndMakeVisible (connectButton);\r
#endif\r
\r
#if JUCE_IOS\r
connectButton.setButtonText ("Connect");\r
- connectButton.onClick = [this] { BluetoothMidiDevicePairingDialogue::open(); };\r
+ connectButton.onClick = [] { BluetoothMidiDevicePairingDialogue::open(); };\r
connectButton.setAlwaysOnTop (true);\r
addAndMakeVisible (connectButton);\r
#endif\r
\r
#if JUCE_IOS\r
connectButton.setButtonText ("Connect");\r
- connectButton.onClick = [this] { BluetoothMidiDevicePairingDialogue::open(); };\r
+ connectButton.onClick = [] { BluetoothMidiDevicePairingDialogue::open(); };\r
addAndMakeVisible (connectButton);\r
#endif\r
\r
auto selectedType = cabinetTypeParameter->getCurrentSelectedID();\r
auto assetName = (selectedType == 2 ? "guitar_amp.wav" : "cassette_recorder.wav");\r
\r
- ScopedPointer<InputStream> assetInputStream (createAssetInputStream (assetName));\r
+ std::unique_ptr<InputStream> assetInputStream (createAssetInputStream (assetName));\r
if (assetInputStream != nullptr)\r
{\r
currentCabinetData.reset();\r
\r
//==============================================================================\r
IIR::Coefficients<float>::Ptr iirCoefficients;\r
- ScopedPointer<IIR::Filter<SIMDRegister<float>>> iir;\r
+ std::unique_ptr<IIR::Filter<SIMDRegister<float>>> iir;\r
\r
AudioBlock<SIMDRegister<float>> interleaved;\r
AudioBlock<float> zero;\r
add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c")\r
set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression")\r
\r
-add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_roli_juce_demorunner_DemoRunner" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/roli/juce/demorunner/DemoRunner\"" "-DJUCE_ANDROID_SHARING_CONTENT_PROVIDER_CLASSNAME=com_roli_juce_demorunner_SharingContentProvider" "-DJUCE_ANDROID_SHARING_CONTENT_PROVIDER_CLASSPATH=\"com/roli/juce/demorunner/SharingContentProvider\"" "-DJUCE_PUSH_NOTIFICATIONS=1" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=5.3.1" "-DJUCE_APP_VERSION_HEX=0x50301")\r
+add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_juce_demorunner_DemoRunner" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/juce/demorunner/DemoRunner\"" "-DJUCE_ANDROID_SHARING_CONTENT_PROVIDER_CLASSNAME=com_juce_demorunner_SharingContentProvider" "-DJUCE_ANDROID_SHARING_CONTENT_PROVIDER_CLASSPATH=\"com/juce/demorunner/SharingContentProvider\"" "-DJUCE_PUSH_NOTIFICATIONS=1" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=5.3.2" "-DJUCE_APP_VERSION_HEX=0x50302")\r
\r
include_directories( AFTER\r
"../../../JuceLibraryCode"\r
"../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"\r
"../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h"\r
"../../../../../modules/juce_core/containers/juce_SortedSet.h"\r
+ "../../../../../modules/juce_core/containers/juce_SparseSet.cpp"\r
"../../../../../modules/juce_core/containers/juce_SparseSet.h"\r
"../../../../../modules/juce_core/containers/juce_Variant.cpp"\r
"../../../../../modules/juce_core/containers/juce_Variant.h"\r
"../../../../../modules/juce_data_structures/juce_data_structures.h"\r
"../../../../../modules/juce_dsp/containers/juce_AudioBlock.h"\r
"../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h"\r
+ "../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h"\r
"../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp"\r
"../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.cpp"\r
"../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h"\r
"../../../../../modules/juce_video/capture/juce_CameraDevice.cpp"\r
"../../../../../modules/juce_video/capture/juce_CameraDevice.h"\r
"../../../../../modules/juce_video/native/juce_android_CameraDevice.h"\r
+ "../../../../../modules/juce_video/native/juce_ios_CameraDevice.h"\r
"../../../../../modules/juce_video/native/juce_mac_CameraDevice.h"\r
"../../../../../modules/juce_video/native/juce_mac_Video.h"\r
"../../../../../modules/juce_video/native/juce_win32_CameraDevice.h"\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_data_structures/juce_data_structures.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_AudioBlock.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/native/juce_android_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_video/native/juce_ios_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_Video.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/native/juce_win32_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
}\r
\r
defaultConfig {\r
- applicationId "com.roli.juce.demorunner"\r
+ applicationId "com.juce.demorunner"\r
minSdkVersion 23\r
targetSdkVersion 23\r
externalNativeBuild {\r
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="5.3.1"
- package="com.roli.juce.demorunner">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="5.3.2"
+ package="com.juce.demorunner">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/>
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
+ <uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-feature android:glEsVersion="0x00030000" android:required="true"/>
<application android:label="@string/app_name" android:icon="@drawable/icon" android:hardwareAccelerated="false">
<activity android:name="DemoRunner" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation|screenSize"
- android:screenOrientation="userLandscape" android:launchMode="singleTask" android:hardwareAccelerated="true">
+ android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
- <provider android:name="com.roli.juce.demorunner.SharingContentProvider" android:authorities="com.roli.juce.demorunner.sharingcontentprovider"
+ <provider android:name="com.juce.demorunner.SharingContentProvider" android:authorities="com.juce.demorunner.sharingcontentprovider"
android:grantUriPermissions="true" android:exported="false"/>
</application>
</manifest>
return;\r
}\r
\r
- fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif");\r
+ fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"));\r
\r
fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles,\r
[safeThis] (const FileChooser& fc) mutable\r
ToggleButton loopButton { "Loop File" };\r
\r
AudioFileReaderComponent& audioFileReader;\r
- ScopedPointer<FileChooser> fileChooser;\r
+ std::unique_ptr<FileChooser> fileChooser;\r
};\r
\r
//==============================================================================\r
uint32 currentBlockSize = 512;\r
uint32 currentNumChannels = 2;\r
\r
- ScopedPointer<AudioFormatReader> reader;\r
- ScopedPointer<AudioFormatReaderSource> readerSource;\r
- ScopedPointer<AudioTransportSource> transportSource;\r
- ScopedPointer<DSPDemo<DemoType>> currentDemo;\r
+ std::unique_ptr<AudioFormatReader> reader;\r
+ std::unique_ptr<AudioFormatReaderSource> readerSource;\r
+ std::unique_ptr<AudioTransportSource> transportSource;\r
+ std::unique_ptr<DSPDemo<DemoType>> currentDemo;\r
\r
AudioSourcePlayer audioSourcePlayer;\r
\r
\r
AudioBuffer<float> fileReadBuffer;\r
\r
- ScopedPointer<DemoParametersComponent> parametersComponent;\r
+ std::unique_ptr<DemoParametersComponent> parametersComponent;\r
};\r
MemoryOutputStream mo;\r
\r
auto success = Base64::convertFromBase64 (mo, JUCE_STRINGIFY (PIP_JUCE_EXAMPLES_DIRECTORY));\r
+ ignoreUnused (success);\r
jassert (success);\r
\r
return mo.toString();\r
#if JUCE_IOS\r
auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)\r
.getParentDirectory().getChildFile ("Assets");\r
+ #elif JUCE_MAC\r
+ auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)\r
+ .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile ("Assets");\r
+\r
+ if (! assetsDir.exists())\r
+ assetsDir = getExamplesDirectory().getChildFile ("Assets");\r
#else\r
auto assetsDir = getExamplesDirectory().getChildFile ("Assets");\r
#endif\r
\r
if (img.isNull())\r
{\r
- ScopedPointer<InputStream> juceIconStream (createAssetInputStream (assetName));\r
+ std::unique_ptr<InputStream> juceIconStream (createAssetInputStream (assetName));\r
\r
if (juceIconStream == nullptr)\r
return {};\r
\r
inline String loadEntireAssetIntoString (const char* assetName)\r
{\r
- ScopedPointer<InputStream> input (createAssetInputStream (assetName));\r
+ std::unique_ptr<InputStream> input (createAssetInputStream (assetName));\r
\r
if (input == nullptr)\r
return {};\r
if (faceGroup.size() == 0)\r
return nullptr;\r
\r
- ScopedPointer<Shape> shape (new Shape());\r
+ std::unique_ptr<Shape> shape (new Shape());\r
shape->name = name;\r
shape->material = material;\r
\r
--- /dev/null
+/*\r
+ ==============================================================================\r
+\r
+ This file is part of the JUCE library.\r
+ Copyright (c) 2017 - ROLI Ltd.\r
+\r
+ JUCE is an open source library subject to commercial or open-source\r
+ licensing.\r
+\r
+ The code included in this file is provided under the terms of the ISC license\r
+ http://www.isc.org/downloads/software-support-policy/isc-license. Permission\r
+ To use, copy, modify, and/or distribute this software for any purpose with or\r
+ without fee is hereby granted provided that the above copyright notice and\r
+ this permission notice appear in all copies.\r
+\r
+ JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r
+ EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r
+ DISCLAIMED.\r
+\r
+ ==============================================================================\r
+*/\r
+\r
+package com.juce.demorunner;\r
+\r
+import android.app.Activity;\r
+import android.app.AlertDialog;\r
+import android.content.DialogInterface;\r
+import android.content.Context;\r
+import android.content.Intent;\r
+import android.content.res.Configuration;\r
+import android.content.pm.PackageInfo;\r
+import android.content.pm.PackageManager;\r
+import android.hardware.camera2.*;\r
+import android.net.http.SslError;\r
+import android.net.Uri;\r
+import android.os.Bundle;\r
+import android.os.Looper;\r
+import android.os.Handler;\r
+import android.os.Message;\r
+import android.os.ParcelUuid;\r
+import android.os.Environment;\r
+import android.view.*;\r
+import android.view.inputmethod.BaseInputConnection;\r
+import android.view.inputmethod.EditorInfo;\r
+import android.view.inputmethod.InputConnection;\r
+import android.view.inputmethod.InputMethodManager;\r
+import android.graphics.*;\r
+import android.text.ClipboardManager;\r
+import android.text.InputType;\r
+import android.util.DisplayMetrics;\r
+import android.util.Log;\r
+import android.util.Pair;\r
+import android.webkit.SslErrorHandler;\r
+import android.webkit.WebChromeClient;\r
+import android.webkit.WebResourceError;\r
+import android.webkit.WebResourceRequest;\r
+import android.webkit.WebResourceResponse;\r
+import android.webkit.WebView;\r
+import android.webkit.WebViewClient;\r
+import java.lang.Runnable;\r
+import java.lang.ref.WeakReference;\r
+import java.lang.reflect.*;\r
+import java.util.*;\r
+import java.io.*;\r
+import java.net.URL;\r
+import java.net.HttpURLConnection;\r
+import android.media.AudioManager;\r
+import android.Manifest;\r
+import java.util.concurrent.CancellationException;\r
+import java.util.concurrent.Future;\r
+import java.util.concurrent.Executors;\r
+import java.util.concurrent.ExecutorService;\r
+import java.util.concurrent.ExecutionException;\r
+import java.util.concurrent.TimeUnit;\r
+import java.util.concurrent.Callable;\r
+import java.util.concurrent.TimeoutException;\r
+import java.util.concurrent.locks.ReentrantLock;\r
+import java.util.concurrent.atomic.*;\r
+\r
+import android.media.midi.*;\r
+import android.bluetooth.*;\r
+import android.bluetooth.le.*;\r
+\r
+\r
+//==============================================================================\r
+public class DemoRunner extends Activity\r
+{\r
+ //==============================================================================\r
+ static\r
+ {\r
+ System.loadLibrary ("juce_jni");\r
+ }\r
+\r
+ //==============================================================================\r
+ public boolean isPermissionDeclaredInManifest (int permissionID)\r
+ {\r
+ String permissionToCheck = getAndroidPermissionName(permissionID);\r
+\r
+ try\r
+ {\r
+ PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), PackageManager.GET_PERMISSIONS);\r
+\r
+ if (info.requestedPermissions != null)\r
+ for (String permission : info.requestedPermissions)\r
+ if (permission.equals (permissionToCheck))\r
+ return true;\r
+ }\r
+ catch (PackageManager.NameNotFoundException e)\r
+ {\r
+ Log.d ("JUCE", "isPermissionDeclaredInManifest: PackageManager.NameNotFoundException = " + e.toString());\r
+ }\r
+\r
+ Log.d ("JUCE", "isPermissionDeclaredInManifest: could not find requested permission " + permissionToCheck);\r
+ return false;\r
+ }\r
+\r
+ //==============================================================================\r
+ // these have to match the values of enum PermissionID in C++ class RuntimePermissions:\r
+ private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1;\r
+ private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
+ private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
+ private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+ private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
+\r
+ private static String getAndroidPermissionName (int permissionID)\r
+ {\r
+ switch (permissionID)\r
+ {\r
+ case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO;\r
+ case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION;\r
+ // use string value as this is not defined in SDKs < 16\r
+ case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE";\r
+ case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+ case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA;\r
+ }\r
+\r
+ // unknown permission ID!\r
+ assert false;\r
+ return new String();\r
+ }\r
+\r
+ public boolean isPermissionGranted (int permissionID)\r
+ {\r
+ return getApplicationContext().checkCallingOrSelfPermission (getAndroidPermissionName (permissionID)) == PackageManager.PERMISSION_GRANTED;\r
+ }\r
+\r
+ private Map<Integer, Long> permissionCallbackPtrMap;\r
+\r
+ public void requestRuntimePermission (int permissionID, long ptrToCallback)\r
+ {\r
+ String permissionName = getAndroidPermissionName (permissionID);\r
+\r
+ if (getApplicationContext().checkCallingOrSelfPermission (permissionName) != PackageManager.PERMISSION_GRANTED)\r
+ {\r
+ // remember callbackPtr, request permissions, and let onRequestPermissionResult call callback asynchronously\r
+ permissionCallbackPtrMap.put (permissionID, ptrToCallback);\r
+ requestPermissionsCompat (new String[]{permissionName}, permissionID);\r
+ }\r
+ else\r
+ {\r
+ // permissions were already granted before, we can call callback directly\r
+ androidRuntimePermissionsCallback (true, ptrToCallback);\r
+ }\r
+ }\r
+\r
+ private native void androidRuntimePermissionsCallback (boolean permissionWasGranted, long ptrToCallback);\r
+\r
+ @Override\r
+ public void onRequestPermissionsResult (int permissionID, String permissions[], int[] grantResults)\r
+ {\r
+ boolean permissionsGranted = (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED);\r
+\r
+ if (! permissionsGranted)\r
+ Log.d ("JUCE", "onRequestPermissionsResult: runtime permission was DENIED: " + getAndroidPermissionName (permissionID));\r
+\r
+ Long ptrToCallback = permissionCallbackPtrMap.get (permissionID);\r
+ permissionCallbackPtrMap.remove (permissionID);\r
+ androidRuntimePermissionsCallback (permissionsGranted, ptrToCallback);\r
+ }\r
+\r
+ //==============================================================================\r
+ public interface JuceMidiPort\r
+ {\r
+ boolean isInputPort();\r
+\r
+ // start, stop does nothing on an output port\r
+ void start();\r
+ void stop();\r
+\r
+ void close();\r
+\r
+ // send will do nothing on an input port\r
+ void sendMidi (byte[] msg, int offset, int count);\r
+ }\r
+\r
+ //==============================================================================\r
+ //==============================================================================\r
+ public class BluetoothManager extends ScanCallback\r
+ {\r
+ BluetoothManager()\r
+ {\r
+ }\r
+\r
+ public String[] getMidiBluetoothAddresses()\r
+ {\r
+ return bluetoothMidiDevices.toArray (new String[bluetoothMidiDevices.size()]);\r
+ }\r
+\r
+ public String getHumanReadableStringForBluetoothAddress (String address)\r
+ {\r
+ BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address);\r
+ return btDevice.getName();\r
+ }\r
+\r
+ public int getBluetoothDeviceStatus (String address)\r
+ {\r
+ return getAndroidMidiDeviceManager().getBluetoothDeviceStatus (address);\r
+ }\r
+\r
+ public void startStopScan (boolean shouldStart)\r
+ {\r
+ BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\r
+\r
+ if (bluetoothAdapter == null)\r
+ {\r
+ Log.d ("JUCE", "BluetoothManager error: could not get default Bluetooth adapter");\r
+ return;\r
+ }\r
+\r
+ BluetoothLeScanner bluetoothLeScanner = bluetoothAdapter.getBluetoothLeScanner();\r
+\r
+ if (bluetoothLeScanner == null)\r
+ {\r
+ Log.d ("JUCE", "BluetoothManager error: could not get Bluetooth LE scanner");\r
+ return;\r
+ }\r
+\r
+ if (shouldStart)\r
+ {\r
+ ScanFilter.Builder scanFilterBuilder = new ScanFilter.Builder();\r
+ scanFilterBuilder.setServiceUuid (ParcelUuid.fromString (bluetoothLEMidiServiceUUID));\r
+\r
+ ScanSettings.Builder scanSettingsBuilder = new ScanSettings.Builder();\r
+ scanSettingsBuilder.setCallbackType (ScanSettings.CALLBACK_TYPE_ALL_MATCHES)\r
+ .setScanMode (ScanSettings.SCAN_MODE_LOW_POWER)\r
+ .setScanMode (ScanSettings.MATCH_MODE_STICKY);\r
+\r
+ bluetoothLeScanner.startScan (Arrays.asList (scanFilterBuilder.build()),\r
+ scanSettingsBuilder.build(),\r
+ this);\r
+ }\r
+ else\r
+ {\r
+ bluetoothLeScanner.stopScan (this);\r
+ }\r
+ }\r
+\r
+ public boolean pairBluetoothMidiDevice(String address)\r
+ {\r
+ BluetoothDevice btDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice (address);\r
+\r
+ if (btDevice == null)\r
+ {\r
+ Log.d ("JUCE", "failed to create buletooth device from address");\r
+ return false;\r
+ }\r
+\r
+ return getAndroidMidiDeviceManager().pairBluetoothDevice (btDevice);\r
+ }\r
+\r
+ public void unpairBluetoothMidiDevice (String address)\r
+ {\r
+ getAndroidMidiDeviceManager().unpairBluetoothDevice (address);\r
+ }\r
+\r
+ public void onScanFailed (int errorCode)\r
+ {\r
+ }\r
+\r
+ public void onScanResult (int callbackType, ScanResult result)\r
+ {\r
+ if (callbackType == ScanSettings.CALLBACK_TYPE_ALL_MATCHES\r
+ || callbackType == ScanSettings.CALLBACK_TYPE_FIRST_MATCH)\r
+ {\r
+ BluetoothDevice device = result.getDevice();\r
+\r
+ if (device != null)\r
+ bluetoothMidiDevices.add (device.getAddress());\r
+ }\r
+\r
+ if (callbackType == ScanSettings.CALLBACK_TYPE_MATCH_LOST)\r
+ {\r
+ Log.d ("JUCE", "ScanSettings.CALLBACK_TYPE_MATCH_LOST");\r
+ BluetoothDevice device = result.getDevice();\r
+\r
+ if (device != null)\r
+ {\r
+ bluetoothMidiDevices.remove (device.getAddress());\r
+ unpairBluetoothMidiDevice (device.getAddress());\r
+ }\r
+ }\r
+ }\r
+\r
+ public void onBatchScanResults (List<ScanResult> results)\r
+ {\r
+ for (ScanResult result : results)\r
+ onScanResult (ScanSettings.CALLBACK_TYPE_ALL_MATCHES, result);\r
+ }\r
+\r
+ private BluetoothLeScanner scanner;\r
+ private static final String bluetoothLEMidiServiceUUID = "03B80E5A-EDE8-4B33-A751-6CE34EC4C700";\r
+\r
+ private HashSet<String> bluetoothMidiDevices = new HashSet<String>();\r
+ }\r
+\r
+ public static class JuceMidiInputPort extends MidiReceiver implements JuceMidiPort\r
+ {\r
+ private native void handleReceive (long host, byte[] msg, int offset, int count, long timestamp);\r
+\r
+ public JuceMidiInputPort (MidiDeviceManager mm, MidiOutputPort actualPort, MidiPortPath portPathToUse, long hostToUse)\r
+ {\r
+ owner = mm;\r
+ androidPort = actualPort;\r
+ portPath = portPathToUse;\r
+ juceHost = hostToUse;\r
+ isConnected = false;\r
+ }\r
+\r
+ @Override\r
+ protected void finalize() throws Throwable\r
+ {\r
+ close();\r
+ super.finalize();\r
+ }\r
+\r
+ @Override\r
+ public boolean isInputPort()\r
+ {\r
+ return true;\r
+ }\r
+\r
+ @Override\r
+ public void start()\r
+ {\r
+ if (owner != null && androidPort != null && ! isConnected) {\r
+ androidPort.connect(this);\r
+ isConnected = true;\r
+ }\r
+ }\r
+\r
+ @Override\r
+ public void stop()\r
+ {\r
+ if (owner != null && androidPort != null && isConnected) {\r
+ androidPort.disconnect(this);\r
+ isConnected = false;\r
+ }\r
+ }\r
+\r
+ @Override\r
+ public void close()\r
+ {\r
+ if (androidPort != null) {\r
+ try {\r
+ androidPort.close();\r
+ } catch (IOException exception) {\r
+ Log.d("JUCE", "IO Exception while closing port");\r
+ }\r
+ }\r
+\r
+ if (owner != null)\r
+ owner.removePort (portPath);\r
+\r
+ owner = null;\r
+ androidPort = null;\r
+ }\r
+\r
+ @Override\r
+ public void onSend (byte[] msg, int offset, int count, long timestamp)\r
+ {\r
+ if (count > 0)\r
+ handleReceive (juceHost, msg, offset, count, timestamp);\r
+ }\r
+\r
+ @Override\r
+ public void onFlush()\r
+ {}\r
+\r
+ @Override\r
+ public void sendMidi (byte[] msg, int offset, int count)\r
+ {\r
+ }\r
+\r
+ MidiDeviceManager owner;\r
+ MidiOutputPort androidPort;\r
+ MidiPortPath portPath;\r
+ long juceHost;\r
+ boolean isConnected;\r
+ }\r
+\r
+ public static class JuceMidiOutputPort implements JuceMidiPort\r
+ {\r
+ public JuceMidiOutputPort (MidiDeviceManager mm, MidiInputPort actualPort, MidiPortPath portPathToUse)\r
+ {\r
+ owner = mm;\r
+ androidPort = actualPort;\r
+ portPath = portPathToUse;\r
+ }\r
+\r
+ @Override\r
+ protected void finalize() throws Throwable\r
+ {\r
+ close();\r
+ super.finalize();\r
+ }\r
+\r
+ @Override\r
+ public boolean isInputPort()\r
+ {\r
+ return false;\r
+ }\r
+\r
+ @Override\r
+ public void start()\r
+ {\r
+ }\r
+\r
+ @Override\r
+ public void stop()\r
+ {\r
+ }\r
+\r
+ @Override\r
+ public void sendMidi (byte[] msg, int offset, int count)\r
+ {\r
+ if (androidPort != null)\r
+ {\r
+ try {\r
+ androidPort.send(msg, offset, count);\r
+ } catch (IOException exception)\r
+ {\r
+ Log.d ("JUCE", "send midi had IO exception");\r
+ }\r
+ }\r
+ }\r
+\r
+ @Override\r
+ public void close()\r
+ {\r
+ if (androidPort != null) {\r
+ try {\r
+ androidPort.close();\r
+ } catch (IOException exception) {\r
+ Log.d("JUCE", "IO Exception while closing port");\r
+ }\r
+ }\r
+\r
+ if (owner != null)\r
+ owner.removePort (portPath);\r
+\r
+ owner = null;\r
+ androidPort = null;\r
+ }\r
+\r
+ MidiDeviceManager owner;\r
+ MidiInputPort androidPort;\r
+ MidiPortPath portPath;\r
+ }\r
+\r
+ private static class MidiPortPath extends Object\r
+ {\r
+ public MidiPortPath (int deviceIdToUse, boolean direction, int androidIndex)\r
+ {\r
+ deviceId = deviceIdToUse;\r
+ isInput = direction;\r
+ portIndex = androidIndex;\r
+\r
+ }\r
+\r
+ public int deviceId;\r
+ public int portIndex;\r
+ public boolean isInput;\r
+\r
+ @Override\r
+ public int hashCode()\r
+ {\r
+ Integer i = new Integer ((deviceId * 128) + (portIndex < 128 ? portIndex : 127));\r
+ return i.hashCode() * (isInput ? -1 : 1);\r
+ }\r
+\r
+ @Override\r
+ public boolean equals (Object obj)\r
+ {\r
+ if (obj == null)\r
+ return false;\r
+\r
+ if (getClass() != obj.getClass())\r
+ return false;\r
+\r
+ MidiPortPath other = (MidiPortPath) obj;\r
+ return (portIndex == other.portIndex && isInput == other.isInput && deviceId == other.deviceId);\r
+ }\r
+ }\r
+\r
+ //==============================================================================\r
+ public class MidiDeviceManager extends MidiManager.DeviceCallback implements MidiManager.OnDeviceOpenedListener\r
+ {\r
+ //==============================================================================\r
+ private class DummyBluetoothGattCallback extends BluetoothGattCallback\r
+ {\r
+ public DummyBluetoothGattCallback (MidiDeviceManager mm)\r
+ {\r
+ super();\r
+ owner = mm;\r
+ }\r
+\r
+ public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState)\r
+ {\r
+ if (newState == BluetoothProfile.STATE_CONNECTED)\r
+ {\r
+ gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH);\r
+ owner.pairBluetoothDeviceStepTwo (gatt.getDevice());\r
+ }\r
+ }\r
+ public void onServicesDiscovered(BluetoothGatt gatt, int status) {}\r
+ public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {}\r
+ public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {}\r
+ public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {}\r
+ public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {}\r
+ public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {}\r
+ public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {}\r
+ public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {}\r
+ public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {}\r
+\r
+ private MidiDeviceManager owner;\r
+ }\r
+\r
+ //==============================================================================\r
+ private class MidiDeviceOpenTask extends java.util.TimerTask\r
+ {\r
+ public MidiDeviceOpenTask (MidiDeviceManager deviceManager, MidiDevice device, BluetoothGatt gattToUse)\r
+ {\r
+ owner = deviceManager;\r
+ midiDevice = device;\r
+ btGatt = gattToUse;\r
+ }\r
+\r
+ @Override\r
+ public boolean cancel()\r
+ {\r
+ synchronized (MidiDeviceOpenTask.class)\r
+ {\r
+ owner = null;\r
+ boolean retval = super.cancel();\r
+\r
+ if (btGatt != null)\r
+ {\r
+ btGatt.disconnect();\r
+ btGatt.close();\r
+\r
+ btGatt = null;\r
+ }\r
+\r
+ if (midiDevice != null)\r
+ {\r
+ try\r
+ {\r
+ midiDevice.close();\r
+ }\r
+ catch (IOException e)\r
+ {}\r
+\r
+ midiDevice = null;\r
+ }\r
+\r
+ return retval;\r
+ }\r
+ }\r
+\r
+ public String getBluetoothAddress()\r
+ {\r
+ synchronized (MidiDeviceOpenTask.class)\r
+ {\r
+ if (midiDevice != null)\r
+ {\r
+ MidiDeviceInfo info = midiDevice.getInfo();\r
+ if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH)\r
+ {\r
+ BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE);\r
+ if (btDevice != null)\r
+ return btDevice.getAddress();\r
+ }\r
+ }\r
+ }\r
+\r
+ return "";\r
+ }\r
+\r
+ public BluetoothGatt getGatt() { return btGatt; }\r
+\r
+ public int getID()\r
+ {\r
+ return midiDevice.getInfo().getId();\r
+ }\r
+\r
+ @Override\r
+ public void run()\r
+ {\r
+ synchronized (MidiDeviceOpenTask.class)\r
+ {\r
+ if (owner != null && midiDevice != null)\r
+ owner.onDeviceOpenedDelayed (midiDevice);\r
+ }\r
+ }\r
+\r
+ private MidiDeviceManager owner;\r
+ private MidiDevice midiDevice;\r
+ private BluetoothGatt btGatt;\r
+ }\r
+\r
+ //==============================================================================\r
+ public MidiDeviceManager()\r
+ {\r
+ manager = (MidiManager) getSystemService (MIDI_SERVICE);\r
+\r
+ if (manager == null)\r
+ {\r
+ Log.d ("JUCE", "MidiDeviceManager error: could not get MidiManager system service");\r
+ return;\r
+ }\r
+\r
+ openPorts = new HashMap<MidiPortPath, WeakReference<JuceMidiPort>> ();\r
+ midiDevices = new ArrayList<Pair<MidiDevice,BluetoothGatt>>();\r
+ openTasks = new HashMap<Integer, MidiDeviceOpenTask>();\r
+ btDevicesPairing = new HashMap<String, BluetoothGatt>();\r
+\r
+ MidiDeviceInfo[] foundDevices = manager.getDevices();\r
+ for (MidiDeviceInfo info : foundDevices)\r
+ onDeviceAdded (info);\r
+\r
+ manager.registerDeviceCallback (this, null);\r
+ }\r
+\r
+ protected void finalize() throws Throwable\r
+ {\r
+ manager.unregisterDeviceCallback (this);\r
+\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ btDevicesPairing.clear();\r
+\r
+ for (Integer deviceID : openTasks.keySet())\r
+ openTasks.get (deviceID).cancel();\r
+\r
+ openTasks = null;\r
+ }\r
+\r
+ for (MidiPortPath key : openPorts.keySet())\r
+ openPorts.get (key).get().close();\r
+\r
+ openPorts = null;\r
+\r
+ for (Pair<MidiDevice, BluetoothGatt> device : midiDevices)\r
+ {\r
+ if (device.second != null)\r
+ {\r
+ device.second.disconnect();\r
+ device.second.close();\r
+ }\r
+\r
+ device.first.close();\r
+ }\r
+\r
+ midiDevices.clear();\r
+\r
+ super.finalize();\r
+ }\r
+\r
+ public String[] getJuceAndroidMidiInputDevices()\r
+ {\r
+ return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_OUTPUT);\r
+ }\r
+\r
+ public String[] getJuceAndroidMidiOutputDevices()\r
+ {\r
+ return getJuceAndroidMidiDevices (MidiDeviceInfo.PortInfo.TYPE_INPUT);\r
+ }\r
+\r
+ private String[] getJuceAndroidMidiDevices (int portType)\r
+ {\r
+ // only update the list when JUCE asks for a new list\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ deviceInfos = getDeviceInfos();\r
+ }\r
+\r
+ ArrayList<String> portNames = new ArrayList<String>();\r
+\r
+ int index = 0;\r
+ for (MidiPortPath portInfo = getPortPathForJuceIndex (portType, index); portInfo != null; portInfo = getPortPathForJuceIndex (portType, ++index))\r
+ portNames.add (getPortName (portInfo));\r
+\r
+ String[] names = new String[portNames.size()];\r
+ return portNames.toArray (names);\r
+ }\r
+\r
+ private JuceMidiPort openMidiPortWithJuceIndex (int index, long host, boolean isInput)\r
+ {\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ int portTypeToFind = (isInput ? MidiDeviceInfo.PortInfo.TYPE_OUTPUT : MidiDeviceInfo.PortInfo.TYPE_INPUT);\r
+ MidiPortPath portInfo = getPortPathForJuceIndex (portTypeToFind, index);\r
+\r
+ if (portInfo != null)\r
+ {\r
+ // ports must be opened exclusively!\r
+ if (openPorts.containsKey (portInfo))\r
+ return null;\r
+\r
+ Pair<MidiDevice,BluetoothGatt> devicePair = getMidiDevicePairForId (portInfo.deviceId);\r
+\r
+ if (devicePair != null)\r
+ {\r
+ MidiDevice device = devicePair.first;\r
+ if (device != null)\r
+ {\r
+ JuceMidiPort juceMidiPort = null;\r
+\r
+ if (isInput)\r
+ {\r
+ MidiOutputPort outputPort = device.openOutputPort(portInfo.portIndex);\r
+\r
+ if (outputPort != null)\r
+ juceMidiPort = new JuceMidiInputPort(this, outputPort, portInfo, host);\r
+ }\r
+ else\r
+ {\r
+ MidiInputPort inputPort = device.openInputPort(portInfo.portIndex);\r
+\r
+ if (inputPort != null)\r
+ juceMidiPort = new JuceMidiOutputPort(this, inputPort, portInfo);\r
+ }\r
+\r
+ if (juceMidiPort != null)\r
+ {\r
+ openPorts.put(portInfo, new WeakReference<JuceMidiPort>(juceMidiPort));\r
+\r
+ return juceMidiPort;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+ public JuceMidiPort openMidiInputPortWithJuceIndex (int index, long host)\r
+ {\r
+ return openMidiPortWithJuceIndex (index, host, true);\r
+ }\r
+\r
+ public JuceMidiPort openMidiOutputPortWithJuceIndex (int index)\r
+ {\r
+ return openMidiPortWithJuceIndex (index, 0, false);\r
+ }\r
+\r
+ /* 0: unpaired, 1: paired, 2: pairing */\r
+ public int getBluetoothDeviceStatus (String address)\r
+ {\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ if (! address.isEmpty())\r
+ {\r
+ if (findMidiDeviceForBluetoothAddress (address) != null)\r
+ return 1;\r
+\r
+ if (btDevicesPairing.containsKey (address))\r
+ return 2;\r
+\r
+ if (findOpenTaskForBluetoothAddress (address) != null)\r
+ return 2;\r
+ }\r
+ }\r
+\r
+ return 0;\r
+ }\r
+\r
+ public boolean pairBluetoothDevice (BluetoothDevice btDevice)\r
+ {\r
+ String btAddress = btDevice.getAddress();\r
+ if (btAddress.isEmpty())\r
+ return false;\r
+\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ if (getBluetoothDeviceStatus (btAddress) != 0)\r
+ return false;\r
+\r
+\r
+ btDevicesPairing.put (btDevice.getAddress(), null);\r
+ BluetoothGatt gatt = btDevice.connectGatt (getApplicationContext(), true, new DummyBluetoothGattCallback (this));\r
+\r
+ if (gatt != null)\r
+ {\r
+ btDevicesPairing.put (btDevice.getAddress(), gatt);\r
+ }\r
+ else\r
+ {\r
+ pairBluetoothDeviceStepTwo (btDevice);\r
+ }\r
+ }\r
+\r
+ return true;\r
+ }\r
+\r
+ public void pairBluetoothDeviceStepTwo (BluetoothDevice btDevice)\r
+ {\r
+ manager.openBluetoothDevice(btDevice, this, null);\r
+ }\r
+\r
+ public void unpairBluetoothDevice (String address)\r
+ {\r
+ if (address.isEmpty())\r
+ return;\r
+\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ if (btDevicesPairing.containsKey (address))\r
+ {\r
+ BluetoothGatt gatt = btDevicesPairing.get (address);\r
+ if (gatt != null)\r
+ {\r
+ gatt.disconnect();\r
+ gatt.close();\r
+ }\r
+\r
+ btDevicesPairing.remove (address);\r
+ }\r
+\r
+ MidiDeviceOpenTask openTask = findOpenTaskForBluetoothAddress (address);\r
+ if (openTask != null)\r
+ {\r
+ int deviceID = openTask.getID();\r
+ openTask.cancel();\r
+ openTasks.remove (deviceID);\r
+ }\r
+\r
+ Pair<MidiDevice, BluetoothGatt> midiDevicePair = findMidiDeviceForBluetoothAddress (address);\r
+ if (midiDevicePair != null)\r
+ {\r
+ MidiDevice midiDevice = midiDevicePair.first;\r
+ onDeviceRemoved (midiDevice.getInfo());\r
+\r
+ try {\r
+ midiDevice.close();\r
+ }\r
+ catch (IOException exception)\r
+ {\r
+ Log.d ("JUCE", "IOException while closing midi device");\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ private Pair<MidiDevice, BluetoothGatt> findMidiDeviceForBluetoothAddress (String address)\r
+ {\r
+ for (Pair<MidiDevice,BluetoothGatt> midiDevice : midiDevices)\r
+ {\r
+ MidiDeviceInfo info = midiDevice.first.getInfo();\r
+ if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH)\r
+ {\r
+ BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE);\r
+ if (btDevice != null && btDevice.getAddress().equals (address))\r
+ return midiDevice;\r
+ }\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+ private MidiDeviceOpenTask findOpenTaskForBluetoothAddress (String address)\r
+ {\r
+ for (Integer deviceID : openTasks.keySet())\r
+ {\r
+ MidiDeviceOpenTask openTask = openTasks.get (deviceID);\r
+ if (openTask.getBluetoothAddress().equals (address))\r
+ return openTask;\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+ public void removePort (MidiPortPath path)\r
+ {\r
+ openPorts.remove (path);\r
+ }\r
+\r
+ public String getInputPortNameForJuceIndex (int index)\r
+ {\r
+ MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_OUTPUT, index);\r
+ if (portInfo != null)\r
+ return getPortName (portInfo);\r
+\r
+ return "";\r
+ }\r
+\r
+ public String getOutputPortNameForJuceIndex (int index)\r
+ {\r
+ MidiPortPath portInfo = getPortPathForJuceIndex (MidiDeviceInfo.PortInfo.TYPE_INPUT, index);\r
+ if (portInfo != null)\r
+ return getPortName (portInfo);\r
+\r
+ return "";\r
+ }\r
+\r
+ public void onDeviceAdded (MidiDeviceInfo info)\r
+ {\r
+ // only add standard midi devices\r
+ if (info.getType() == info.TYPE_BLUETOOTH)\r
+ return;\r
+\r
+ manager.openDevice (info, this, null);\r
+ }\r
+\r
+ public void onDeviceRemoved (MidiDeviceInfo info)\r
+ {\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ Pair<MidiDevice, BluetoothGatt> devicePair = getMidiDevicePairForId (info.getId());\r
+\r
+ if (devicePair != null)\r
+ {\r
+ MidiDevice midiDevice = devicePair.first;\r
+ BluetoothGatt gatt = devicePair.second;\r
+\r
+ // close all ports that use this device\r
+ boolean removedPort = true;\r
+\r
+ while (removedPort == true)\r
+ {\r
+ removedPort = false;\r
+ for (MidiPortPath key : openPorts.keySet())\r
+ {\r
+ if (key.deviceId == info.getId())\r
+ {\r
+ openPorts.get(key).get().close();\r
+ removedPort = true;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+\r
+ if (gatt != null)\r
+ {\r
+ gatt.disconnect();\r
+ gatt.close();\r
+ }\r
+\r
+ midiDevices.remove (devicePair);\r
+ }\r
+ }\r
+ }\r
+\r
+ public void onDeviceStatusChanged (MidiDeviceStatus status)\r
+ {\r
+ }\r
+\r
+ @Override\r
+ public void onDeviceOpened (MidiDevice theDevice)\r
+ {\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ MidiDeviceInfo info = theDevice.getInfo();\r
+ int deviceID = info.getId();\r
+ BluetoothGatt gatt = null;\r
+ boolean isBluetooth = false;\r
+\r
+ if (! openTasks.containsKey (deviceID))\r
+ {\r
+ if (info.getType() == MidiDeviceInfo.TYPE_BLUETOOTH)\r
+ {\r
+ isBluetooth = true;\r
+ BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE);\r
+ if (btDevice != null)\r
+ {\r
+ String btAddress = btDevice.getAddress();\r
+ if (btDevicesPairing.containsKey (btAddress))\r
+ {\r
+ gatt = btDevicesPairing.get (btAddress);\r
+ btDevicesPairing.remove (btAddress);\r
+ }\r
+ else\r
+ {\r
+ // unpair was called in the mean time\r
+ try\r
+ {\r
+ Pair<MidiDevice, BluetoothGatt> midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress());\r
+ if (midiDevicePair != null)\r
+ {\r
+ gatt = midiDevicePair.second;\r
+\r
+ if (gatt != null)\r
+ {\r
+ gatt.disconnect();\r
+ gatt.close();\r
+ }\r
+ }\r
+\r
+ theDevice.close();\r
+ }\r
+ catch (IOException e)\r
+ {}\r
+\r
+ return;\r
+ }\r
+ }\r
+ }\r
+\r
+ MidiDeviceOpenTask openTask = new MidiDeviceOpenTask (this, theDevice, gatt);\r
+ openTasks.put (deviceID, openTask);\r
+\r
+ new java.util.Timer().schedule (openTask, (isBluetooth ? 2000 : 100));\r
+ }\r
+ }\r
+ }\r
+\r
+ public void onDeviceOpenedDelayed (MidiDevice theDevice)\r
+ {\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ int deviceID = theDevice.getInfo().getId();\r
+\r
+ if (openTasks.containsKey (deviceID))\r
+ {\r
+ if (! midiDevices.contains(theDevice))\r
+ {\r
+ BluetoothGatt gatt = openTasks.get (deviceID).getGatt();\r
+ openTasks.remove (deviceID);\r
+ midiDevices.add (new Pair<MidiDevice,BluetoothGatt> (theDevice, gatt));\r
+ }\r
+ }\r
+ else\r
+ {\r
+ // unpair was called in the mean time\r
+ MidiDeviceInfo info = theDevice.getInfo();\r
+ BluetoothDevice btDevice = (BluetoothDevice) info.getProperties().get (info.PROPERTY_BLUETOOTH_DEVICE);\r
+ if (btDevice != null)\r
+ {\r
+ String btAddress = btDevice.getAddress();\r
+ Pair<MidiDevice, BluetoothGatt> midiDevicePair = findMidiDeviceForBluetoothAddress (btDevice.getAddress());\r
+ if (midiDevicePair != null)\r
+ {\r
+ BluetoothGatt gatt = midiDevicePair.second;\r
+\r
+ if (gatt != null)\r
+ {\r
+ gatt.disconnect();\r
+ gatt.close();\r
+ }\r
+ }\r
+ }\r
+\r
+ try\r
+ {\r
+ theDevice.close();\r
+ }\r
+ catch (IOException e)\r
+ {}\r
+ }\r
+ }\r
+ }\r
+\r
+ public String getPortName(MidiPortPath path)\r
+ {\r
+ int portTypeToFind = (path.isInput ? MidiDeviceInfo.PortInfo.TYPE_INPUT : MidiDeviceInfo.PortInfo.TYPE_OUTPUT);\r
+\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ for (MidiDeviceInfo info : deviceInfos)\r
+ {\r
+ int localIndex = 0;\r
+ if (info.getId() == path.deviceId)\r
+ {\r
+ for (MidiDeviceInfo.PortInfo portInfo : info.getPorts())\r
+ {\r
+ int portType = portInfo.getType();\r
+ if (portType == portTypeToFind)\r
+ {\r
+ int portIndex = portInfo.getPortNumber();\r
+ if (portIndex == path.portIndex)\r
+ {\r
+ String portName = portInfo.getName();\r
+ if (portName.isEmpty())\r
+ portName = (String) info.getProperties().get(info.PROPERTY_NAME);\r
+\r
+ return portName;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ return "";\r
+ }\r
+\r
+ public MidiPortPath getPortPathForJuceIndex (int portType, int juceIndex)\r
+ {\r
+ int portIdx = 0;\r
+ for (MidiDeviceInfo info : deviceInfos)\r
+ {\r
+ for (MidiDeviceInfo.PortInfo portInfo : info.getPorts())\r
+ {\r
+ if (portInfo.getType() == portType)\r
+ {\r
+ if (portIdx == juceIndex)\r
+ return new MidiPortPath (info.getId(),\r
+ (portType == MidiDeviceInfo.PortInfo.TYPE_INPUT),\r
+ portInfo.getPortNumber());\r
+\r
+ portIdx++;\r
+ }\r
+ }\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+ private MidiDeviceInfo[] getDeviceInfos()\r
+ {\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ MidiDeviceInfo[] infos = new MidiDeviceInfo[midiDevices.size()];\r
+\r
+ int idx = 0;\r
+ for (Pair<MidiDevice,BluetoothGatt> midiDevice : midiDevices)\r
+ infos[idx++] = midiDevice.first.getInfo();\r
+\r
+ return infos;\r
+ }\r
+ }\r
+\r
+ private Pair<MidiDevice, BluetoothGatt> getMidiDevicePairForId (int deviceId)\r
+ {\r
+ synchronized (MidiDeviceManager.class)\r
+ {\r
+ for (Pair<MidiDevice,BluetoothGatt> midiDevice : midiDevices)\r
+ if (midiDevice.first.getInfo().getId() == deviceId)\r
+ return midiDevice;\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+ private MidiManager manager;\r
+ private HashMap<String, BluetoothGatt> btDevicesPairing;\r
+ private HashMap<Integer, MidiDeviceOpenTask> openTasks;\r
+ private ArrayList<Pair<MidiDevice, BluetoothGatt>> midiDevices;\r
+ private MidiDeviceInfo[] deviceInfos;\r
+ private HashMap<MidiPortPath, WeakReference<JuceMidiPort>> openPorts;\r
+ }\r
+\r
+ public MidiDeviceManager getAndroidMidiDeviceManager()\r
+ {\r
+ if (getSystemService (MIDI_SERVICE) == null)\r
+ return null;\r
+\r
+ synchronized (DemoRunner.class)\r
+ {\r
+ if (midiDeviceManager == null)\r
+ midiDeviceManager = new MidiDeviceManager();\r
+ }\r
+\r
+ return midiDeviceManager;\r
+ }\r
+\r
+ public BluetoothManager getAndroidBluetoothManager()\r
+ {\r
+ BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\r
+\r
+ if (adapter == null)\r
+ return null;\r
+\r
+ if (adapter.getBluetoothLeScanner() == null)\r
+ return null;\r
+\r
+ synchronized (DemoRunner.class)\r
+ {\r
+ if (bluetoothManager == null)\r
+ bluetoothManager = new BluetoothManager();\r
+ }\r
+\r
+ return bluetoothManager;\r
+ }\r
+\r
+ //==============================================================================\r
+ @Override\r
+ public void onCreate (Bundle savedInstanceState)\r
+ {\r
+ super.onCreate (savedInstanceState);\r
+\r
+ isScreenSaverEnabled = true;\r
+ hideActionBar();\r
+ viewHolder = new ViewHolder (this);\r
+ setContentView (viewHolder);\r
+\r
+ setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
+\r
+ permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+ appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
+ }\r
+\r
+ @Override\r
+ protected void onDestroy()\r
+ {\r
+ quitApp();\r
+ super.onDestroy();\r
+\r
+ clearDataCache();\r
+ }\r
+\r
+ @Override\r
+ protected void onPause()\r
+ {\r
+ suspendApp();\r
+\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appPaused();\r
+\r
+ try\r
+ {\r
+ Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
+ // openGL glitches when pausing/resuming apps..\r
+ } catch (InterruptedException e) {}\r
+\r
+ super.onPause();\r
+ }\r
+\r
+ @Override\r
+ protected void onResume()\r
+ {\r
+ super.onResume();\r
+ resumeApp();\r
+\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appResumed();\r
+ }\r
+\r
+ @Override\r
+ public void onConfigurationChanged (Configuration cfg)\r
+ {\r
+ super.onConfigurationChanged (cfg);\r
+ setContentView (viewHolder);\r
+ }\r
+\r
+ private void callAppLauncher()\r
+ {\r
+ launchApp (getApplicationInfo().publicSourceDir,\r
+ getApplicationInfo().dataDir);\r
+ }\r
+\r
+ // Need to override this as the default implementation always finishes the activity.\r
+ @Override\r
+ public void onBackPressed()\r
+ {\r
+ ComponentPeerView focusedView = getViewWithFocusOrDefaultView();\r
+\r
+ if (focusedView == null)\r
+ return;\r
+\r
+ focusedView.backButtonPressed();\r
+ }\r
+\r
+ private ComponentPeerView getViewWithFocusOrDefaultView()\r
+ {\r
+ for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
+ {\r
+ if (viewHolder.getChildAt (i).hasFocus())\r
+ return (ComponentPeerView) viewHolder.getChildAt (i);\r
+ }\r
+\r
+ if (viewHolder.getChildCount() > 0)\r
+ return (ComponentPeerView) viewHolder.getChildAt (0);\r
+\r
+ return null;\r
+ }\r
+\r
+ //==============================================================================\r
+ private void hideActionBar()\r
+ {\r
+ // get "getActionBar" method\r
+ java.lang.reflect.Method getActionBarMethod = null;\r
+ try\r
+ {\r
+ getActionBarMethod = this.getClass().getMethod ("getActionBar");\r
+ }\r
+ catch (SecurityException e) { return; }\r
+ catch (NoSuchMethodException e) { return; }\r
+ if (getActionBarMethod == null) return;\r
+\r
+ // invoke "getActionBar" method\r
+ Object actionBar = null;\r
+ try\r
+ {\r
+ actionBar = getActionBarMethod.invoke (this);\r
+ }\r
+ catch (java.lang.IllegalArgumentException e) { return; }\r
+ catch (java.lang.IllegalAccessException e) { return; }\r
+ catch (java.lang.reflect.InvocationTargetException e) { return; }\r
+ if (actionBar == null) return;\r
+\r
+ // get "hide" method\r
+ java.lang.reflect.Method actionBarHideMethod = null;\r
+ try\r
+ {\r
+ actionBarHideMethod = actionBar.getClass().getMethod ("hide");\r
+ }\r
+ catch (SecurityException e) { return; }\r
+ catch (NoSuchMethodException e) { return; }\r
+ if (actionBarHideMethod == null) return;\r
+\r
+ // invoke "hide" method\r
+ try\r
+ {\r
+ actionBarHideMethod.invoke (actionBar);\r
+ }\r
+ catch (java.lang.IllegalArgumentException e) {}\r
+ catch (java.lang.IllegalAccessException e) {}\r
+ catch (java.lang.reflect.InvocationTargetException e) {}\r
+ }\r
+\r
+ void requestPermissionsCompat (String[] permissions, int requestCode)\r
+ {\r
+ Method requestPermissionsMethod = null;\r
+ try\r
+ {\r
+ requestPermissionsMethod = this.getClass().getMethod ("requestPermissions",\r
+ String[].class, int.class);\r
+ }\r
+ catch (SecurityException e) { return; }\r
+ catch (NoSuchMethodException e) { return; }\r
+ if (requestPermissionsMethod == null) return;\r
+\r
+ try\r
+ {\r
+ requestPermissionsMethod.invoke (this, permissions, requestCode);\r
+ }\r
+ catch (java.lang.IllegalArgumentException e) {}\r
+ catch (java.lang.IllegalAccessException e) {}\r
+ catch (java.lang.reflect.InvocationTargetException e) {}\r
+ }\r
+\r
+ //==============================================================================\r
+ private native void launchApp (String appFile, String appDataDir);\r
+ private native void quitApp();\r
+ private native void suspendApp();\r
+ private native void resumeApp();\r
+ private native void setScreenSize (int screenWidth, int screenHeight, int dpi);\r
+ private native void appActivityResult (int requestCode, int resultCode, Intent data);\r
+ private native void appNewIntent (Intent intent);\r
+\r
+ //==============================================================================\r
+ private ViewHolder viewHolder;\r
+ private MidiDeviceManager midiDeviceManager = null;\r
+ private BluetoothManager bluetoothManager = null;\r
+ private boolean isScreenSaverEnabled;\r
+ private java.util.Timer keepAliveTimer;\r
+\r
+ public final ComponentPeerView createNewView (boolean opaque, long host)\r
+ {\r
+ ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
+ viewHolder.addView (v);\r
+ addAppPausedResumedListener (v, host);\r
+ return v;\r
+ }\r
+\r
+ public final void deleteView (ComponentPeerView view)\r
+ {\r
+ removeAppPausedResumedListener (view, view.host);\r
+\r
+ view.host = 0;\r
+\r
+ ViewGroup group = (ViewGroup) (view.getParent());\r
+\r
+ if (group != null)\r
+ group.removeView (view);\r
+ }\r
+\r
+ public final void deleteNativeSurfaceView (NativeSurfaceView view)\r
+ {\r
+ ViewGroup group = (ViewGroup) (view.getParent());\r
+\r
+ if (group != null)\r
+ group.removeView (view);\r
+ }\r
+\r
+ final class ViewHolder extends ViewGroup\r
+ {\r
+ public ViewHolder (Context context)\r
+ {\r
+ super (context);\r
+ setDescendantFocusability (ViewGroup.FOCUS_AFTER_DESCENDANTS);\r
+ setFocusable (false);\r
+ }\r
+\r
+ protected final void onLayout (boolean changed, int left, int top, int right, int bottom)\r
+ {\r
+ setScreenSize (getWidth(), getHeight(), getDPI());\r
+\r
+ if (isFirstResize)\r
+ {\r
+ isFirstResize = false;\r
+ callAppLauncher();\r
+ }\r
+ }\r
+\r
+ private final int getDPI()\r
+ {\r
+ DisplayMetrics metrics = new DisplayMetrics();\r
+ getWindowManager().getDefaultDisplay().getMetrics (metrics);\r
+ return metrics.densityDpi;\r
+ }\r
+\r
+ private boolean isFirstResize = true;\r
+ }\r
+\r
+ public final void excludeClipRegion (android.graphics.Canvas canvas, float left, float top, float right, float bottom)\r
+ {\r
+ canvas.clipRect (left, top, right, bottom, android.graphics.Region.Op.DIFFERENCE);\r
+ }\r
+\r
+ //==============================================================================\r
+ public final void setScreenSaver (boolean enabled)\r
+ {\r
+ if (isScreenSaverEnabled != enabled)\r
+ {\r
+ isScreenSaverEnabled = enabled;\r
+\r
+ if (keepAliveTimer != null)\r
+ {\r
+ keepAliveTimer.cancel();\r
+ keepAliveTimer = null;\r
+ }\r
+\r
+ if (enabled)\r
+ {\r
+ getWindow().clearFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\r
+ }\r
+ else\r
+ {\r
+ getWindow().addFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\r
+\r
+ // If no user input is received after about 3 seconds, the OS will lower the\r
+ // task's priority, so this timer forces it to be kept active.\r
+ keepAliveTimer = new java.util.Timer();\r
+\r
+ keepAliveTimer.scheduleAtFixedRate (new TimerTask()\r
+ {\r
+ @Override\r
+ public void run()\r
+ {\r
+ android.app.Instrumentation instrumentation = new android.app.Instrumentation();\r
+\r
+ try\r
+ {\r
+ instrumentation.sendKeyDownUpSync (KeyEvent.KEYCODE_UNKNOWN);\r
+ }\r
+ catch (Exception e)\r
+ {\r
+ }\r
+ }\r
+ }, 2000, 2000);\r
+ }\r
+ }\r
+ }\r
+\r
+ public final boolean getScreenSaver()\r
+ {\r
+ return isScreenSaverEnabled;\r
+ }\r
+\r
+ //==============================================================================\r
+ public final String getClipboardContent()\r
+ {\r
+ ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE);\r
+ return clipboard.getText().toString();\r
+ }\r
+\r
+ public final void setClipboardContent (String newText)\r
+ {\r
+ ClipboardManager clipboard = (ClipboardManager) getSystemService (CLIPBOARD_SERVICE);\r
+ clipboard.setText (newText);\r
+ }\r
+\r
+ //==============================================================================\r
+ public final void showMessageBox (String title, String message, final long callback)\r
+ {\r
+ AlertDialog.Builder builder = new AlertDialog.Builder (this);\r
+ builder.setTitle (title)\r
+ .setMessage (message)\r
+ .setCancelable (true)\r
+ .setOnCancelListener (new DialogInterface.OnCancelListener()\r
+ {\r
+ public void onCancel (DialogInterface dialog)\r
+ {\r
+ DemoRunner.this.alertDismissed (callback, 0);\r
+ }\r
+ })\r
+ .setPositiveButton ("OK", new DialogInterface.OnClickListener()\r
+ {\r
+ public void onClick (DialogInterface dialog, int id)\r
+ {\r
+ dialog.dismiss();\r
+ DemoRunner.this.alertDismissed (callback, 0);\r
+ }\r
+ });\r
+\r
+ builder.create().show();\r
+ }\r
+\r
+ public final void showOkCancelBox (String title, String message, final long callback,\r
+ String okButtonText, String cancelButtonText)\r
+ {\r
+ AlertDialog.Builder builder = new AlertDialog.Builder (this);\r
+ builder.setTitle (title)\r
+ .setMessage (message)\r
+ .setCancelable (true)\r
+ .setOnCancelListener (new DialogInterface.OnCancelListener()\r
+ {\r
+ public void onCancel (DialogInterface dialog)\r
+ {\r
+ DemoRunner.this.alertDismissed (callback, 0);\r
+ }\r
+ })\r
+ .setPositiveButton (okButtonText.isEmpty() ? "OK" : okButtonText, new DialogInterface.OnClickListener()\r
+ {\r
+ public void onClick (DialogInterface dialog, int id)\r
+ {\r
+ dialog.dismiss();\r
+ DemoRunner.this.alertDismissed (callback, 1);\r
+ }\r
+ })\r
+ .setNegativeButton (cancelButtonText.isEmpty() ? "Cancel" : cancelButtonText, new DialogInterface.OnClickListener()\r
+ {\r
+ public void onClick (DialogInterface dialog, int id)\r
+ {\r
+ dialog.dismiss();\r
+ DemoRunner.this.alertDismissed (callback, 0);\r
+ }\r
+ });\r
+\r
+ builder.create().show();\r
+ }\r
+\r
+ public final void showYesNoCancelBox (String title, String message, final long callback)\r
+ {\r
+ AlertDialog.Builder builder = new AlertDialog.Builder (this);\r
+ builder.setTitle (title)\r
+ .setMessage (message)\r
+ .setCancelable (true)\r
+ .setOnCancelListener (new DialogInterface.OnCancelListener()\r
+ {\r
+ public void onCancel (DialogInterface dialog)\r
+ {\r
+ DemoRunner.this.alertDismissed (callback, 0);\r
+ }\r
+ })\r
+ .setPositiveButton ("Yes", new DialogInterface.OnClickListener()\r
+ {\r
+ public void onClick (DialogInterface dialog, int id)\r
+ {\r
+ dialog.dismiss();\r
+ DemoRunner.this.alertDismissed (callback, 1);\r
+ }\r
+ })\r
+ .setNegativeButton ("No", new DialogInterface.OnClickListener()\r
+ {\r
+ public void onClick (DialogInterface dialog, int id)\r
+ {\r
+ dialog.dismiss();\r
+ DemoRunner.this.alertDismissed (callback, 2);\r
+ }\r
+ })\r
+ .setNeutralButton ("Cancel", new DialogInterface.OnClickListener()\r
+ {\r
+ public void onClick (DialogInterface dialog, int id)\r
+ {\r
+ dialog.dismiss();\r
+ DemoRunner.this.alertDismissed (callback, 0);\r
+ }\r
+ });\r
+\r
+ builder.create().show();\r
+ }\r
+\r
+ public native void alertDismissed (long callback, int id);\r
+\r
+ //==============================================================================\r
+ public interface AppPausedResumedListener\r
+ {\r
+ void appPaused();\r
+ void appResumed();\r
+ }\r
+\r
+ private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+ public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.put (new Long (listenerHost), l);\r
+ }\r
+\r
+ public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.remove (new Long (listenerHost));\r
+ }\r
+\r
+ //==============================================================================\r
+ public final class ComponentPeerView extends ViewGroup\r
+ implements View.OnFocusChangeListener, AppPausedResumedListener\r
+ {\r
+ public ComponentPeerView (Context context, boolean opaque_, long host)\r
+ {\r
+ super (context);\r
+ this.host = host;\r
+ setWillNotDraw (false);\r
+ opaque = opaque_;\r
+\r
+ setFocusable (true);\r
+ setFocusableInTouchMode (true);\r
+ setOnFocusChangeListener (this);\r
+\r
+ // swap red and blue colours to match internal opengl texture format\r
+ ColorMatrix colorMatrix = new ColorMatrix();\r
+\r
+ float[] colorTransform = { 0, 0, 1.0f, 0, 0,\r
+ 0, 1.0f, 0, 0, 0,\r
+ 1.0f, 0, 0, 0, 0,\r
+ 0, 0, 0, 1.0f, 0 };\r
+\r
+ colorMatrix.set (colorTransform);\r
+ paint.setColorFilter (new ColorMatrixColorFilter (colorMatrix));\r
+\r
+ java.lang.reflect.Method method = null;\r
+\r
+ try\r
+ {\r
+ method = getClass().getMethod ("setLayerType", int.class, Paint.class);\r
+ }\r
+ catch (SecurityException e) {}\r
+ catch (NoSuchMethodException e) {}\r
+\r
+ if (method != null)\r
+ {\r
+ try\r
+ {\r
+ int layerTypeNone = 0;\r
+ method.invoke (this, layerTypeNone, null);\r
+ }\r
+ catch (java.lang.IllegalArgumentException e) {}\r
+ catch (java.lang.IllegalAccessException e) {}\r
+ catch (java.lang.reflect.InvocationTargetException e) {}\r
+ }\r
+ }\r
+\r
+ //==============================================================================\r
+ private native void handlePaint (long host, Canvas canvas, Paint paint);\r
+\r
+ @Override\r
+ public void onDraw (Canvas canvas)\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ handlePaint (host, canvas, paint);\r
+ }\r
+\r
+ @Override\r
+ public boolean isOpaque()\r
+ {\r
+ return opaque;\r
+ }\r
+\r
+ private boolean opaque;\r
+ private long host;\r
+ private Paint paint = new Paint();\r
+\r
+ //==============================================================================\r
+ private native void handleMouseDown (long host, int index, float x, float y, long time);\r
+ private native void handleMouseDrag (long host, int index, float x, float y, long time);\r
+ private native void handleMouseUp (long host, int index, float x, float y, long time);\r
+\r
+ @Override\r
+ public boolean onTouchEvent (MotionEvent event)\r
+ {\r
+ if (host == 0)\r
+ return false;\r
+\r
+ int action = event.getAction();\r
+ long time = event.getEventTime();\r
+\r
+ switch (action & MotionEvent.ACTION_MASK)\r
+ {\r
+ case MotionEvent.ACTION_DOWN:\r
+ handleMouseDown (host, event.getPointerId(0), event.getX(), event.getY(), time);\r
+ return true;\r
+\r
+ case MotionEvent.ACTION_CANCEL:\r
+ case MotionEvent.ACTION_UP:\r
+ handleMouseUp (host, event.getPointerId(0), event.getX(), event.getY(), time);\r
+ return true;\r
+\r
+ case MotionEvent.ACTION_MOVE:\r
+ {\r
+ int n = event.getPointerCount();\r
+ for (int i = 0; i < n; ++i)\r
+ handleMouseDrag (host, event.getPointerId(i), event.getX(i), event.getY(i), time);\r
+\r
+ return true;\r
+ }\r
+\r
+ case MotionEvent.ACTION_POINTER_UP:\r
+ {\r
+ int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;\r
+ handleMouseUp (host, event.getPointerId(i), event.getX(i), event.getY(i), time);\r
+ return true;\r
+ }\r
+\r
+ case MotionEvent.ACTION_POINTER_DOWN:\r
+ {\r
+ int i = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;\r
+ handleMouseDown (host, event.getPointerId(i), event.getX(i), event.getY(i), time);\r
+ return true;\r
+ }\r
+\r
+ default:\r
+ break;\r
+ }\r
+\r
+ return false;\r
+ }\r
+\r
+ //==============================================================================\r
+ private native void handleKeyDown (long host, int keycode, int textchar);\r
+ private native void handleKeyUp (long host, int keycode, int textchar);\r
+ private native void handleBackButton (long host);\r
+ private native void handleKeyboardHidden (long host);\r
+\r
+ public void showKeyboard (String type)\r
+ {\r
+ InputMethodManager imm = (InputMethodManager) getSystemService (Context.INPUT_METHOD_SERVICE);\r
+\r
+ if (imm != null)\r
+ {\r
+ if (type.length() > 0)\r
+ {\r
+ imm.showSoftInput (this, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT);\r
+ imm.setInputMethod (getWindowToken(), type);\r
+ keyboardDismissListener.startListening();\r
+ }\r
+ else\r
+ {\r
+ imm.hideSoftInputFromWindow (getWindowToken(), 0);\r
+ keyboardDismissListener.stopListening();\r
+ }\r
+ }\r
+ }\r
+\r
+ public void backButtonPressed()\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ handleBackButton (host);\r
+ }\r
+\r
+ @Override\r
+ public boolean onKeyDown (int keyCode, KeyEvent event)\r
+ {\r
+ if (host == 0)\r
+ return false;\r
+\r
+ switch (keyCode)\r
+ {\r
+ case KeyEvent.KEYCODE_VOLUME_UP:\r
+ case KeyEvent.KEYCODE_VOLUME_DOWN:\r
+ return super.onKeyDown (keyCode, event);\r
+ case KeyEvent.KEYCODE_BACK:\r
+ {\r
+ ((Activity) getContext()).onBackPressed();\r
+ return true;\r
+ }\r
+\r
+ default:\r
+ break;\r
+ }\r
+\r
+ handleKeyDown (host, keyCode, event.getUnicodeChar());\r
+ return true;\r
+ }\r
+\r
+ @Override\r
+ public boolean onKeyUp (int keyCode, KeyEvent event)\r
+ {\r
+ if (host == 0)\r
+ return false;\r
+\r
+ handleKeyUp (host, keyCode, event.getUnicodeChar());\r
+ return true;\r
+ }\r
+\r
+ @Override\r
+ public boolean onKeyMultiple (int keyCode, int count, KeyEvent event)\r
+ {\r
+ if (host == 0)\r
+ return false;\r
+\r
+ if (keyCode != KeyEvent.KEYCODE_UNKNOWN || event.getAction() != KeyEvent.ACTION_MULTIPLE)\r
+ return super.onKeyMultiple (keyCode, count, event);\r
+\r
+ if (event.getCharacters() != null)\r
+ {\r
+ int utf8Char = event.getCharacters().codePointAt (0);\r
+ handleKeyDown (host, utf8Char, utf8Char);\r
+ return true;\r
+ }\r
+\r
+ return false;\r
+ }\r
+\r
+ //==============================================================================\r
+ private final class KeyboardDismissListener\r
+ {\r
+ public KeyboardDismissListener (ComponentPeerView viewToUse)\r
+ {\r
+ view = viewToUse;\r
+ }\r
+\r
+ private void startListening()\r
+ {\r
+ view.getViewTreeObserver().addOnGlobalLayoutListener(viewTreeObserver);\r
+ }\r
+\r
+ private void stopListening()\r
+ {\r
+ view.getViewTreeObserver().removeGlobalOnLayoutListener(viewTreeObserver);\r
+ }\r
+\r
+ private class TreeObserver implements ViewTreeObserver.OnGlobalLayoutListener\r
+ {\r
+ TreeObserver()\r
+ {\r
+ keyboardShown = false;\r
+ }\r
+\r
+ @Override\r
+ public void onGlobalLayout()\r
+ {\r
+ Rect r = new Rect();\r
+\r
+ ViewGroup parentView = (ViewGroup) getParent();\r
+\r
+ if (parentView == null)\r
+ return;\r
+\r
+ parentView.getWindowVisibleDisplayFrame (r);\r
+\r
+ int diff = parentView.getHeight() - (r.bottom - r.top);\r
+\r
+ // Arbitrary threshold, surely keyboard would take more than 20 pix.\r
+ if (diff < 20 && keyboardShown)\r
+ {\r
+ keyboardShown = false;\r
+ handleKeyboardHidden (view.host);\r
+ }\r
+\r
+ if (! keyboardShown && diff > 20)\r
+ keyboardShown = true;\r
+ };\r
+\r
+ private boolean keyboardShown;\r
+ };\r
+\r
+ private ComponentPeerView view;\r
+ private TreeObserver viewTreeObserver = new TreeObserver();\r
+ }\r
+\r
+ private KeyboardDismissListener keyboardDismissListener = new KeyboardDismissListener(this);\r
+\r
+ // this is here to make keyboard entry work on a Galaxy Tab2 10.1\r
+ @Override\r
+ public InputConnection onCreateInputConnection (EditorInfo outAttrs)\r
+ {\r
+ outAttrs.actionLabel = "";\r
+ outAttrs.hintText = "";\r
+ outAttrs.initialCapsMode = 0;\r
+ outAttrs.initialSelEnd = outAttrs.initialSelStart = -1;\r
+ outAttrs.label = "";\r
+ outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI;\r
+ outAttrs.inputType = InputType.TYPE_NULL;\r
+\r
+ return new BaseInputConnection (this, false);\r
+ }\r
+\r
+ //==============================================================================\r
+ @Override\r
+ protected void onSizeChanged (int w, int h, int oldw, int oldh)\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ super.onSizeChanged (w, h, oldw, oldh);\r
+ viewSizeChanged (host);\r
+ }\r
+\r
+ @Override\r
+ protected void onLayout (boolean changed, int left, int top, int right, int bottom)\r
+ {\r
+ for (int i = getChildCount(); --i >= 0;)\r
+ requestTransparentRegion (getChildAt (i));\r
+ }\r
+\r
+ private native void viewSizeChanged (long host);\r
+\r
+ @Override\r
+ public void onFocusChange (View v, boolean hasFocus)\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ if (v == this)\r
+ focusChanged (host, hasFocus);\r
+ }\r
+\r
+ private native void focusChanged (long host, boolean hasFocus);\r
+\r
+ public void setViewName (String newName) {}\r
+\r
+ public void setSystemUiVisibilityCompat (int visibility)\r
+ {\r
+ Method systemUIVisibilityMethod = null;\r
+ try\r
+ {\r
+ systemUIVisibilityMethod = this.getClass().getMethod ("setSystemUiVisibility", int.class);\r
+ }\r
+ catch (SecurityException e) { return; }\r
+ catch (NoSuchMethodException e) { return; }\r
+ if (systemUIVisibilityMethod == null) return;\r
+\r
+ try\r
+ {\r
+ systemUIVisibilityMethod.invoke (this, visibility);\r
+ }\r
+ catch (java.lang.IllegalArgumentException e) {}\r
+ catch (java.lang.IllegalAccessException e) {}\r
+ catch (java.lang.reflect.InvocationTargetException e) {}\r
+ }\r
+\r
+ public boolean isVisible() { return getVisibility() == VISIBLE; }\r
+ public void setVisible (boolean b) { setVisibility (b ? VISIBLE : INVISIBLE); }\r
+\r
+ public boolean containsPoint (int x, int y)\r
+ {\r
+ return true; //xxx needs to check overlapping views\r
+ }\r
+\r
+ //==============================================================================\r
+ private native void handleAppPaused (long host);\r
+ private native void handleAppResumed (long host);\r
+\r
+ @Override\r
+ public void appPaused()\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ handleAppPaused (host);\r
+ }\r
+\r
+ @Override\r
+ public void appResumed()\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ // Ensure that navigation/status bar visibility is correctly restored.\r
+ handleAppResumed (host);\r
+ }\r
+ }\r
+\r
+ //==============================================================================\r
+ public static class NativeSurfaceView extends SurfaceView\r
+ implements SurfaceHolder.Callback\r
+ {\r
+ private long nativeContext = 0;\r
+\r
+ NativeSurfaceView (Context context, long nativeContextPtr)\r
+ {\r
+ super (context);\r
+ nativeContext = nativeContextPtr;\r
+ }\r
+\r
+ public Surface getNativeSurface()\r
+ {\r
+ Surface retval = null;\r
+\r
+ SurfaceHolder holder = getHolder();\r
+ if (holder != null)\r
+ retval = holder.getSurface();\r
+\r
+ return retval;\r
+ }\r
+\r
+ //==============================================================================\r
+ @Override\r
+ public void surfaceChanged (SurfaceHolder holder, int format, int width, int height)\r
+ {\r
+ surfaceChangedNative (nativeContext, holder, format, width, height);\r
+ }\r
+\r
+ @Override\r
+ public void surfaceCreated (SurfaceHolder holder)\r
+ {\r
+ surfaceCreatedNative (nativeContext, holder);\r
+ }\r
+\r
+ @Override\r
+ public void surfaceDestroyed (SurfaceHolder holder)\r
+ {\r
+ surfaceDestroyedNative (nativeContext, holder);\r
+ }\r
+\r
+ @Override\r
+ protected void dispatchDraw (Canvas canvas)\r
+ {\r
+ super.dispatchDraw (canvas);\r
+ dispatchDrawNative (nativeContext, canvas);\r
+ }\r
+\r
+ //==============================================================================\r
+ @Override\r
+ protected void onAttachedToWindow ()\r
+ {\r
+ super.onAttachedToWindow();\r
+ getHolder().addCallback (this);\r
+ }\r
+\r
+ @Override\r
+ protected void onDetachedFromWindow ()\r
+ {\r
+ super.onDetachedFromWindow();\r
+ getHolder().removeCallback (this);\r
+ }\r
+\r
+ //==============================================================================\r
+ private native void dispatchDrawNative (long nativeContextPtr, Canvas canvas);\r
+ private native void surfaceCreatedNative (long nativeContextptr, SurfaceHolder holder);\r
+ private native void surfaceDestroyedNative (long nativeContextptr, SurfaceHolder holder);\r
+ private native void surfaceChangedNative (long nativeContextptr, SurfaceHolder holder,\r
+ int format, int width, int height);\r
+ }\r
+\r
+ public NativeSurfaceView createNativeSurfaceView (long nativeSurfacePtr)\r
+ {\r
+ return new NativeSurfaceView (this, nativeSurfacePtr);\r
+ }\r
+\r
+ //==============================================================================\r
+ public final int[] renderGlyph (char glyph1, char glyph2, Paint paint, android.graphics.Matrix matrix, Rect bounds)\r
+ {\r
+ Path p = new Path();\r
+\r
+ char[] str = { glyph1, glyph2 };\r
+ paint.getTextPath (str, 0, (glyph2 != 0 ? 2 : 1), 0.0f, 0.0f, p);\r
+\r
+ RectF boundsF = new RectF();\r
+ p.computeBounds (boundsF, true);\r
+ matrix.mapRect (boundsF);\r
+\r
+ boundsF.roundOut (bounds);\r
+ bounds.left--;\r
+ bounds.right++;\r
+\r
+ final int w = bounds.width();\r
+ final int h = Math.max (1, bounds.height());\r
+\r
+ Bitmap bm = Bitmap.createBitmap (w, h, Bitmap.Config.ARGB_8888);\r
+\r
+ Canvas c = new Canvas (bm);\r
+ matrix.postTranslate (-bounds.left, -bounds.top);\r
+ c.setMatrix (matrix);\r
+ c.drawPath (p, paint);\r
+\r
+ final int sizeNeeded = w * h;\r
+ if (cachedRenderArray.length < sizeNeeded)\r
+ cachedRenderArray = new int [sizeNeeded];\r
+\r
+ bm.getPixels (cachedRenderArray, 0, w, 0, 0, w, h);\r
+ bm.recycle();\r
+ return cachedRenderArray;\r
+ }\r
+\r
+ private int[] cachedRenderArray = new int [256];\r
+\r
+ //==============================================================================\r
+ public static class NativeInvocationHandler implements InvocationHandler\r
+ {\r
+ public NativeInvocationHandler (Activity activityToUse, long nativeContextRef)\r
+ {\r
+ activity = activityToUse;\r
+ nativeContext = nativeContextRef;\r
+ }\r
+\r
+ public void nativeContextDeleted()\r
+ {\r
+ nativeContext = 0;\r
+ }\r
+\r
+ @Override\r
+ public void finalize()\r
+ {\r
+ activity.runOnUiThread (new Runnable()\r
+ {\r
+ @Override\r
+ public void run()\r
+ {\r
+ if (nativeContext != 0)\r
+ dispatchFinalize (nativeContext);\r
+ }\r
+ });\r
+ }\r
+\r
+ @Override\r
+ public Object invoke (Object proxy, Method method, Object[] args) throws Throwable\r
+ {\r
+ return dispatchInvoke (nativeContext, proxy, method, args);\r
+ }\r
+\r
+ //==============================================================================\r
+ Activity activity;\r
+ private long nativeContext = 0;\r
+\r
+ private native void dispatchFinalize (long nativeContextRef);\r
+ private native Object dispatchInvoke (long nativeContextRef, Object proxy, Method method, Object[] args);\r
+ }\r
+\r
+ public InvocationHandler createInvocationHandler (long nativeContextRef)\r
+ {\r
+ return new NativeInvocationHandler (this, nativeContextRef);\r
+ }\r
+\r
+ public void invocationHandlerContextDeleted (InvocationHandler handler)\r
+ {\r
+ ((NativeInvocationHandler) handler).nativeContextDeleted();\r
+ }\r
+\r
+ //==============================================================================\r
+ public static class HTTPStream\r
+ {\r
+ public HTTPStream (String address, boolean isPostToUse, byte[] postDataToUse,\r
+ String headersToUse, int timeOutMsToUse,\r
+ int[] statusCodeToUse, StringBuffer responseHeadersToUse,\r
+ int numRedirectsToFollowToUse, String httpRequestCmdToUse) throws IOException\r
+ {\r
+ isPost = isPostToUse;\r
+ postData = postDataToUse;\r
+ headers = headersToUse;\r
+ timeOutMs = timeOutMsToUse;\r
+ statusCode = statusCodeToUse;\r
+ responseHeaders = responseHeadersToUse;\r
+ totalLength = -1;\r
+ numRedirectsToFollow = numRedirectsToFollowToUse;\r
+ httpRequestCmd = httpRequestCmdToUse;\r
+\r
+ connection = createConnection (address, isPost, postData, headers, timeOutMs, httpRequestCmd);\r
+ }\r
+\r
+ private final HttpURLConnection createConnection (String address, boolean isPost, byte[] postData,\r
+ String headers, int timeOutMs, String httpRequestCmdToUse) throws IOException\r
+ {\r
+ HttpURLConnection newConnection = (HttpURLConnection) (new URL(address).openConnection());\r
+\r
+ try\r
+ {\r
+ newConnection.setInstanceFollowRedirects (false);\r
+ newConnection.setConnectTimeout (timeOutMs);\r
+ newConnection.setReadTimeout (timeOutMs);\r
+\r
+ // headers - if not empty, this string is appended onto the headers that are used for the request. It must therefore be a valid set of HTML header directives, separated by newlines.\r
+ // So convert headers string to an array, with an element for each line\r
+ String headerLines[] = headers.split("\\n");\r
+\r
+ // Set request headers\r
+ for (int i = 0; i < headerLines.length; ++i)\r
+ {\r
+ int pos = headerLines[i].indexOf (":");\r
+\r
+ if (pos > 0 && pos < headerLines[i].length())\r
+ {\r
+ String field = headerLines[i].substring (0, pos);\r
+ String value = headerLines[i].substring (pos + 1);\r
+\r
+ if (value.length() > 0)\r
+ newConnection.setRequestProperty (field, value);\r
+ }\r
+ }\r
+\r
+ newConnection.setRequestMethod (httpRequestCmd);\r
+\r
+ if (isPost)\r
+ {\r
+ newConnection.setDoOutput (true);\r
+\r
+ if (postData != null)\r
+ {\r
+ OutputStream out = newConnection.getOutputStream();\r
+ out.write(postData);\r
+ out.flush();\r
+ }\r
+ }\r
+\r
+ return newConnection;\r
+ }\r
+ catch (Throwable e)\r
+ {\r
+ newConnection.disconnect();\r
+ throw new IOException ("Connection error");\r
+ }\r
+ }\r
+\r
+ private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException\r
+ {\r
+ synchronized (createFutureLock)\r
+ {\r
+ if (hasBeenCancelled.get())\r
+ return null;\r
+\r
+ streamFuture = executor.submit (new Callable<BufferedInputStream>()\r
+ {\r
+ @Override\r
+ public BufferedInputStream call() throws IOException\r
+ {\r
+ return new BufferedInputStream (isInput ? connection.getInputStream()\r
+ : connection.getErrorStream());\r
+ }\r
+ });\r
+ }\r
+\r
+ try\r
+ {\r
+ return streamFuture.get();\r
+ }\r
+ catch (InterruptedException e)\r
+ {\r
+ return null;\r
+ }\r
+ catch (CancellationException e)\r
+ {\r
+ return null;\r
+ }\r
+ }\r
+\r
+ public final boolean connect()\r
+ {\r
+ boolean result = false;\r
+ int numFollowedRedirects = 0;\r
+\r
+ while (true)\r
+ {\r
+ result = doConnect();\r
+\r
+ if (! result)\r
+ return false;\r
+\r
+ if (++numFollowedRedirects > numRedirectsToFollow)\r
+ break;\r
+\r
+ int status = statusCode[0];\r
+\r
+ if (status == 301 || status == 302 || status == 303 || status == 307)\r
+ {\r
+ // Assumes only one occurrence of "Location"\r
+ int pos1 = responseHeaders.indexOf ("Location:") + 10;\r
+ int pos2 = responseHeaders.indexOf ("\n", pos1);\r
+\r
+ if (pos2 > pos1)\r
+ {\r
+ String currentLocation = connection.getURL().toString();\r
+ String newLocation = responseHeaders.substring (pos1, pos2);\r
+\r
+ try\r
+ {\r
+ // Handle newLocation whether it's absolute or relative\r
+ URL baseUrl = new URL (currentLocation);\r
+ URL newUrl = new URL (baseUrl, newLocation);\r
+ String transformedNewLocation = newUrl.toString();\r
+\r
+ if (transformedNewLocation != currentLocation)\r
+ {\r
+ // Clear responseHeaders before next iteration\r
+ responseHeaders.delete (0, responseHeaders.length());\r
+\r
+ synchronized (createStreamLock)\r
+ {\r
+ if (hasBeenCancelled.get())\r
+ return false;\r
+\r
+ connection.disconnect();\r
+\r
+ try\r
+ {\r
+ connection = createConnection (transformedNewLocation, isPost,\r
+ postData, headers, timeOutMs,\r
+ httpRequestCmd);\r
+ }\r
+ catch (Throwable e)\r
+ {\r
+ return false;\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ break;\r
+ }\r
+ }\r
+ catch (Throwable e)\r
+ {\r
+ return false;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ break;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ break;\r
+ }\r
+ }\r
+\r
+ return result;\r
+ }\r
+\r
+ private final boolean doConnect()\r
+ {\r
+ synchronized (createStreamLock)\r
+ {\r
+ if (hasBeenCancelled.get())\r
+ return false;\r
+\r
+ try\r
+ {\r
+ try\r
+ {\r
+ inputStream = getCancellableStream (true);\r
+ }\r
+ catch (ExecutionException e)\r
+ {\r
+ if (connection.getResponseCode() < 400)\r
+ {\r
+ statusCode[0] = connection.getResponseCode();\r
+ connection.disconnect();\r
+ return false;\r
+ }\r
+ }\r
+ finally\r
+ {\r
+ statusCode[0] = connection.getResponseCode();\r
+ }\r
+\r
+ try\r
+ {\r
+ if (statusCode[0] >= 400)\r
+ inputStream = getCancellableStream (false);\r
+ else\r
+ inputStream = getCancellableStream (true);\r
+ }\r
+ catch (ExecutionException e)\r
+ {}\r
+\r
+ for (java.util.Map.Entry<String, java.util.List<String>> entry : connection.getHeaderFields().entrySet())\r
+ {\r
+ if (entry.getKey() != null && entry.getValue() != null)\r
+ {\r
+ responseHeaders.append(entry.getKey() + ": "\r
+ + android.text.TextUtils.join(",", entry.getValue()) + "\n");\r
+\r
+ if (entry.getKey().compareTo ("Content-Length") == 0)\r
+ totalLength = Integer.decode (entry.getValue().get (0));\r
+ }\r
+ }\r
+\r
+ return true;\r
+ }\r
+ catch (IOException e)\r
+ {\r
+ return false;\r
+ }\r
+ }\r
+ }\r
+\r
+ static class DisconnectionRunnable implements Runnable\r
+ {\r
+ public DisconnectionRunnable (HttpURLConnection theConnection,\r
+ InputStream theInputStream,\r
+ ReentrantLock theCreateStreamLock,\r
+ Object theCreateFutureLock,\r
+ Future<BufferedInputStream> theStreamFuture)\r
+ {\r
+ connectionToDisconnect = theConnection;\r
+ inputStream = theInputStream;\r
+ createStreamLock = theCreateStreamLock;\r
+ createFutureLock = theCreateFutureLock;\r
+ streamFuture = theStreamFuture;\r
+ }\r
+\r
+ public void run()\r
+ {\r
+ try\r
+ {\r
+ if (! createStreamLock.tryLock())\r
+ {\r
+ synchronized (createFutureLock)\r
+ {\r
+ if (streamFuture != null)\r
+ streamFuture.cancel (true);\r
+ }\r
+\r
+ createStreamLock.lock();\r
+ }\r
+\r
+ if (connectionToDisconnect != null)\r
+ connectionToDisconnect.disconnect();\r
+\r
+ if (inputStream != null)\r
+ inputStream.close();\r
+ }\r
+ catch (IOException e)\r
+ {}\r
+ finally\r
+ {\r
+ createStreamLock.unlock();\r
+ }\r
+ }\r
+\r
+ private HttpURLConnection connectionToDisconnect;\r
+ private InputStream inputStream;\r
+ private ReentrantLock createStreamLock;\r
+ private Object createFutureLock;\r
+ Future<BufferedInputStream> streamFuture;\r
+ }\r
+\r
+ public final void release()\r
+ {\r
+ DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection,\r
+ inputStream,\r
+ createStreamLock,\r
+ createFutureLock,\r
+ streamFuture);\r
+\r
+ synchronized (createStreamLock)\r
+ {\r
+ hasBeenCancelled.set (true);\r
+\r
+ connection = null;\r
+ }\r
+\r
+ Thread disconnectionThread = new Thread(disconnectionRunnable);\r
+ disconnectionThread.start();\r
+ }\r
+\r
+ public final int read (byte[] buffer, int numBytes)\r
+ {\r
+ int num = 0;\r
+\r
+ try\r
+ {\r
+ synchronized (createStreamLock)\r
+ {\r
+ if (inputStream != null)\r
+ num = inputStream.read (buffer, 0, numBytes);\r
+ }\r
+ }\r
+ catch (IOException e)\r
+ {}\r
+\r
+ if (num > 0)\r
+ position += num;\r
+\r
+ return num;\r
+ }\r
+\r
+ public final long getPosition() { return position; }\r
+ public final long getTotalLength() { return totalLength; }\r
+ public final boolean isExhausted() { return false; }\r
+ public final boolean setPosition (long newPos) { return false; }\r
+\r
+ private boolean isPost;\r
+ private byte[] postData;\r
+ private String headers;\r
+ private int timeOutMs;\r
+ String httpRequestCmd;\r
+ private HttpURLConnection connection;\r
+ private int[] statusCode;\r
+ private StringBuffer responseHeaders;\r
+ private int totalLength;\r
+ private int numRedirectsToFollow;\r
+ private InputStream inputStream;\r
+ private long position;\r
+ private final ReentrantLock createStreamLock = new ReentrantLock();\r
+ private final Object createFutureLock = new Object();\r
+ private AtomicBoolean hasBeenCancelled = new AtomicBoolean();\r
+\r
+ private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory());\r
+ Future<BufferedInputStream> streamFuture;\r
+ }\r
+\r
+ public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData,\r
+ String headers, int timeOutMs, int[] statusCode,\r
+ StringBuffer responseHeaders, int numRedirectsToFollow,\r
+ String httpRequestCmd)\r
+ {\r
+ // timeout parameter of zero for HttpUrlConnection is a blocking connect (negative value for juce::URL)\r
+ if (timeOutMs < 0)\r
+ timeOutMs = 0;\r
+ else if (timeOutMs == 0)\r
+ timeOutMs = 30000;\r
+\r
+ for (;;)\r
+ {\r
+ try\r
+ {\r
+ HTTPStream httpStream = new HTTPStream (address, isPost, postData, headers,\r
+ timeOutMs, statusCode, responseHeaders,\r
+ numRedirectsToFollow, httpRequestCmd);\r
+\r
+ return httpStream;\r
+ }\r
+ catch (Throwable e) {}\r
+\r
+ return null;\r
+ }\r
+ }\r
+\r
+ public final void launchURL (String url)\r
+ {\r
+ startActivity (new Intent (Intent.ACTION_VIEW, Uri.parse (url)));\r
+ }\r
+\r
+ private native boolean webViewPageLoadStarted (long host, WebView view, String url);\r
+ private native void webViewPageLoadFinished (long host, WebView view, String url);\r
+ private native void webViewReceivedError (long host, WebView view, WebResourceRequest request, WebResourceError error); private native void webViewReceivedHttpError (long host, WebView view, WebResourceRequest request, WebResourceResponse errorResponse); private native void webViewReceivedSslError (long host, WebView view, SslErrorHandler handler, SslError error);\r
+ private native void webViewCloseWindowRequest (long host, WebView view);\r
+ private native void webViewCreateWindowRequest (long host, WebView view);\r
+\r
+ //==============================================================================\r
+ public class JuceWebViewClient extends WebViewClient\r
+ {\r
+ public JuceWebViewClient (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ public void hostDeleted()\r
+ {\r
+ synchronized (hostLock)\r
+ {\r
+ host = 0;\r
+ }\r
+ }\r
+\r
+ @Override\r
+ public void onPageFinished (WebView view, String url)\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ webViewPageLoadFinished (host, view, url);\r
+ }\r
+\r
+ @Override\r
+ public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error)\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ webViewReceivedSslError (host, view, handler, error);\r
+ }\r
+\r
+ @Override\r
+ public void onReceivedError (WebView view, WebResourceRequest request, WebResourceError error)\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ webViewReceivedError (host, view, request, error);\r
+ }\r
+\r
+ @Override\r
+ public void onReceivedHttpError (WebView view, WebResourceRequest request, WebResourceResponse errorResponse)\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ webViewReceivedHttpError (host, view, request, errorResponse);\r
+ }\r
+\r
+ @Override\r
+ public WebResourceResponse shouldInterceptRequest (WebView view, WebResourceRequest request)\r
+ {\r
+ synchronized (hostLock)\r
+ {\r
+ if (host != 0)\r
+ {\r
+ boolean shouldLoad = webViewPageLoadStarted (host, view, request.getUrl().toString());\r
+\r
+ if (shouldLoad)\r
+ return null;\r
+ }\r
+ }\r
+\r
+ return new WebResourceResponse ("text/html", null, null);\r
+ }\r
+\r
+ private long host;\r
+ private final Object hostLock = new Object();\r
+ }\r
+\r
+ public class JuceWebChromeClient extends WebChromeClient\r
+ {\r
+ public JuceWebChromeClient (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onCloseWindow (WebView window)\r
+ {\r
+ webViewCloseWindowRequest (host, window);\r
+ }\r
+\r
+ @Override\r
+ public boolean onCreateWindow (WebView view, boolean isDialog,\r
+ boolean isUserGesture, Message resultMsg)\r
+ {\r
+ webViewCreateWindowRequest (host, view);\r
+ return false;\r
+ }\r
+\r
+ private long host;\r
+ private final Object hostLock = new Object();\r
+ }\r
+\r
+\r
+ //==============================================================================\r
+ public class CameraDeviceStateCallback extends CameraDevice.StateCallback\r
+ {\r
+ private native void cameraDeviceStateClosed (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateError (long host, CameraDevice camera, int error);\r
+ private native void cameraDeviceStateOpened (long host, CameraDevice camera);\r
+\r
+ CameraDeviceStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateClosed (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onDisconnected (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateDisconnected (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onError (CameraDevice camera, int error)\r
+ {\r
+ cameraDeviceStateError (host, camera, error);\r
+ }\r
+\r
+ @Override\r
+ public void onOpened (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateOpened (host, camera);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback\r
+ {\r
+ private native void cameraCaptureSessionActive (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionReady (long host, CameraCaptureSession session);\r
+\r
+ CameraCaptureSessionStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onActive (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionActive (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionClosed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigureFailed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigureFailed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigured (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigured (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onReady (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionReady (host, session);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback\r
+ {\r
+ private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result);\r
+ private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure);\r
+ private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult);\r
+ private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber);\r
+ private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+ private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+\r
+ CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+ {\r
+ host = hostToUse;\r
+ preview = shouldBePreview;\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+ TotalCaptureResult result)\r
+ {\r
+ cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+ {\r
+ cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+ CaptureResult partialResult)\r
+ {\r
+ cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+ long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+ }\r
+\r
+ private long host;\r
+ private boolean preview;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class JuceOrientationEventListener extends OrientationEventListener\r
+ {\r
+ private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+ public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+ {\r
+ super (context, rate);\r
+\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onOrientationChanged (int orientation)\r
+ {\r
+ deviceOrientationChanged (host, orientation);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+\r
+ //==============================================================================\r
+ public static final String getLocaleValue (boolean isRegion)\r
+ {\r
+ java.util.Locale locale = java.util.Locale.getDefault();\r
+\r
+ return isRegion ? locale.getCountry()\r
+ : locale.getLanguage();\r
+ }\r
+\r
+ private static final String getFileLocation (String type)\r
+ {\r
+ return Environment.getExternalStoragePublicDirectory (type).getAbsolutePath();\r
+ }\r
+\r
+ public static final String getDocumentsFolder()\r
+ {\r
+ if (getAndroidSDKVersion() >= 19)\r
+ return getFileLocation ("Documents");\r
+\r
+ return Environment.getDataDirectory().getAbsolutePath();\r
+ }\r
+\r
+ public static final String getPicturesFolder() { return getFileLocation (Environment.DIRECTORY_PICTURES); }\r
+ public static final String getMusicFolder() { return getFileLocation (Environment.DIRECTORY_MUSIC); }\r
+ public static final String getMoviesFolder() { return getFileLocation (Environment.DIRECTORY_MOVIES); }\r
+ public static final String getDownloadsFolder() { return getFileLocation (Environment.DIRECTORY_DOWNLOADS); }\r
+\r
+ //==============================================================================\r
+ @Override\r
+ protected void onActivityResult (int requestCode, int resultCode, Intent data)\r
+ {\r
+ appActivityResult (requestCode, resultCode, data);\r
+ }\r
+\r
+ @Override\r
+ protected void onNewIntent (Intent intent)\r
+ {\r
+ super.onNewIntent(intent);\r
+ setIntent(intent);\r
+\r
+ appNewIntent (intent);\r
+ }\r
+\r
+ //==============================================================================\r
+ public final Typeface getTypeFaceFromAsset (String assetName)\r
+ {\r
+ try\r
+ {\r
+ return Typeface.createFromAsset (this.getResources().getAssets(), assetName);\r
+ }\r
+ catch (Throwable e) {}\r
+\r
+ return null;\r
+ }\r
+\r
+ final protected static char[] hexArray = "0123456789ABCDEF".toCharArray();\r
+\r
+ public static String bytesToHex (byte[] bytes)\r
+ {\r
+ char[] hexChars = new char[bytes.length * 2];\r
+\r
+ for (int j = 0; j < bytes.length; ++j)\r
+ {\r
+ int v = bytes[j] & 0xff;\r
+ hexChars[j * 2] = hexArray[v >>> 4];\r
+ hexChars[j * 2 + 1] = hexArray[v & 0x0f];\r
+ }\r
+\r
+ return new String (hexChars);\r
+ }\r
+\r
+ final private java.util.Map dataCache = new java.util.HashMap();\r
+\r
+ synchronized private final File getDataCacheFile (byte[] data)\r
+ {\r
+ try\r
+ {\r
+ java.security.MessageDigest digest = java.security.MessageDigest.getInstance ("MD5");\r
+ digest.update (data);\r
+\r
+ String key = bytesToHex (digest.digest());\r
+\r
+ if (dataCache.containsKey (key))\r
+ return (File) dataCache.get (key);\r
+\r
+ File f = new File (this.getCacheDir(), "bindata_" + key);\r
+ f.delete();\r
+ FileOutputStream os = new FileOutputStream (f);\r
+ os.write (data, 0, data.length);\r
+ dataCache.put (key, f);\r
+ return f;\r
+ }\r
+ catch (Throwable e) {}\r
+\r
+ return null;\r
+ }\r
+\r
+ private final void clearDataCache()\r
+ {\r
+ java.util.Iterator it = dataCache.values().iterator();\r
+\r
+ while (it.hasNext())\r
+ {\r
+ File f = (File) it.next();\r
+ f.delete();\r
+ }\r
+ }\r
+\r
+ public final Typeface getTypeFaceFromByteArray (byte[] data)\r
+ {\r
+ try\r
+ {\r
+ File f = getDataCacheFile (data);\r
+\r
+ if (f != null)\r
+ return Typeface.createFromFile (f);\r
+ }\r
+ catch (Exception e)\r
+ {\r
+ Log.e ("JUCE", e.toString());\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+ public static final int getAndroidSDKVersion()\r
+ {\r
+ return android.os.Build.VERSION.SDK_INT;\r
+ }\r
+\r
+ public final String audioManagerGetProperty (String property)\r
+ {\r
+ Object obj = getSystemService (AUDIO_SERVICE);\r
+ if (obj == null)\r
+ return null;\r
+\r
+ java.lang.reflect.Method method;\r
+\r
+ try\r
+ {\r
+ method = obj.getClass().getMethod ("getProperty", String.class);\r
+ }\r
+ catch (SecurityException e) { return null; }\r
+ catch (NoSuchMethodException e) { return null; }\r
+\r
+ if (method == null)\r
+ return null;\r
+\r
+ try\r
+ {\r
+ return (String) method.invoke (obj, property);\r
+ }\r
+ catch (java.lang.IllegalArgumentException e) {}\r
+ catch (java.lang.IllegalAccessException e) {}\r
+ catch (java.lang.reflect.InvocationTargetException e) {}\r
+\r
+ return null;\r
+ }\r
+\r
+ public final boolean hasSystemFeature (String property)\r
+ {\r
+ return getPackageManager().hasSystemFeature (property);\r
+ }\r
+}\r
--- /dev/null
+package com.juce.demorunner;\r
+\r
+import android.content.ContentProvider;\r
+import android.content.ContentValues;\r
+import android.content.res.AssetFileDescriptor;\r
+import android.content.res.Resources;\r
+import android.database.Cursor;\r
+import android.database.MatrixCursor;\r
+import android.net.Uri;\r
+import android.os.FileObserver;\r
+import android.os.ParcelFileDescriptor;\r
+import java.lang.String;\r
+\r
+public final class SharingContentProvider extends ContentProvider\r
+{\r
+ private Object lock = new Object();\r
+\r
+ private native void contentSharerFileObserverEvent (long host, int event, String path);\r
+\r
+ private native Cursor contentSharerQuery (Uri uri, String[] projection, String selection,\r
+ String[] selectionArgs, String sortOrder);\r
+\r
+ private native void contentSharerCursorClosed (long host);\r
+\r
+ private native AssetFileDescriptor contentSharerOpenFile (Uri uri, String mode);\r
+ private native String[] contentSharerGetStreamTypes (Uri uri, String mimeTypeFilter);\r
+\r
+ public final class ProviderFileObserver extends FileObserver\r
+ {\r
+ public ProviderFileObserver (long hostToUse, String path, int mask)\r
+ {\r
+ super (path, mask);\r
+\r
+ host = hostToUse;\r
+ }\r
+\r
+ public void onEvent (int event, String path)\r
+ {\r
+ contentSharerFileObserverEvent (host, event, path);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ public final class ProviderCursor extends MatrixCursor\r
+ {\r
+ ProviderCursor (long hostToUse, String[] columnNames)\r
+ {\r
+ super (columnNames);\r
+\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void close()\r
+ {\r
+ super.close();\r
+\r
+ contentSharerCursorClosed (host);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ @Override\r
+ public boolean onCreate()\r
+ {\r
+ return true;\r
+ }\r
+\r
+ @Override\r
+ public Cursor query (Uri url, String[] projection, String selection,\r
+ String[] selectionArgs, String sortOrder)\r
+ {\r
+ synchronized (lock)\r
+ {\r
+ return contentSharerQuery (url, projection, selection, selectionArgs, sortOrder);\r
+ }\r
+ }\r
+\r
+ @Override\r
+ public Uri insert (Uri uri, ContentValues values)\r
+ {\r
+ return null;\r
+ }\r
+\r
+ @Override\r
+ public int update (Uri uri, ContentValues values, String selection,\r
+ String[] selectionArgs)\r
+ {\r
+ return 0;\r
+ }\r
+\r
+ @Override\r
+ public int delete (Uri uri, String selection, String[] selectionArgs)\r
+ {\r
+ return 0;\r
+ }\r
+\r
+ @Override\r
+ public String getType (Uri uri)\r
+ {\r
+ return null;\r
+ }\r
+\r
+ @Override\r
+ public AssetFileDescriptor openAssetFile (Uri uri, String mode)\r
+ {\r
+ synchronized (lock)\r
+ {\r
+ return contentSharerOpenFile (uri, mode);\r
+ }\r
+ }\r
+\r
+ @Override\r
+ public ParcelFileDescriptor openFile (Uri uri, String mode)\r
+ {\r
+ synchronized (lock)\r
+ {\r
+ AssetFileDescriptor result = contentSharerOpenFile (uri, mode);\r
+\r
+ if (result != null)\r
+ return result.getParcelFileDescriptor();\r
+\r
+ return null;\r
+ }\r
+ }\r
+\r
+ @Override\r
+ public String[] getStreamTypes (Uri uri, String mimeTypeFilter)\r
+ {\r
+ synchronized (lock)\r
+ {\r
+ return contentSharerGetStreamTypes (uri, mimeTypeFilter);\r
+ }\r
+ }\r
+\r
+}\r
import android.content.res.Configuration;\r
import android.content.pm.PackageInfo;\r
import android.content.pm.PackageManager;\r
+import android.hardware.camera2.*;\r
import android.net.http.SslError;\r
import android.net.Uri;\r
import android.os.Bundle;\r
private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+ private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
\r
private static String getAndroidPermissionName (int permissionID)\r
{\r
// use string value as this is not defined in SDKs < 16\r
case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE";\r
case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+ case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA;\r
}\r
\r
// unknown permission ID!\r
setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
\r
permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+ appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
}\r
\r
@Override\r
{\r
suspendApp();\r
\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appPaused();\r
+\r
try\r
{\r
Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
super.onResume();\r
resumeApp();\r
\r
- // Ensure that navigation/status bar visibility is correctly restored.\r
- for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
- {\r
- if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
- ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
- }\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appResumed();\r
}\r
\r
@Override\r
{\r
ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
viewHolder.addView (v);\r
+ addAppPausedResumedListener (v, host);\r
return v;\r
}\r
\r
public final void deleteView (ComponentPeerView view)\r
{\r
+ removeAppPausedResumedListener (view, view.host);\r
+\r
view.host = 0;\r
\r
ViewGroup group = (ViewGroup) (view.getParent());\r
\r
public native void alertDismissed (long callback, int id);\r
\r
+ //==============================================================================\r
+ public interface AppPausedResumedListener\r
+ {\r
+ void appPaused();\r
+ void appResumed();\r
+ }\r
+\r
+ private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+ public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.put (new Long (listenerHost), l);\r
+ }\r
+\r
+ public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.remove (new Long (listenerHost));\r
+ }\r
+\r
//==============================================================================\r
public final class ComponentPeerView extends ViewGroup\r
- implements View.OnFocusChangeListener\r
+ implements View.OnFocusChangeListener, AppPausedResumedListener\r
{\r
public ComponentPeerView (Context context, boolean opaque_, long host)\r
{\r
}\r
\r
//==============================================================================\r
+ private native void handleAppPaused (long host);\r
private native void handleAppResumed (long host);\r
\r
+ @Override\r
+ public void appPaused()\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ handleAppPaused (host);\r
+ }\r
+\r
+ @Override\r
public void appResumed()\r
{\r
if (host == 0)\r
return;\r
\r
+ // Ensure that navigation/status bar visibility is correctly restored.\r
handleAppResumed (host);\r
}\r
}\r
private final Object hostLock = new Object();\r
}\r
\r
+\r
+ //==============================================================================\r
+ public class CameraDeviceStateCallback extends CameraDevice.StateCallback\r
+ {\r
+ private native void cameraDeviceStateClosed (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateError (long host, CameraDevice camera, int error);\r
+ private native void cameraDeviceStateOpened (long host, CameraDevice camera);\r
+\r
+ CameraDeviceStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateClosed (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onDisconnected (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateDisconnected (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onError (CameraDevice camera, int error)\r
+ {\r
+ cameraDeviceStateError (host, camera, error);\r
+ }\r
+\r
+ @Override\r
+ public void onOpened (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateOpened (host, camera);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback\r
+ {\r
+ private native void cameraCaptureSessionActive (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionReady (long host, CameraCaptureSession session);\r
+\r
+ CameraCaptureSessionStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onActive (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionActive (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionClosed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigureFailed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigureFailed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigured (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigured (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onReady (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionReady (host, session);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback\r
+ {\r
+ private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session,\r
+ CaptureRequest request, TotalCaptureResult result);\r
+ private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session,\r
+ CaptureRequest request, CaptureFailure failure);\r
+ private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session,\r
+ CaptureRequest request, CaptureResult partialResult);\r
+ private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+ private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+ private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request,\r
+ long timestamp, long frameNumber);\r
+\r
+ CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+ {\r
+ host = hostToUse;\r
+ preview = shouldBePreview;\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+ TotalCaptureResult result)\r
+ {\r
+ cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+ {\r
+ cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+ CaptureResult partialResult)\r
+ {\r
+ cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+ long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+ }\r
+\r
+ private long host;\r
+ private boolean preview;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class JuceOrientationEventListener extends OrientationEventListener\r
+ {\r
+ private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+ public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+ {\r
+ super (context, rate);\r
+\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onOrientationChanged (int orientation)\r
+ {\r
+ deviceOrientationChanged (host, orientation);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+\r
//==============================================================================\r
public static final String getLocaleValue (boolean isRegion)\r
{\r
TARGET_ARCH := -march=native\r
endif\r
\r
- JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.1 -DJUCE_APP_VERSION_HEX=0x50301 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
+ JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.2 -DJUCE_APP_VERSION_HEX=0x50302 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
JUCE_TARGET_APP := DemoRunner\r
\r
TARGET_ARCH := -march=native\r
endif\r
\r
- JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.1 -DJUCE_APP_VERSION_HEX=0x50301 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
+ JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.2 -DJUCE_APP_VERSION_HEX=0x50302 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
JUCE_TARGET_APP := DemoRunner\r
\r
objectVersion = 46;
objects = {
- 5665A011C7D125C8890D3260 = {isa = PBXBuildFile; fileRef = B953F5C249804F38B818AD2F; };
- C8D093204643DE75CAA41A3F = {isa = PBXBuildFile; fileRef = E622C086CB768052D799CB95; };
- 7286A5BB489F25E6E3CF63D4 = {isa = PBXBuildFile; fileRef = A70E204AA2B7B904F9C08770; };
- B6AB4CB9F0A0AD540028A3E1 = {isa = PBXBuildFile; fileRef = F10017EB39A3981DF2FFC565; };
- 71F90E5ABB1112D2D92EAB59 = {isa = PBXBuildFile; fileRef = 61BF1C5B6EB2C49337A028E7; };
- 30F8D005CCE03386DF30747F = {isa = PBXBuildFile; fileRef = 9647BC3EC0BFC192CD7D0643; };
- C3ECBDFA83E3472AC36AAB1E = {isa = PBXBuildFile; fileRef = A65A103C9FA300E4AEF04066; };
- AB53895F1E4193A2C9B51DB6 = {isa = PBXBuildFile; fileRef = 5AB31D4FDB61420CFE50FD52; };
- 2EF15A7E6ECFD861D719276A = {isa = PBXBuildFile; fileRef = BE800C80B08E6D722CACB487; };
- 9318D1152DE35146100C7594 = {isa = PBXBuildFile; fileRef = 95C3EC76835BB2151FA94A67; };
- 3AB93979B46C801A20E974C3 = {isa = PBXBuildFile; fileRef = 6D190D5FCC9592AB2135AC75; };
- 4A58CC8B8AEEF166B0E47D37 = {isa = PBXBuildFile; fileRef = BC2C11F10F5D2FB30550C95A; };
- 271D3EB069D6E01D56460721 = {isa = PBXBuildFile; fileRef = DB13FF3C61C11971D3D61C9B; };
- 3D2D1CCFB4B682162034225E = {isa = PBXBuildFile; fileRef = 6142F838E6568F8450BC93DB; };
- AA910CD1304B21E21D30A37E = {isa = PBXBuildFile; fileRef = 8EACCB8CF4A520630C49BF8A; };
- 83BBBA16872A378CE2E35A9D = {isa = PBXBuildFile; fileRef = 8AC905F72A76E7D7275201A4; };
- F657E50CA75FE6932E710CB0 = {isa = PBXBuildFile; fileRef = 2945A953347C882A8294DF82; };
- F9EDB3A8F55A4499441401D6 = {isa = PBXBuildFile; fileRef = AE5650194191C6A04F0B5685; };
- EACB962CC04BDC0369264A8F = {isa = PBXBuildFile; fileRef = 48A8B50CEB577DF7D3FCEFEC; };
- 557BA8FDD37630DF5EB84EE0 = {isa = PBXBuildFile; fileRef = 5FE974D1CE11D7658D57C580; };
- 5CFCACD6AF608BDC2E1E8BD1 = {isa = PBXBuildFile; fileRef = E40C7EC0CD57D5F92EC9C806; };
- 9263171BCE90616A9F350405 = {isa = PBXBuildFile; fileRef = 56280EAEBEAF619C3E98B5C6; };
- 2EF49BC29DA0951B1C43070F = {isa = PBXBuildFile; fileRef = 27FB5D78BF900B70101B3E48; };
- 8861132DCB0DE3F9EB0DD278 = {isa = PBXBuildFile; fileRef = BD545E9E8BA9D67A673AC8E8; };
- CCDAEA12C17058099252FD3D = {isa = PBXBuildFile; fileRef = 44B4D9F7DBB239B6E57BC2E7; };
- 28778136A8C09DBDC980CB72 = {isa = PBXBuildFile; fileRef = 2CC2281747C1FE9EB940BD1A; };
- DA696766645C964870153095 = {isa = PBXBuildFile; fileRef = F996277A397F3F21763BAC03; };
- 8F5FE1B5D44F55667509BC99 = {isa = PBXBuildFile; fileRef = 91195E76A94C136774686D97; };
- 3656169644FED0C525D5D30C = {isa = PBXBuildFile; fileRef = 3290EFAFF391EE790FF33FB9; };
- 2763512B6DFF68C0EEF72496 = {isa = PBXBuildFile; fileRef = 46A8BE3E064F7E01EF1E2D2D; };
- 480F45A17B4E83A26B1ACEF9 = {isa = PBXBuildFile; fileRef = 1442C6A9928B564A86D1597A; };
- 3D8EECDED13F0A46A6FA8D3E = {isa = PBXBuildFile; fileRef = 9A35450231D4C3F4DCF16AB3; };
- E433C1C591D091AF71AD528E = {isa = PBXBuildFile; fileRef = 55479FCC6DB5293B12918CBA; };
- A5F8F9904580960794429360 = {isa = PBXBuildFile; fileRef = 9733178D30027A7CC3E12510; };
- B298295E61E5DD800B814DAF = {isa = PBXBuildFile; fileRef = 7445067DFFF67F28456DA9B0; };
- A7E206DD280DC58E2A150642 = {isa = PBXBuildFile; fileRef = 1EF8C1691168417E42DF81ED; };
- 26260D259EFF13BD5044CD34 = {isa = PBXBuildFile; fileRef = 120B5B68C50C2992969E9CE1; };
- 591D5799ED6524DE9BD846D7 = {isa = PBXBuildFile; fileRef = 0996038E1E70A6ADD233418D; };
- D09859BDBC491A9932637715 = {isa = PBXBuildFile; fileRef = 96FE3B2079CA29C6C2F5E2F2; };
- 7EC8A06F9290B16DFB16E346 = {isa = PBXBuildFile; fileRef = A477616D8A134C6E99C2BE9D; };
- 33C96917E46535D30B17B483 = {isa = PBXBuildFile; fileRef = 5F79F2C9508D0D7F5A6BF62D; };
- 8AA7BB967216BDBFF0371267 = {isa = PBXBuildFile; fileRef = 6B2332953FCDD3BD197E149A; };
- FD5B59B8A0B8258531421E60 = {isa = PBXBuildFile; fileRef = F4AB4BBB26E536232D27BE83; };
- 0996038E1E70A6ADD233418D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; };
- 09AFF79B4D5593574507F03E = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; };
- 0D328B4591EBFD9997C61535 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_product_unlocking"; path = "../../../../modules/juce_product_unlocking"; sourceTree = "SOURCE_ROOT"; };
- 120B5B68C50C2992969E9CE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
- 1442C6A9928B564A86D1597A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_box2d.cpp"; path = "../../JuceLibraryCode/include_juce_box2d.cpp"; sourceTree = "SOURCE_ROOT"; };
- 18C1EBA9CB73E8E7389BBDCC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
- 191B33D36B749639B0FBE856 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/UI/MainComponent.h; sourceTree = "SOURCE_ROOT"; };
- 1EF8C1691168417E42DF81ED = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
- 27FB5D78BF900B70101B3E48 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; };
- 2945A953347C882A8294DF82 = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = "SOURCE_ROOT"; };
- 2CC2281747C1FE9EB940BD1A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; };
- 3290EFAFF391EE790FF33FB9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; };
- 3384C796C682AF43B57B42F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JUCEDemos.h; path = ../../Source/Demos/JUCEDemos.h; sourceTree = "SOURCE_ROOT"; };
- 44B4D9F7DBB239B6E57BC2E7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; };
- 46A8BE3E064F7E01EF1E2D2D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_blocks_basics.cpp"; path = "../../JuceLibraryCode/include_juce_blocks_basics.cpp"; sourceTree = "SOURCE_ROOT"; };
- 47623ED30F98E053C07A9B11 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; };
- 483FAD2B91F1B2A248684D8D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; };
- 48A8B50CEB577DF7D3FCEFEC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs2.cpp; path = ../../Source/Demos/DemoPIPs2.cpp; sourceTree = "SOURCE_ROOT"; };
- 497F44004821C9FDC0B1A337 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DemoContentComponent.h; path = ../../Source/UI/DemoContentComponent.h; sourceTree = "SOURCE_ROOT"; };
- 4B2E65945C61CDD81D945CC3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_analytics"; path = "../../../../modules/juce_analytics"; sourceTree = "SOURCE_ROOT"; };
- 531F8760E51457787457AC3D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; };
- 53ED8C56ECA0B933135E6ED5 = {isa = PBXFileReference; lastKnownFileType = image.png; name = JUCEAppIcon.png; path = ../../Source/JUCEAppIcon.png; sourceTree = "SOURCE_ROOT"; };
- 55479FCC6DB5293B12918CBA = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_cryptography.mm"; path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
- 56280EAEBEAF619C3E98B5C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/UI/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; };
- 5AB31D4FDB61420CFE50FD52 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
- 5F79F2C9508D0D7F5A6BF62D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; };
- 5FE974D1CE11D7658D57C580 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = "SOURCE_ROOT"; };
- 6142F838E6568F8450BC93DB = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
- 61BF1C5B6EB2C49337A028E7 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
- 62B6BD963ACD31048A939441 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; };
- 6B2332953FCDD3BD197E149A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_product_unlocking.mm"; path = "../../JuceLibraryCode/include_juce_product_unlocking.mm"; sourceTree = "SOURCE_ROOT"; };
- 6D190D5FCC9592AB2135AC75 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; };
- 7445067DFFF67F28456DA9B0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; };
- 74E8AB27C5B4246DA0590820 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IntroScreen.h; path = ../../Source/Demos/IntroScreen.h; sourceTree = "SOURCE_ROOT"; };
- 8AC905F72A76E7D7275201A4 = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = "SOURCE_ROOT"; };
- 8DA81A2479F1EF4B1064E3A0 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; };
- 8EACCB8CF4A520630C49BF8A = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
- 91195E76A94C136774686D97 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
- 95C3EC76835BB2151FA94A67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
- 9647BC3EC0BFC192CD7D0643 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
- 96FE3B2079CA29C6C2F5E2F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; };
- 9733178D30027A7CC3E12510 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
- 9A35450231D4C3F4DCF16AB3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; };
- 9A974BD82436ED647B457D0B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; };
- 9AA6843063F8D624808AA5FF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_blocks_basics"; path = "../../../../modules/juce_blocks_basics"; sourceTree = "SOURCE_ROOT"; };
- 9D3C18C7CD24710A9D88CACB = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_osc"; path = "../../../../modules/juce_osc"; sourceTree = "SOURCE_ROOT"; };
- A075E4A80B931C9431786CB4 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; };
- A477616D8A134C6E99C2BE9D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; };
- A65A103C9FA300E4AEF04066 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
- A70E204AA2B7B904F9C08770 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
- AE309D5EC9B20A17B819B264 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; };
- AE5650194191C6A04F0B5685 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs1.cpp; path = ../../Source/Demos/DemoPIPs1.cpp; sourceTree = "SOURCE_ROOT"; };
- AE80AC9B628F8B74C6F1F29E = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; };
- B953F5C249804F38B818AD2F = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoRunner.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
- BC2C11F10F5D2FB30550C95A = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
- BD545E9E8BA9D67A673AC8E8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_analytics.cpp"; path = "../../JuceLibraryCode/include_juce_analytics.cpp"; sourceTree = "SOURCE_ROOT"; };
- BE800C80B08E6D722CACB487 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
- BF3AA167B271DBCB79CE3510 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; };
- D869E1D6485900AB3406AF03 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SettingsContent.h; path = ../../Source/UI/SettingsContent.h; sourceTree = "SOURCE_ROOT"; };
- D93CFD2601C0E84D357B7959 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; };
- DB13FF3C61C11971D3D61C9B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
- E40C7EC0CD57D5F92EC9C806 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoContentComponent.cpp; path = ../../Source/UI/DemoContentComponent.cpp; sourceTree = "SOURCE_ROOT"; };
- E4A1F27BDB0FEAB8FD971583 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_box2d"; path = "../../../../modules/juce_box2d"; sourceTree = "SOURCE_ROOT"; };
- E5CF2486265244CD996876FE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
- E622C086CB768052D799CB95 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
- ECFF9E66EC18BEAEF2B6C686 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; };
- F10017EB39A3981DF2FFC565 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
- F124B2F09BEA556820420758 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; };
- F3C0C37FD6A1BBBB6588D182 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; };
- F4AB4BBB26E536232D27BE83 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; };
- F6E40DCC3B84C97202B9CC21 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_cryptography"; path = "../../../../modules/juce_cryptography"; sourceTree = "SOURCE_ROOT"; };
- F996277A397F3F21763BAC03 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; };
- 5F0F17E75142C9F8EC4F9EA8 = {isa = PBXGroup; children = (
- AE5650194191C6A04F0B5685,
- 48A8B50CEB577DF7D3FCEFEC,
- 74E8AB27C5B4246DA0590820,
- 5FE974D1CE11D7658D57C580,
- 3384C796C682AF43B57B42F2, ); name = Demos; sourceTree = "<group>"; };
- C69C98BDBD8901865A10D03D = {isa = PBXGroup; children = (
- E40C7EC0CD57D5F92EC9C806,
- 497F44004821C9FDC0B1A337,
- 56280EAEBEAF619C3E98B5C6,
- 191B33D36B749639B0FBE856,
- D869E1D6485900AB3406AF03, ); name = UI; sourceTree = "<group>"; };
- 29499B4E21D547DC19E2AF25 = {isa = PBXGroup; children = (
- 5F0F17E75142C9F8EC4F9EA8,
- C69C98BDBD8901865A10D03D,
- 27FB5D78BF900B70101B3E48,
- 53ED8C56ECA0B933135E6ED5, ); name = Source; sourceTree = "<group>"; };
- 927472CBD503E38DD7E37090 = {isa = PBXGroup; children = (
- 29499B4E21D547DC19E2AF25, ); name = DemoRunner; sourceTree = "<group>"; };
- 178FF737E5519A4D16208DEB = {isa = PBXGroup; children = (
- 4B2E65945C61CDD81D945CC3,
- BF3AA167B271DBCB79CE3510,
- 62B6BD963ACD31048A939441,
- A075E4A80B931C9431786CB4,
- AE309D5EC9B20A17B819B264,
- 09AFF79B4D5593574507F03E,
- 9AA6843063F8D624808AA5FF,
- E4A1F27BDB0FEAB8FD971583,
- D93CFD2601C0E84D357B7959,
- F6E40DCC3B84C97202B9CC21,
- 9A974BD82436ED647B457D0B,
- 47623ED30F98E053C07A9B11,
- AE80AC9B628F8B74C6F1F29E,
- 483FAD2B91F1B2A248684D8D,
- F124B2F09BEA556820420758,
- F3C0C37FD6A1BBBB6588D182,
- 531F8760E51457787457AC3D,
- 9D3C18C7CD24710A9D88CACB,
- 0D328B4591EBFD9997C61535,
- ECFF9E66EC18BEAEF2B6C686, ); name = "JUCE Modules"; sourceTree = "<group>"; };
- 16DD35D8533EE0BA94AAFBF8 = {isa = PBXGroup; children = (
- 18C1EBA9CB73E8E7389BBDCC,
- BD545E9E8BA9D67A673AC8E8,
- 44B4D9F7DBB239B6E57BC2E7,
- 2CC2281747C1FE9EB940BD1A,
- F996277A397F3F21763BAC03,
- 91195E76A94C136774686D97,
- 3290EFAFF391EE790FF33FB9,
- 46A8BE3E064F7E01EF1E2D2D,
- 1442C6A9928B564A86D1597A,
- 9A35450231D4C3F4DCF16AB3,
- 55479FCC6DB5293B12918CBA,
- 9733178D30027A7CC3E12510,
- 7445067DFFF67F28456DA9B0,
- 1EF8C1691168417E42DF81ED,
- 120B5B68C50C2992969E9CE1,
- 0996038E1E70A6ADD233418D,
- 96FE3B2079CA29C6C2F5E2F2,
- A477616D8A134C6E99C2BE9D,
- 5F79F2C9508D0D7F5A6BF62D,
- 6B2332953FCDD3BD197E149A,
- F4AB4BBB26E536232D27BE83,
- E5CF2486265244CD996876FE, ); name = "JUCE Library Code"; sourceTree = "<group>"; };
- FEE1C6574320FAB66F0238D2 = {isa = PBXGroup; children = (
- 8DA81A2479F1EF4B1064E3A0,
- 8AC905F72A76E7D7275201A4,
- 2945A953347C882A8294DF82, ); name = Resources; sourceTree = "<group>"; };
- 17F11FE561BD8D6EB93B64D4 = {isa = PBXGroup; children = (
- E622C086CB768052D799CB95,
- A70E204AA2B7B904F9C08770,
- F10017EB39A3981DF2FFC565,
- 61BF1C5B6EB2C49337A028E7,
- 9647BC3EC0BFC192CD7D0643,
- A65A103C9FA300E4AEF04066,
- 5AB31D4FDB61420CFE50FD52,
- BE800C80B08E6D722CACB487,
- 95C3EC76835BB2151FA94A67,
- 6D190D5FCC9592AB2135AC75,
- BC2C11F10F5D2FB30550C95A,
- DB13FF3C61C11971D3D61C9B,
- 6142F838E6568F8450BC93DB,
- 8EACCB8CF4A520630C49BF8A, ); name = Frameworks; sourceTree = "<group>"; };
- 532CECDAA91A39864E7FFF80 = {isa = PBXGroup; children = (
- B953F5C249804F38B818AD2F, ); name = Products; sourceTree = "<group>"; };
- 9979C8B054ED17C9E04C6BAB = {isa = PBXGroup; children = (
- 927472CBD503E38DD7E37090,
- 178FF737E5519A4D16208DEB,
- 16DD35D8533EE0BA94AAFBF8,
- FEE1C6574320FAB66F0238D2,
- 17F11FE561BD8D6EB93B64D4,
- 532CECDAA91A39864E7FFF80, ); name = Source; sourceTree = "<group>"; };
- CEC200AA273D1626F466FC27 = {isa = XCBuildConfiguration; buildSettings = {
+ 63A2F309E55DAC206E9B97E3 = {isa = PBXBuildFile; fileRef = CFF2BBEB242CC8B3B904B5F9; };
+ 48CF0B02E1D06E5DA51E6270 = {isa = PBXBuildFile; fileRef = A04E4408525F24F7DCBA000E; };
+ 163B0CF2DD0990A63DF1D5A6 = {isa = PBXBuildFile; fileRef = 470C3E4553B513FFEF752779; };
+ 7B4163348896EB1B86B15160 = {isa = PBXBuildFile; fileRef = DC192EFA899E6CBE6B5CD394; };
+ 8C0AEA08A71075A6C765AEC9 = {isa = PBXBuildFile; fileRef = 3B99CF94C44E2EE04635A439; };
+ 89BC6E2354102D975E08E918 = {isa = PBXBuildFile; fileRef = 440D507FD8F31DB62B1F95C7; };
+ 9F15FD7A7CE83CFD98F07D59 = {isa = PBXBuildFile; fileRef = 02A2ED58B066B4D119F67913; };
+ 1351A13E78F38741C6075600 = {isa = PBXBuildFile; fileRef = 4F0A137A4115946A346180E6; };
+ 46071CE2B98B562B7BF27CB1 = {isa = PBXBuildFile; fileRef = 1CFE3935A3B810D5D68A2504; };
+ 6A61CBB4E39BFD392D97528F = {isa = PBXBuildFile; fileRef = 61AE09C749B007B70A265D9B; };
+ 9BEA1428416CE06BF72FBAB8 = {isa = PBXBuildFile; fileRef = 3DC90DA86565B0356B6E5E0B; };
+ 8584640341100008744861A5 = {isa = PBXBuildFile; fileRef = 71A91516AFD980FEE694C0E1; };
+ 028383D0577D0236899D8CA5 = {isa = PBXBuildFile; fileRef = 40BD06D4AB0D2C73E936A2F1; };
+ B1981F62F6A91FD2F579A198 = {isa = PBXBuildFile; fileRef = 23CD1A3F9067C3A0ECE7BB67; };
+ 89AD16514B1F4133FFEA1DF9 = {isa = PBXBuildFile; fileRef = 96D99A08027CA35D6A4E5CFD; };
+ D3D8CDCE42E8BE31C7247E38 = {isa = PBXBuildFile; fileRef = 0ECB4FCD24794CE516792552; };
+ 3B3952A9A14320312EF890A5 = {isa = PBXBuildFile; fileRef = 388A8209DBB1B08594266121; };
+ 41BAB55E0D992708EF06E2C4 = {isa = PBXBuildFile; fileRef = 5CD17151385A69F1E07FE85B; };
+ 1BA301E39E29966719B710A1 = {isa = PBXBuildFile; fileRef = 9EBAEBBD9093CB005D1692F2; };
+ E33E8FE2E7F8EC8EB4279F1B = {isa = PBXBuildFile; fileRef = 7B3243C92248D379A0489AA4; };
+ 91CD2BCE4CA07E18229EB436 = {isa = PBXBuildFile; fileRef = 9672FCE6167ADB567A9EB2F8; };
+ 75DB074DBAE04408A0A917B7 = {isa = PBXBuildFile; fileRef = E0A3F113BC27B7B4D6F1D693; };
+ E6F58FC3ACAE774DB4D06420 = {isa = PBXBuildFile; fileRef = 3AB62BFF806112585B54DDA3; };
+ 36E115D98311F12AA06710E6 = {isa = PBXBuildFile; fileRef = 061AECBF1CC7056F4155812D; };
+ B38728296BB32B7994CE28DF = {isa = PBXBuildFile; fileRef = 934ACDCB3FD9D223A3481D8F; };
+ 71DF4F5EB4C8305688416725 = {isa = PBXBuildFile; fileRef = E5BFC17E682AB426D203B3E6; };
+ 4FBBB55F4E347757F74F1F41 = {isa = PBXBuildFile; fileRef = 25E5ED33876A2C752378C859; };
+ F619F3887CEC064441BB6EE6 = {isa = PBXBuildFile; fileRef = 260481E972425474BB8155B0; };
+ C2BB2B6DA237FE0CB64C7EDA = {isa = PBXBuildFile; fileRef = 5965349393850F41DF76F350; };
+ F28112945CEBEA4CE8975833 = {isa = PBXBuildFile; fileRef = 03B0F9318FD583525AB195A9; };
+ 9EACEA6BE8D0ACC72C12C080 = {isa = PBXBuildFile; fileRef = 03A63C3CA6F24977F19C316D; };
+ 26652AB1BB77C8A39434775F = {isa = PBXBuildFile; fileRef = E061A1C75FA5722167FC4997; };
+ 2707968B431D83AC7E28E49B = {isa = PBXBuildFile; fileRef = E67AB94002886AF67437D6AE; };
+ 712D81867EC698463252FA79 = {isa = PBXBuildFile; fileRef = EDDA01B246C6128CAF7A2914; };
+ 49E7BBD46981F0035E4E9021 = {isa = PBXBuildFile; fileRef = 831A01C745C905F5715CD822; };
+ 611298FAC1A543BDD10D4C41 = {isa = PBXBuildFile; fileRef = 4DF215D350FFE5E119CBA7E5; };
+ D183F8140174ACCDDCD230A2 = {isa = PBXBuildFile; fileRef = 3BC9753E0CD75A36DC742EE0; };
+ FF87532E62753EDFA3D29CAD = {isa = PBXBuildFile; fileRef = 6C5E26B4D28F8450435B8AE1; };
+ 2F76CA28C8C0EFC7453D0EB8 = {isa = PBXBuildFile; fileRef = F5F2EA2238973488632FC322; };
+ 6B5560283DEEBD6DD2D6C984 = {isa = PBXBuildFile; fileRef = C1E93FAF6C68A40A664422CD; };
+ 1DBDFEDE359CFC84F8E3DE4C = {isa = PBXBuildFile; fileRef = FCD0D758C5767944BEC29730; };
+ CDABEA6258EC70C65C9ACCFE = {isa = PBXBuildFile; fileRef = 3E4ED41C374261CFFD309743; };
+ E2F44A968EC2598DAE33A997 = {isa = PBXBuildFile; fileRef = A1D6D36B96B6B37C31F32829; };
+ 5CB78489F16E82144914972D = {isa = PBXBuildFile; fileRef = 979F23EA9E5E76131299E886; };
+ BC6036F22423CA0AFF0385A7 = {isa = PBXBuildFile; fileRef = 94B6C88FE30861A47CD28709; };
+ AEA090DAC5C747C50C7D3FA7 = {isa = PBXBuildFile; fileRef = CE38E6469D98462A2C22C915; };
+ CDEB6BA5341494AF51D07C72 = {isa = PBXBuildFile; fileRef = 0AB68DBAB6B7DAEDDDD5B683; };
+ 0140787C0118A95E37DE90B4 = {isa = PBXBuildFile; fileRef = 9144821E003E15E4042B57DB; };
+ 02A2ED58B066B4D119F67913 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ 03A63C3CA6F24977F19C316D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; };
+ 03B0F9318FD583525AB195A9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; };
+ 061AECBF1CC7056F4155812D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs2.cpp; path = ../../Source/Demos/DemoPIPs2.cpp; sourceTree = "SOURCE_ROOT"; };
+ 0AB68DBAB6B7DAEDDDD5B683 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_product_unlocking.mm"; path = "../../JuceLibraryCode/include_juce_product_unlocking.mm"; sourceTree = "SOURCE_ROOT"; };
+ 0B36C013D9790568B481634C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; };
+ 0ECB4FCD24794CE516792552 = {isa = PBXFileReference; lastKnownFileType = folder; name = Audio; path = ../../../Audio; sourceTree = "<group>"; };
+ 112FFCB73597157E721BCDF2 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_analytics"; path = "../../../../modules/juce_analytics"; sourceTree = "SOURCE_ROOT"; };
+ 14CBD28B4887DAF89E27491C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_cryptography"; path = "../../../../modules/juce_cryptography"; sourceTree = "SOURCE_ROOT"; };
+ 1CFE3935A3B810D5D68A2504 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+ 1FCD2145DE3FCFCF4F55A8AD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DemoContentComponent.h; path = ../../Source/UI/DemoContentComponent.h; sourceTree = "SOURCE_ROOT"; };
+ 23CD1A3F9067C3A0ECE7BB67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+ 25E5ED33876A2C752378C859 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/UI/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+ 260481E972425474BB8155B0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; };
+ 346450C70C964FD9640B6086 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; };
+ 388A8209DBB1B08594266121 = {isa = PBXFileReference; lastKnownFileType = folder; name = BLOCKS; path = ../../../BLOCKS; sourceTree = "<group>"; };
+ 3AB62BFF806112585B54DDA3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs1.cpp; path = ../../Source/Demos/DemoPIPs1.cpp; sourceTree = "SOURCE_ROOT"; };
+ 3B99CF94C44E2EE04635A439 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
+ 3BC9753E0CD75A36DC742EE0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; };
+ 3DC90DA86565B0356B6E5E0B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; };
+ 3E4ED41C374261CFFD309743 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
+ 40BD06D4AB0D2C73E936A2F1 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
+ 440D507FD8F31DB62B1F95C7 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
+ 470C3E4553B513FFEF752779 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ 491641F7632BCC81BBA0ED85 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; };
+ 4DF215D350FFE5E119CBA7E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_box2d.cpp"; path = "../../JuceLibraryCode/include_juce_box2d.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 4E9AD0EAF3CA57B548622D9A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
+ 4EC2782DE1779A130835B64D = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; };
+ 4F0A137A4115946A346180E6 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+ 4FE6029FF76BCE9698595DC5 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_product_unlocking"; path = "../../../../modules/juce_product_unlocking"; sourceTree = "SOURCE_ROOT"; };
+ 5965349393850F41DF76F350 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_analytics.cpp"; path = "../../JuceLibraryCode/include_juce_analytics.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 5A9F2000C66D24E8B01BE60B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; };
+ 5CD17151385A69F1E07FE85B = {isa = PBXFileReference; lastKnownFileType = folder; name = DSP; path = ../../../DSP; sourceTree = "<group>"; };
+ 60F2869DC345EAF2314D6C09 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; };
+ 61AE09C749B007B70A265D9B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
+ 651ECE3C7BA845DDCFEE48F3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_osc"; path = "../../../../modules/juce_osc"; sourceTree = "SOURCE_ROOT"; };
+ 6847A9B2C5E3C2ED56D8D4E7 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; };
+ 6C198AF93E1F6E682189E2F6 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; };
+ 6C2C1AC86623F457427965EF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_box2d"; path = "../../../../modules/juce_box2d"; sourceTree = "SOURCE_ROOT"; };
+ 6C5E26B4D28F8450435B8AE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_cryptography.mm"; path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
+ 71A91516AFD980FEE694C0E1 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
+ 72129757D2A553B90A7157C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
+ 7A5AAE9EE573FC6105CC4AAC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SettingsContent.h; path = ../../Source/UI/SettingsContent.h; sourceTree = "SOURCE_ROOT"; };
+ 7B3243C92248D379A0489AA4 = {isa = PBXFileReference; lastKnownFileType = folder; name = Utilities; path = ../../../Utilities; sourceTree = "<group>"; };
+ 831A01C745C905F5715CD822 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_blocks_basics.cpp"; path = "../../JuceLibraryCode/include_juce_blocks_basics.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 8CE533D611CD0984AD028D73 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; };
+ 903CD4126C779884797EF915 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; };
+ 9144821E003E15E4042B57DB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; };
+ 934ACDCB3FD9D223A3481D8F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = "SOURCE_ROOT"; };
+ 94B6C88FE30861A47CD28709 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; };
+ 9672FCE6167ADB567A9EB2F8 = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = "SOURCE_ROOT"; };
+ 96D99A08027CA35D6A4E5CFD = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
+ 979F23EA9E5E76131299E886 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; };
+ 9EBAEBBD9093CB005D1692F2 = {isa = PBXFileReference; lastKnownFileType = folder; name = GUI; path = ../../../GUI; sourceTree = "<group>"; };
+ A04E4408525F24F7DCBA000E = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
+ A1D6D36B96B6B37C31F32829 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; };
+ A5256778E2EBD206B337B555 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; };
+ A6F555BE0DDF01C285BD8BF5 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; };
+ A9315F8368A5771EC39631CB = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; };
+ B2BC383CE102EECCF49C7AF7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IntroScreen.h; path = ../../Source/Demos/IntroScreen.h; sourceTree = "SOURCE_ROOT"; };
+ C1E93FAF6C68A40A664422CD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; };
+ CE38E6469D98462A2C22C915 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; };
+ CFF2BBEB242CC8B3B904B5F9 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoRunner.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
+ D018D636A4DC9BEA11720129 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_blocks_basics"; path = "../../../../modules/juce_blocks_basics"; sourceTree = "SOURCE_ROOT"; };
+ DC192EFA899E6CBE6B5CD394 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+ E061A1C75FA5722167FC4997 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; };
+ E0A3F113BC27B7B4D6F1D693 = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = "SOURCE_ROOT"; };
+ E5BFC17E682AB426D203B3E6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoContentComponent.cpp; path = ../../Source/UI/DemoContentComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+ E67AB94002886AF67437D6AE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
+ EB68BD1224CD9748BFA332C0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/UI/MainComponent.h; sourceTree = "SOURCE_ROOT"; };
+ ECE79F1433E92BB6213C86F5 = {isa = PBXFileReference; lastKnownFileType = image.png; name = JUCEAppIcon.png; path = ../../Source/JUCEAppIcon.png; sourceTree = "SOURCE_ROOT"; };
+ EDDA01B246C6128CAF7A2914 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; };
+ EE6BDC78B539D27E65E92265 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JUCEDemos.h; path = ../../Source/Demos/JUCEDemos.h; sourceTree = "SOURCE_ROOT"; };
+ F5F2EA2238973488632FC322 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
+ FB1FC613CE260140F1CFD21B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; };
+ FCD0D758C5767944BEC29730 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
+ FDC3CA8D1403C169659F7D8C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; };
+ CD575607FAA297480EE95F13 = {isa = PBXGroup; children = (
+ 3AB62BFF806112585B54DDA3,
+ 061AECBF1CC7056F4155812D,
+ B2BC383CE102EECCF49C7AF7,
+ 934ACDCB3FD9D223A3481D8F,
+ EE6BDC78B539D27E65E92265, ); name = Demos; sourceTree = "<group>"; };
+ BB12537403CC24C02622582C = {isa = PBXGroup; children = (
+ E5BFC17E682AB426D203B3E6,
+ 1FCD2145DE3FCFCF4F55A8AD,
+ 25E5ED33876A2C752378C859,
+ EB68BD1224CD9748BFA332C0,
+ 7A5AAE9EE573FC6105CC4AAC, ); name = UI; sourceTree = "<group>"; };
+ 6F933968486D9AD9FE112622 = {isa = PBXGroup; children = (
+ CD575607FAA297480EE95F13,
+ BB12537403CC24C02622582C,
+ 260481E972425474BB8155B0,
+ ECE79F1433E92BB6213C86F5, ); name = Source; sourceTree = "<group>"; };
+ 9683F931FA1B8B85FA8C4BD8 = {isa = PBXGroup; children = (
+ 6F933968486D9AD9FE112622, ); name = DemoRunner; sourceTree = "<group>"; };
+ 5A0B2CEF393A25C6D4B1B76C = {isa = PBXGroup; children = (
+ 112FFCB73597157E721BCDF2,
+ 6847A9B2C5E3C2ED56D8D4E7,
+ 60F2869DC345EAF2314D6C09,
+ 491641F7632BCC81BBA0ED85,
+ 346450C70C964FD9640B6086,
+ 0B36C013D9790568B481634C,
+ D018D636A4DC9BEA11720129,
+ 6C2C1AC86623F457427965EF,
+ 903CD4126C779884797EF915,
+ 14CBD28B4887DAF89E27491C,
+ FDC3CA8D1403C169659F7D8C,
+ A6F555BE0DDF01C285BD8BF5,
+ FB1FC613CE260140F1CFD21B,
+ 8CE533D611CD0984AD028D73,
+ 5A9F2000C66D24E8B01BE60B,
+ A9315F8368A5771EC39631CB,
+ 6C198AF93E1F6E682189E2F6,
+ 651ECE3C7BA845DDCFEE48F3,
+ 4FE6029FF76BCE9698595DC5,
+ A5256778E2EBD206B337B555, ); name = "JUCE Modules"; sourceTree = "<group>"; };
+ 61F3057D838D7DABB0FA3D34 = {isa = PBXGroup; children = (
+ 72129757D2A553B90A7157C6,
+ 5965349393850F41DF76F350,
+ 03B0F9318FD583525AB195A9,
+ 03A63C3CA6F24977F19C316D,
+ E061A1C75FA5722167FC4997,
+ E67AB94002886AF67437D6AE,
+ EDDA01B246C6128CAF7A2914,
+ 831A01C745C905F5715CD822,
+ 4DF215D350FFE5E119CBA7E5,
+ 3BC9753E0CD75A36DC742EE0,
+ 6C5E26B4D28F8450435B8AE1,
+ F5F2EA2238973488632FC322,
+ C1E93FAF6C68A40A664422CD,
+ FCD0D758C5767944BEC29730,
+ 3E4ED41C374261CFFD309743,
+ A1D6D36B96B6B37C31F32829,
+ 979F23EA9E5E76131299E886,
+ 94B6C88FE30861A47CD28709,
+ CE38E6469D98462A2C22C915,
+ 0AB68DBAB6B7DAEDDDD5B683,
+ 9144821E003E15E4042B57DB,
+ 4E9AD0EAF3CA57B548622D9A, ); name = "JUCE Library Code"; sourceTree = "<group>"; };
+ D87DCD5DA4EC8D78DFF37FCC = {isa = PBXGroup; children = (
+ 0ECB4FCD24794CE516792552,
+ 388A8209DBB1B08594266121,
+ 5CD17151385A69F1E07FE85B,
+ 9EBAEBBD9093CB005D1692F2,
+ 7B3243C92248D379A0489AA4,
+ 4EC2782DE1779A130835B64D,
+ 9672FCE6167ADB567A9EB2F8,
+ E0A3F113BC27B7B4D6F1D693, ); name = Resources; sourceTree = "<group>"; };
+ 4452EAA652B65A9AE648288C = {isa = PBXGroup; children = (
+ A04E4408525F24F7DCBA000E,
+ 470C3E4553B513FFEF752779,
+ DC192EFA899E6CBE6B5CD394,
+ 3B99CF94C44E2EE04635A439,
+ 440D507FD8F31DB62B1F95C7,
+ 02A2ED58B066B4D119F67913,
+ 4F0A137A4115946A346180E6,
+ 1CFE3935A3B810D5D68A2504,
+ 61AE09C749B007B70A265D9B,
+ 3DC90DA86565B0356B6E5E0B,
+ 71A91516AFD980FEE694C0E1,
+ 40BD06D4AB0D2C73E936A2F1,
+ 23CD1A3F9067C3A0ECE7BB67,
+ 96D99A08027CA35D6A4E5CFD, ); name = Frameworks; sourceTree = "<group>"; };
+ BFDAF16175D03695EEB466BC = {isa = PBXGroup; children = (
+ CFF2BBEB242CC8B3B904B5F9, ); name = Products; sourceTree = "<group>"; };
+ 91A9A0FE9DF4F4E10009EEC7 = {isa = PBXGroup; children = (
+ 9683F931FA1B8B85FA8C4BD8,
+ 5A0B2CEF393A25C6D4B1B76C,
+ 61F3057D838D7DABB0FA3D34,
+ D87DCD5DA4EC8D78DFF37FCC,
+ 4452EAA652B65A9AE648288C,
+ BFDAF16175D03695EEB466BC, ); name = Source; sourceTree = "<group>"; };
+ B18D059E5616FA729F764229 = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
"JUCE_DEMO_RUNNER=1",
"JUCE_UNIT_TESTS=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
- "JUCE_APP_VERSION=5.3.1",
- "JUCE_APP_VERSION_HEX=0x50301",
+ "JUCE_APP_VERSION=5.3.2",
+ "JUCE_APP_VERSION_HEX=0x50302",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code";
- PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.demorunner;
+ PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner;
SDKROOT_ppc = macosx10.5;
USE_HEADERMAP = NO; }; name = Debug; };
- 878F062DF0F2D968EC322CF4 = {isa = XCBuildConfiguration; buildSettings = {
+ 69330F27DD2C71609336C7D2 = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
"JUCE_DEMO_RUNNER=1",
"JUCE_UNIT_TESTS=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
- "JUCE_APP_VERSION=5.3.1",
- "JUCE_APP_VERSION_HEX=0x50301",
+ "JUCE_APP_VERSION=5.3.2",
+ "JUCE_APP_VERSION_HEX=0x50302",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code";
- PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.demorunner;
+ PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner;
SDKROOT_ppc = macosx10.5;
USE_HEADERMAP = NO; }; name = Release; };
- 49CDF00877DBD03D2C6D7313 = {isa = XCBuildConfiguration; buildSettings = {
+ C01EC82F42B640CA1E54AD53 = {isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
PRODUCT_NAME = "DemoRunner";
WARNING_CFLAGS = -Wreorder;
ZERO_LINK = NO; }; name = Debug; };
- 4CADE461B4B845777C2F3084 = {isa = XCBuildConfiguration; buildSettings = {
+ 07EA85D22270E8EA13CA0BBE = {isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
PRODUCT_NAME = "DemoRunner";
WARNING_CFLAGS = -Wreorder;
ZERO_LINK = NO; }; name = Release; };
- 82C712E3A2B72D3FE08871AB = {isa = PBXTargetDependency; target = AF4A5EF10D3A095A9074F9CF; };
- F63BE64D6F90B83AFFFBC14F = {isa = XCConfigurationList; buildConfigurations = (
- 49CDF00877DBD03D2C6D7313,
- 4CADE461B4B845777C2F3084, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
- 77311CC6EFE85E7117AD3242 = {isa = XCConfigurationList; buildConfigurations = (
- CEC200AA273D1626F466FC27,
- 878F062DF0F2D968EC322CF4, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
- 2077585B61D41BDA5967E25C = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (
- 83BBBA16872A378CE2E35A9D,
- F657E50CA75FE6932E710CB0, ); runOnlyForDeploymentPostprocessing = 0; };
- 7C6E2E57520A67ACFE86097B = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (
- F9EDB3A8F55A4499441401D6,
- EACB962CC04BDC0369264A8F,
- 557BA8FDD37630DF5EB84EE0,
- 5CFCACD6AF608BDC2E1E8BD1,
- 9263171BCE90616A9F350405,
- 2EF49BC29DA0951B1C43070F,
- 8861132DCB0DE3F9EB0DD278,
- CCDAEA12C17058099252FD3D,
- 28778136A8C09DBDC980CB72,
- DA696766645C964870153095,
- 8F5FE1B5D44F55667509BC99,
- 3656169644FED0C525D5D30C,
- 2763512B6DFF68C0EEF72496,
- 480F45A17B4E83A26B1ACEF9,
- 3D8EECDED13F0A46A6FA8D3E,
- E433C1C591D091AF71AD528E,
- A5F8F9904580960794429360,
- B298295E61E5DD800B814DAF,
- A7E206DD280DC58E2A150642,
- 26260D259EFF13BD5044CD34,
- 591D5799ED6524DE9BD846D7,
- D09859BDBC491A9932637715,
- 7EC8A06F9290B16DFB16E346,
- 33C96917E46535D30B17B483,
- 8AA7BB967216BDBFF0371267,
- FD5B59B8A0B8258531421E60, ); runOnlyForDeploymentPostprocessing = 0; };
- FB8E53AB54C36DCB3C3FC501 = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (
- C8D093204643DE75CAA41A3F,
- 7286A5BB489F25E6E3CF63D4,
- B6AB4CB9F0A0AD540028A3E1,
- 71F90E5ABB1112D2D92EAB59,
- 30F8D005CCE03386DF30747F,
- C3ECBDFA83E3472AC36AAB1E,
- AB53895F1E4193A2C9B51DB6,
- 2EF15A7E6ECFD861D719276A,
- 9318D1152DE35146100C7594,
- 3AB93979B46C801A20E974C3,
- 4A58CC8B8AEEF166B0E47D37,
- 271D3EB069D6E01D56460721,
- 3D2D1CCFB4B682162034225E,
- AA910CD1304B21E21D30A37E, ); runOnlyForDeploymentPostprocessing = 0; };
- AF4A5EF10D3A095A9074F9CF = {isa = PBXNativeTarget; buildConfigurationList = 77311CC6EFE85E7117AD3242; buildPhases = (
- 2077585B61D41BDA5967E25C,
- 7C6E2E57520A67ACFE86097B,
- FB8E53AB54C36DCB3C3FC501, ); buildRules = ( ); dependencies = ( ); name = "DemoRunner - App"; productName = DemoRunner; productReference = B953F5C249804F38B818AD2F; productType = "com.apple.product-type.application"; };
- 15C553274AB25531D0A16FBE = {isa = PBXProject; buildConfigurationList = F63BE64D6F90B83AFFFBC14F; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { AF4A5EF10D3A095A9074F9CF = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9979C8B054ED17C9E04C6BAB; projectDirPath = ""; projectRoot = ""; targets = (AF4A5EF10D3A095A9074F9CF); };
+ D87BAF6D1A7451B7A733B5F1 = {isa = PBXTargetDependency; target = 291E01DCBE746A376DBFA4D1; };
+ 80E8AD1971F52B06F4D28891 = {isa = XCConfigurationList; buildConfigurations = (
+ C01EC82F42B640CA1E54AD53,
+ 07EA85D22270E8EA13CA0BBE, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
+ 413FBEAEC84DFEC41133C78B = {isa = XCConfigurationList; buildConfigurations = (
+ B18D059E5616FA729F764229,
+ 69330F27DD2C71609336C7D2, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
+ 57134FDD813875865F5B2057 = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (
+ D3D8CDCE42E8BE31C7247E38,
+ 3B3952A9A14320312EF890A5,
+ 41BAB55E0D992708EF06E2C4,
+ 1BA301E39E29966719B710A1,
+ E33E8FE2E7F8EC8EB4279F1B,
+ 91CD2BCE4CA07E18229EB436,
+ 75DB074DBAE04408A0A917B7, ); runOnlyForDeploymentPostprocessing = 0; };
+ ED916866997CA4F40C7C1016 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (
+ E6F58FC3ACAE774DB4D06420,
+ 36E115D98311F12AA06710E6,
+ B38728296BB32B7994CE28DF,
+ 71DF4F5EB4C8305688416725,
+ 4FBBB55F4E347757F74F1F41,
+ F619F3887CEC064441BB6EE6,
+ C2BB2B6DA237FE0CB64C7EDA,
+ F28112945CEBEA4CE8975833,
+ 9EACEA6BE8D0ACC72C12C080,
+ 26652AB1BB77C8A39434775F,
+ 2707968B431D83AC7E28E49B,
+ 712D81867EC698463252FA79,
+ 49E7BBD46981F0035E4E9021,
+ 611298FAC1A543BDD10D4C41,
+ D183F8140174ACCDDCD230A2,
+ FF87532E62753EDFA3D29CAD,
+ 2F76CA28C8C0EFC7453D0EB8,
+ 6B5560283DEEBD6DD2D6C984,
+ 1DBDFEDE359CFC84F8E3DE4C,
+ CDABEA6258EC70C65C9ACCFE,
+ E2F44A968EC2598DAE33A997,
+ 5CB78489F16E82144914972D,
+ BC6036F22423CA0AFF0385A7,
+ AEA090DAC5C747C50C7D3FA7,
+ CDEB6BA5341494AF51D07C72,
+ 0140787C0118A95E37DE90B4, ); runOnlyForDeploymentPostprocessing = 0; };
+ 4B1F6E32C9FC8D779B21C1AF = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (
+ 48CF0B02E1D06E5DA51E6270,
+ 163B0CF2DD0990A63DF1D5A6,
+ 7B4163348896EB1B86B15160,
+ 8C0AEA08A71075A6C765AEC9,
+ 89BC6E2354102D975E08E918,
+ 9F15FD7A7CE83CFD98F07D59,
+ 1351A13E78F38741C6075600,
+ 46071CE2B98B562B7BF27CB1,
+ 6A61CBB4E39BFD392D97528F,
+ 9BEA1428416CE06BF72FBAB8,
+ 8584640341100008744861A5,
+ 028383D0577D0236899D8CA5,
+ B1981F62F6A91FD2F579A198,
+ 89AD16514B1F4133FFEA1DF9, ); runOnlyForDeploymentPostprocessing = 0; };
+ 291E01DCBE746A376DBFA4D1 = {isa = PBXNativeTarget; buildConfigurationList = 413FBEAEC84DFEC41133C78B; buildPhases = (
+ 57134FDD813875865F5B2057,
+ ED916866997CA4F40C7C1016,
+ 4B1F6E32C9FC8D779B21C1AF, ); buildRules = ( ); dependencies = ( ); name = "DemoRunner - App"; productName = DemoRunner; productReference = CFF2BBEB242CC8B3B904B5F9; productType = "com.apple.product-type.application"; };
+ AC6F0E9A0809A184B2C2B7DE = {isa = PBXProject; buildConfigurationList = 80E8AD1971F52B06F4D28891; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { 291E01DCBE746A376DBFA4D1 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 91A9A0FE9DF4F4E10009EEC7; projectDirPath = ""; projectRoot = ""; targets = (291E01DCBE746A376DBFA4D1); };
};
- rootObject = 15C553274AB25531D0A16FBE;
+ rootObject = AC6F0E9A0809A184B2C2B7DE;
}
<key>CFBundleIconFile</key>\r
<string>Icon.icns</string>\r
<key>CFBundleIdentifier</key>\r
- <string>com.roli.juce.demorunner</string>\r
+ <string>com.juce.demorunner</string>\r
<key>CFBundleName</key>\r
<string>DemoRunner</string>\r
<key>CFBundleDisplayName</key>\r
<key>CFBundleSignature</key>\r
<string>????</string>\r
<key>CFBundleShortVersionString</key>\r
- <string>5.3.1</string>\r
+ <string>5.3.2</string>\r
<key>CFBundleVersion</key>\r
- <string>5.3.1</string>\r
+ <string>5.3.2</string>\r
<key>NSHumanReadableCopyright</key>\r
<string>Copyright (c) 2018 - ROLI Ltd.</string>\r
<key>NSHighResolutionCapable</key>\r
Microsoft Visual Studio Solution File, Format Version 11.00\r
# Visual Studio 2013\r
\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"\r
EndProject\r
Global\r
GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
Release|x64 = Release|x64\r
EndGlobalSection\r
GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.ActiveCfg = Debug|x64\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.Build.0 = Debug|x64\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.ActiveCfg = Release|x64\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.Build.0 = Release|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64\r
EndGlobalSection\r
GlobalSection(SolutionProperties) = preSolution\r
HideSolutionNode = FALSE\r
</ProjectConfiguration>\r
</ItemGroup>\r
<PropertyGroup Label="Globals">\r
- <ProjectGuid>{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}</ProjectGuid>\r
+ <ProjectGuid>{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}</ProjectGuid>\r
<PlatformToolset>v120</PlatformToolset>\r
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
</PropertyGroup>\r
<Optimization>Disabled</Optimization>\r
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile>\r
<Optimization>Full</Optimization>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_product_unlocking\juce_product_unlocking.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">\r
<Filter>JUCE Modules\juce_dsp\containers</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h">\r
+ <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h">\r
<Filter>JUCE Modules\juce_dsp\filter_design</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+ <Filter>JUCE Modules\juce_video\native</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
#include <windows.h>\r
\r
VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION 5,3,1,0\r
+FILEVERSION 5,3,2,0\r
BEGIN\r
BLOCK "StringFileInfo"\r
BEGIN\r
VALUE "CompanyName", "ROLI Ltd.\0"\r
VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0"\r
VALUE "FileDescription", "DemoRunner\0"\r
- VALUE "FileVersion", "5.3.1\0"\r
+ VALUE "FileVersion", "5.3.2\0"\r
VALUE "ProductName", "DemoRunner\0"\r
- VALUE "ProductVersion", "5.3.1\0"\r
+ VALUE "ProductVersion", "5.3.2\0"\r
END\r
END\r
\r
Microsoft Visual Studio Solution File, Format Version 11.00\r
# Visual Studio 2015\r
\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"\r
EndProject\r
Global\r
GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
Release|x64 = Release|x64\r
EndGlobalSection\r
GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.ActiveCfg = Debug|x64\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.Build.0 = Debug|x64\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.ActiveCfg = Release|x64\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.Build.0 = Release|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64\r
EndGlobalSection\r
GlobalSection(SolutionProperties) = preSolution\r
HideSolutionNode = FALSE\r
</ProjectConfiguration>\r
</ItemGroup>\r
<PropertyGroup Label="Globals">\r
- <ProjectGuid>{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}</ProjectGuid>\r
+ <ProjectGuid>{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}</ProjectGuid>\r
<PlatformToolset>v140</PlatformToolset>\r
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
</PropertyGroup>\r
<Optimization>Disabled</Optimization>\r
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile>\r
<Optimization>Full</Optimization>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_product_unlocking\juce_product_unlocking.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">\r
<Filter>JUCE Modules\juce_dsp\containers</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h">\r
+ <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h">\r
<Filter>JUCE Modules\juce_dsp\filter_design</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+ <Filter>JUCE Modules\juce_video\native</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
#include <windows.h>\r
\r
VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION 5,3,1,0\r
+FILEVERSION 5,3,2,0\r
BEGIN\r
BLOCK "StringFileInfo"\r
BEGIN\r
VALUE "CompanyName", "ROLI Ltd.\0"\r
VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0"\r
VALUE "FileDescription", "DemoRunner\0"\r
- VALUE "FileVersion", "5.3.1\0"\r
+ VALUE "FileVersion", "5.3.2\0"\r
VALUE "ProductName", "DemoRunner\0"\r
- VALUE "ProductVersion", "5.3.1\0"\r
+ VALUE "ProductVersion", "5.3.2\0"\r
END\r
END\r
\r
Microsoft Visual Studio Solution File, Format Version 11.00\r
# Visual Studio 2017\r
\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"\r
EndProject\r
Global\r
GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
Release|x64 = Release|x64\r
EndGlobalSection\r
GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.ActiveCfg = Debug|x64\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Debug|x64.Build.0 = Debug|x64\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.ActiveCfg = Release|x64\r
- {E3D4150A-FA75-0747-0E47-EDA1155AAAFF}.Release|x64.Build.0 = Release|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64\r
+ {882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64\r
EndGlobalSection\r
GlobalSection(SolutionProperties) = preSolution\r
HideSolutionNode = FALSE\r
</ProjectConfiguration>\r
</ItemGroup>\r
<PropertyGroup Label="Globals">\r
- <ProjectGuid>{E3D4150A-FA75-0747-0E47-EDA1155AAAFF}</ProjectGuid>\r
+ <ProjectGuid>{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}</ProjectGuid>\r
<PlatformToolset>v141</PlatformToolset>\r
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
</PropertyGroup>\r
<Optimization>Disabled</Optimization>\r
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile>\r
<Optimization>Full</Optimization>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_product_unlocking\juce_product_unlocking.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">\r
<Filter>JUCE Modules\juce_dsp\containers</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h">\r
+ <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h">\r
<Filter>JUCE Modules\juce_dsp\filter_design</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+ <Filter>JUCE Modules\juce_video\native</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
#include <windows.h>\r
\r
VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION 5,3,1,0\r
+FILEVERSION 5,3,2,0\r
BEGIN\r
BLOCK "StringFileInfo"\r
BEGIN\r
VALUE "CompanyName", "ROLI Ltd.\0"\r
VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0"\r
VALUE "FileDescription", "DemoRunner\0"\r
- VALUE "FileVersion", "5.3.1\0"\r
+ VALUE "FileVersion", "5.3.2\0"\r
VALUE "ProductName", "DemoRunner\0"\r
- VALUE "ProductVersion", "5.3.1\0"\r
+ VALUE "ProductVersion", "5.3.2\0"\r
END\r
END\r
\r
objectVersion = 46;
objects = {
- 5665A011C7D125C8890D3260 = {isa = PBXBuildFile; fileRef = B953F5C249804F38B818AD2F; };
- C8D093204643DE75CAA41A3F = {isa = PBXBuildFile; fileRef = E622C086CB768052D799CB95; };
- 7286A5BB489F25E6E3CF63D4 = {isa = PBXBuildFile; fileRef = A70E204AA2B7B904F9C08770; };
- B6AB4CB9F0A0AD540028A3E1 = {isa = PBXBuildFile; fileRef = F10017EB39A3981DF2FFC565; };
- 71F90E5ABB1112D2D92EAB59 = {isa = PBXBuildFile; fileRef = 61BF1C5B6EB2C49337A028E7; };
- AB53895F1E4193A2C9B51DB6 = {isa = PBXBuildFile; fileRef = 5AB31D4FDB61420CFE50FD52; };
- 9CB6071FE1DD378F7C64C9F5 = {isa = PBXBuildFile; fileRef = 4400AFF27C798108026C3094; };
- 1D98F6C4127BB7F0890645D6 = {isa = PBXBuildFile; fileRef = C0349D711DBA26CB337AFDFC; };
- 0B1AC7FEC205238C5701B086 = {isa = PBXBuildFile; fileRef = E087A95F121B72288CFE0150; };
- 2EF15A7E6ECFD861D719276A = {isa = PBXBuildFile; fileRef = BE800C80B08E6D722CACB487; };
- 9318D1152DE35146100C7594 = {isa = PBXBuildFile; fileRef = 95C3EC76835BB2151FA94A67; };
- BA3F994E8752E7310789C02A = {isa = PBXBuildFile; fileRef = 0CD10A62A53B1C25DBFC9ECB; };
- 06DA6875AC3E734378E374C5 = {isa = PBXBuildFile; fileRef = 0F072771BD806EFDDADEBF26; };
- 9F59844F463603E7C2467DC4 = {isa = PBXBuildFile; fileRef = 0C3170AEED96E4A60DD8E49F; };
- C7D4E452620DF858B785BA82 = {isa = PBXBuildFile; fileRef = F4929902D6A38E01A6B084E8; };
- 3D2D1CCFB4B682162034225E = {isa = PBXBuildFile; fileRef = 6142F838E6568F8450BC93DB; };
- EDAD741A46FD4B3F002C96D3 = {isa = PBXBuildFile; fileRef = 58E1DD950580FC057346CF2F; };
- B1776D2FEB204FAE5C17E4C7 = {isa = PBXBuildFile; fileRef = A5C76AB7D5C174FB79974A8B; };
- 686146610021944DA9C987B8 = {isa = PBXBuildFile; fileRef = AC925129DC8F53C3C3F6E0BF; };
- F657E50CA75FE6932E710CB0 = {isa = PBXBuildFile; fileRef = 2945A953347C882A8294DF82; };
- F9EDB3A8F55A4499441401D6 = {isa = PBXBuildFile; fileRef = AE5650194191C6A04F0B5685; };
- EACB962CC04BDC0369264A8F = {isa = PBXBuildFile; fileRef = 48A8B50CEB577DF7D3FCEFEC; };
- 557BA8FDD37630DF5EB84EE0 = {isa = PBXBuildFile; fileRef = 5FE974D1CE11D7658D57C580; };
- 5CFCACD6AF608BDC2E1E8BD1 = {isa = PBXBuildFile; fileRef = E40C7EC0CD57D5F92EC9C806; };
- 9263171BCE90616A9F350405 = {isa = PBXBuildFile; fileRef = 56280EAEBEAF619C3E98B5C6; };
- 2EF49BC29DA0951B1C43070F = {isa = PBXBuildFile; fileRef = 27FB5D78BF900B70101B3E48; };
- 8861132DCB0DE3F9EB0DD278 = {isa = PBXBuildFile; fileRef = BD545E9E8BA9D67A673AC8E8; };
- CCDAEA12C17058099252FD3D = {isa = PBXBuildFile; fileRef = 44B4D9F7DBB239B6E57BC2E7; };
- 28778136A8C09DBDC980CB72 = {isa = PBXBuildFile; fileRef = 2CC2281747C1FE9EB940BD1A; };
- DA696766645C964870153095 = {isa = PBXBuildFile; fileRef = F996277A397F3F21763BAC03; };
- 8F5FE1B5D44F55667509BC99 = {isa = PBXBuildFile; fileRef = 91195E76A94C136774686D97; };
- 3656169644FED0C525D5D30C = {isa = PBXBuildFile; fileRef = 3290EFAFF391EE790FF33FB9; };
- 2763512B6DFF68C0EEF72496 = {isa = PBXBuildFile; fileRef = 46A8BE3E064F7E01EF1E2D2D; };
- 480F45A17B4E83A26B1ACEF9 = {isa = PBXBuildFile; fileRef = 1442C6A9928B564A86D1597A; };
- 3D8EECDED13F0A46A6FA8D3E = {isa = PBXBuildFile; fileRef = 9A35450231D4C3F4DCF16AB3; };
- E433C1C591D091AF71AD528E = {isa = PBXBuildFile; fileRef = 55479FCC6DB5293B12918CBA; };
- A5F8F9904580960794429360 = {isa = PBXBuildFile; fileRef = 9733178D30027A7CC3E12510; };
- B298295E61E5DD800B814DAF = {isa = PBXBuildFile; fileRef = 7445067DFFF67F28456DA9B0; };
- A7E206DD280DC58E2A150642 = {isa = PBXBuildFile; fileRef = 1EF8C1691168417E42DF81ED; };
- 26260D259EFF13BD5044CD34 = {isa = PBXBuildFile; fileRef = 120B5B68C50C2992969E9CE1; };
- 591D5799ED6524DE9BD846D7 = {isa = PBXBuildFile; fileRef = 0996038E1E70A6ADD233418D; };
- D09859BDBC491A9932637715 = {isa = PBXBuildFile; fileRef = 96FE3B2079CA29C6C2F5E2F2; };
- 7EC8A06F9290B16DFB16E346 = {isa = PBXBuildFile; fileRef = A477616D8A134C6E99C2BE9D; };
- 33C96917E46535D30B17B483 = {isa = PBXBuildFile; fileRef = 5F79F2C9508D0D7F5A6BF62D; };
- 8AA7BB967216BDBFF0371267 = {isa = PBXBuildFile; fileRef = 6B2332953FCDD3BD197E149A; };
- FD5B59B8A0B8258531421E60 = {isa = PBXBuildFile; fileRef = F4AB4BBB26E536232D27BE83; };
- 0996038E1E70A6ADD233418D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; };
- 09AFF79B4D5593574507F03E = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; };
- 0C3170AEED96E4A60DD8E49F = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
- 0CD10A62A53B1C25DBFC9ECB = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
- 0D328B4591EBFD9997C61535 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_product_unlocking"; path = "../../../../modules/juce_product_unlocking"; sourceTree = "SOURCE_ROOT"; };
- 0F072771BD806EFDDADEBF26 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- 120B5B68C50C2992969E9CE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
- 1442C6A9928B564A86D1597A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_box2d.cpp"; path = "../../JuceLibraryCode/include_juce_box2d.cpp"; sourceTree = "SOURCE_ROOT"; };
- 18C1EBA9CB73E8E7389BBDCC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
- 191B33D36B749639B0FBE856 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/UI/MainComponent.h; sourceTree = "SOURCE_ROOT"; };
- 1EF8C1691168417E42DF81ED = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
- 27FB5D78BF900B70101B3E48 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; };
- 2945A953347C882A8294DF82 = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = "SOURCE_ROOT"; };
- 2CC2281747C1FE9EB940BD1A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; };
- 3290EFAFF391EE790FF33FB9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; };
- 3384C796C682AF43B57B42F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JUCEDemos.h; path = ../../Source/Demos/JUCEDemos.h; sourceTree = "SOURCE_ROOT"; };
- 352AF685E88FF055C4F20E16 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = DemoRunner.entitlements; path = DemoRunner.entitlements; sourceTree = "SOURCE_ROOT"; };
- 4400AFF27C798108026C3094 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioKit.framework; path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; };
- 44B4D9F7DBB239B6E57BC2E7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; };
- 46A8BE3E064F7E01EF1E2D2D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_blocks_basics.cpp"; path = "../../JuceLibraryCode/include_juce_blocks_basics.cpp"; sourceTree = "SOURCE_ROOT"; };
- 47623ED30F98E053C07A9B11 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; };
- 483FAD2B91F1B2A248684D8D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; };
- 48A8B50CEB577DF7D3FCEFEC = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs2.cpp; path = ../../Source/Demos/DemoPIPs2.cpp; sourceTree = "SOURCE_ROOT"; };
- 497F44004821C9FDC0B1A337 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DemoContentComponent.h; path = ../../Source/UI/DemoContentComponent.h; sourceTree = "SOURCE_ROOT"; };
- 4B2E65945C61CDD81D945CC3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_analytics"; path = "../../../../modules/juce_analytics"; sourceTree = "SOURCE_ROOT"; };
- 531F8760E51457787457AC3D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; };
- 53ED8C56ECA0B933135E6ED5 = {isa = PBXFileReference; lastKnownFileType = image.png; name = JUCEAppIcon.png; path = ../../Source/JUCEAppIcon.png; sourceTree = "SOURCE_ROOT"; };
- 55479FCC6DB5293B12918CBA = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_cryptography.mm"; path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
- 56280EAEBEAF619C3E98B5C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/UI/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; };
- 58E1DD950580FC057346CF2F = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
- 5AB31D4FDB61420CFE50FD52 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
- 5F79F2C9508D0D7F5A6BF62D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; };
- 5FE974D1CE11D7658D57C580 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = "SOURCE_ROOT"; };
- 6142F838E6568F8450BC93DB = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
- 61BF1C5B6EB2C49337A028E7 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
- 62B6BD963ACD31048A939441 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; };
- 6B2332953FCDD3BD197E149A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_product_unlocking.mm"; path = "../../JuceLibraryCode/include_juce_product_unlocking.mm"; sourceTree = "SOURCE_ROOT"; };
- 7445067DFFF67F28456DA9B0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; };
- 74E8AB27C5B4246DA0590820 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IntroScreen.h; path = ../../Source/Demos/IntroScreen.h; sourceTree = "SOURCE_ROOT"; };
- 8DA81A2479F1EF4B1064E3A0 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; };
- 91195E76A94C136774686D97 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
- 95C3EC76835BB2151FA94A67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
- 96FE3B2079CA29C6C2F5E2F2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; };
- 9733178D30027A7CC3E12510 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
- 9A35450231D4C3F4DCF16AB3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; };
- 9A974BD82436ED647B457D0B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; };
- 9AA6843063F8D624808AA5FF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_blocks_basics"; path = "../../../../modules/juce_blocks_basics"; sourceTree = "SOURCE_ROOT"; };
- 9D3C18C7CD24710A9D88CACB = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_osc"; path = "../../../../modules/juce_osc"; sourceTree = "SOURCE_ROOT"; };
- A075E4A80B931C9431786CB4 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; };
- A477616D8A134C6E99C2BE9D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; };
- A5C76AB7D5C174FB79974A8B = {isa = PBXFileReference; lastKnownFileType = folder; name = Assets; path = ../../../Assets; sourceTree = "<group>"; };
- A70E204AA2B7B904F9C08770 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
- AC925129DC8F53C3C3F6E0BF = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = DemoRunner/Images.xcassets; sourceTree = "SOURCE_ROOT"; };
- AE309D5EC9B20A17B819B264 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; };
- AE5650194191C6A04F0B5685 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs1.cpp; path = ../../Source/Demos/DemoPIPs1.cpp; sourceTree = "SOURCE_ROOT"; };
- AE80AC9B628F8B74C6F1F29E = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; };
- B953F5C249804F38B818AD2F = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoRunner.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
- BD545E9E8BA9D67A673AC8E8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_analytics.cpp"; path = "../../JuceLibraryCode/include_juce_analytics.cpp"; sourceTree = "SOURCE_ROOT"; };
- BE800C80B08E6D722CACB487 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
- BF3AA167B271DBCB79CE3510 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; };
- C0349D711DBA26CB337AFDFC = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
- D869E1D6485900AB3406AF03 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SettingsContent.h; path = ../../Source/UI/SettingsContent.h; sourceTree = "SOURCE_ROOT"; };
- D93CFD2601C0E84D357B7959 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; };
- E087A95F121B72288CFE0150 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; };
- E40C7EC0CD57D5F92EC9C806 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoContentComponent.cpp; path = ../../Source/UI/DemoContentComponent.cpp; sourceTree = "SOURCE_ROOT"; };
- E4A1F27BDB0FEAB8FD971583 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_box2d"; path = "../../../../modules/juce_box2d"; sourceTree = "SOURCE_ROOT"; };
- E5CF2486265244CD996876FE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
- E622C086CB768052D799CB95 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
- ECFF9E66EC18BEAEF2B6C686 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; };
- F10017EB39A3981DF2FFC565 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
- F124B2F09BEA556820420758 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; };
- F3C0C37FD6A1BBBB6588D182 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; };
- F4929902D6A38E01A6B084E8 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
- F4AB4BBB26E536232D27BE83 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; };
- F6E40DCC3B84C97202B9CC21 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_cryptography"; path = "../../../../modules/juce_cryptography"; sourceTree = "SOURCE_ROOT"; };
- F996277A397F3F21763BAC03 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; };
- 5F0F17E75142C9F8EC4F9EA8 = {isa = PBXGroup; children = (
- AE5650194191C6A04F0B5685,
- 48A8B50CEB577DF7D3FCEFEC,
- 74E8AB27C5B4246DA0590820,
- 5FE974D1CE11D7658D57C580,
- 3384C796C682AF43B57B42F2, ); name = Demos; sourceTree = "<group>"; };
- C69C98BDBD8901865A10D03D = {isa = PBXGroup; children = (
- E40C7EC0CD57D5F92EC9C806,
- 497F44004821C9FDC0B1A337,
- 56280EAEBEAF619C3E98B5C6,
- 191B33D36B749639B0FBE856,
- D869E1D6485900AB3406AF03, ); name = UI; sourceTree = "<group>"; };
- 29499B4E21D547DC19E2AF25 = {isa = PBXGroup; children = (
- 5F0F17E75142C9F8EC4F9EA8,
- C69C98BDBD8901865A10D03D,
- 27FB5D78BF900B70101B3E48,
- 53ED8C56ECA0B933135E6ED5, ); name = Source; sourceTree = "<group>"; };
- 927472CBD503E38DD7E37090 = {isa = PBXGroup; children = (
- 29499B4E21D547DC19E2AF25, ); name = DemoRunner; sourceTree = "<group>"; };
- 178FF737E5519A4D16208DEB = {isa = PBXGroup; children = (
- 4B2E65945C61CDD81D945CC3,
- BF3AA167B271DBCB79CE3510,
- 62B6BD963ACD31048A939441,
- A075E4A80B931C9431786CB4,
- AE309D5EC9B20A17B819B264,
- 09AFF79B4D5593574507F03E,
- 9AA6843063F8D624808AA5FF,
- E4A1F27BDB0FEAB8FD971583,
- D93CFD2601C0E84D357B7959,
- F6E40DCC3B84C97202B9CC21,
- 9A974BD82436ED647B457D0B,
- 47623ED30F98E053C07A9B11,
- AE80AC9B628F8B74C6F1F29E,
- 483FAD2B91F1B2A248684D8D,
- F124B2F09BEA556820420758,
- F3C0C37FD6A1BBBB6588D182,
- 531F8760E51457787457AC3D,
- 9D3C18C7CD24710A9D88CACB,
- 0D328B4591EBFD9997C61535,
- ECFF9E66EC18BEAEF2B6C686, ); name = "JUCE Modules"; sourceTree = "<group>"; };
- 16DD35D8533EE0BA94AAFBF8 = {isa = PBXGroup; children = (
- 18C1EBA9CB73E8E7389BBDCC,
- BD545E9E8BA9D67A673AC8E8,
- 44B4D9F7DBB239B6E57BC2E7,
- 2CC2281747C1FE9EB940BD1A,
- F996277A397F3F21763BAC03,
- 91195E76A94C136774686D97,
- 3290EFAFF391EE790FF33FB9,
- 46A8BE3E064F7E01EF1E2D2D,
- 1442C6A9928B564A86D1597A,
- 9A35450231D4C3F4DCF16AB3,
- 55479FCC6DB5293B12918CBA,
- 9733178D30027A7CC3E12510,
- 7445067DFFF67F28456DA9B0,
- 1EF8C1691168417E42DF81ED,
- 120B5B68C50C2992969E9CE1,
- 0996038E1E70A6ADD233418D,
- 96FE3B2079CA29C6C2F5E2F2,
- A477616D8A134C6E99C2BE9D,
- 5F79F2C9508D0D7F5A6BF62D,
- 6B2332953FCDD3BD197E149A,
- F4AB4BBB26E536232D27BE83,
- E5CF2486265244CD996876FE, ); name = "JUCE Library Code"; sourceTree = "<group>"; };
- FEE1C6574320FAB66F0238D2 = {isa = PBXGroup; children = (
- A5C76AB7D5C174FB79974A8B,
- 8DA81A2479F1EF4B1064E3A0,
- AC925129DC8F53C3C3F6E0BF,
- 2945A953347C882A8294DF82, ); name = Resources; sourceTree = "<group>"; };
- 17F11FE561BD8D6EB93B64D4 = {isa = PBXGroup; children = (
- E622C086CB768052D799CB95,
- A70E204AA2B7B904F9C08770,
- F10017EB39A3981DF2FFC565,
- 61BF1C5B6EB2C49337A028E7,
- 5AB31D4FDB61420CFE50FD52,
- 4400AFF27C798108026C3094,
- C0349D711DBA26CB337AFDFC,
- E087A95F121B72288CFE0150,
- BE800C80B08E6D722CACB487,
- 95C3EC76835BB2151FA94A67,
- 0CD10A62A53B1C25DBFC9ECB,
- 0F072771BD806EFDDADEBF26,
- 0C3170AEED96E4A60DD8E49F,
- F4929902D6A38E01A6B084E8,
- 6142F838E6568F8450BC93DB,
- 58E1DD950580FC057346CF2F, ); name = Frameworks; sourceTree = "<group>"; };
- 532CECDAA91A39864E7FFF80 = {isa = PBXGroup; children = (
- B953F5C249804F38B818AD2F, ); name = Products; sourceTree = "<group>"; };
- 9979C8B054ED17C9E04C6BAB = {isa = PBXGroup; children = (
- 352AF685E88FF055C4F20E16,
- 927472CBD503E38DD7E37090,
- 178FF737E5519A4D16208DEB,
- 16DD35D8533EE0BA94AAFBF8,
- FEE1C6574320FAB66F0238D2,
- 17F11FE561BD8D6EB93B64D4,
- 532CECDAA91A39864E7FFF80, ); name = Source; sourceTree = "<group>"; };
- CEC200AA273D1626F466FC27 = {isa = XCBuildConfiguration; buildSettings = {
+ 63A2F309E55DAC206E9B97E3 = {isa = PBXBuildFile; fileRef = CFF2BBEB242CC8B3B904B5F9; };
+ 48CF0B02E1D06E5DA51E6270 = {isa = PBXBuildFile; fileRef = A04E4408525F24F7DCBA000E; };
+ 163B0CF2DD0990A63DF1D5A6 = {isa = PBXBuildFile; fileRef = 470C3E4553B513FFEF752779; };
+ 7B4163348896EB1B86B15160 = {isa = PBXBuildFile; fileRef = DC192EFA899E6CBE6B5CD394; };
+ 8C0AEA08A71075A6C765AEC9 = {isa = PBXBuildFile; fileRef = 3B99CF94C44E2EE04635A439; };
+ 1351A13E78F38741C6075600 = {isa = PBXBuildFile; fileRef = 4F0A137A4115946A346180E6; };
+ 527DA2E6827BAFDDD3E8E80F = {isa = PBXBuildFile; fileRef = B4389672DA4CC8E0A531062D; };
+ 34A4931AF1DD424D3A400EEF = {isa = PBXBuildFile; fileRef = 76A157A111866670A4678F04; };
+ 7F57DB52C3CEFDC26DDD38FC = {isa = PBXBuildFile; fileRef = B28EFB9D1DF0B6D6499A7DEF; };
+ 46071CE2B98B562B7BF27CB1 = {isa = PBXBuildFile; fileRef = 1CFE3935A3B810D5D68A2504; };
+ 6A61CBB4E39BFD392D97528F = {isa = PBXBuildFile; fileRef = 61AE09C749B007B70A265D9B; };
+ 0B0CE6D5062E5C02A41F24BC = {isa = PBXBuildFile; fileRef = 873F9DD54978E601102353B4; };
+ 5E4310B3F6BB639875D3E9B8 = {isa = PBXBuildFile; fileRef = 49ECA8B998B339A083674A22; };
+ AE7FB2AC3885F4BF53A5DDA1 = {isa = PBXBuildFile; fileRef = 7983C452610C1638B7E78F12; };
+ 1FB200F4AE3E4E7CDFF629BB = {isa = PBXBuildFile; fileRef = 24D74AF1C95BEF957DC4FA77; };
+ AC783ECD84496E0B77911EEE = {isa = PBXBuildFile; fileRef = 34F1320BC5C23702C08DF9F0; };
+ B1981F62F6A91FD2F579A198 = {isa = PBXBuildFile; fileRef = 23CD1A3F9067C3A0ECE7BB67; };
+ ECA44A41DA8A935178C1A1F4 = {isa = PBXBuildFile; fileRef = F90C8B0233A54F1445343F67; };
+ 47ED2C78B05B8A6A00E36C46 = {isa = PBXBuildFile; fileRef = 685A261BE78585293F3EAD36; };
+ 8E63755144E29269FD82C897 = {isa = PBXBuildFile; fileRef = 8135645508EEFDBDCDF2ADC6; };
+ 75DB074DBAE04408A0A917B7 = {isa = PBXBuildFile; fileRef = E0A3F113BC27B7B4D6F1D693; };
+ E6F58FC3ACAE774DB4D06420 = {isa = PBXBuildFile; fileRef = 3AB62BFF806112585B54DDA3; };
+ 36E115D98311F12AA06710E6 = {isa = PBXBuildFile; fileRef = 061AECBF1CC7056F4155812D; };
+ B38728296BB32B7994CE28DF = {isa = PBXBuildFile; fileRef = 934ACDCB3FD9D223A3481D8F; };
+ 71DF4F5EB4C8305688416725 = {isa = PBXBuildFile; fileRef = E5BFC17E682AB426D203B3E6; };
+ 4FBBB55F4E347757F74F1F41 = {isa = PBXBuildFile; fileRef = 25E5ED33876A2C752378C859; };
+ F619F3887CEC064441BB6EE6 = {isa = PBXBuildFile; fileRef = 260481E972425474BB8155B0; };
+ C2BB2B6DA237FE0CB64C7EDA = {isa = PBXBuildFile; fileRef = 5965349393850F41DF76F350; };
+ F28112945CEBEA4CE8975833 = {isa = PBXBuildFile; fileRef = 03B0F9318FD583525AB195A9; };
+ 9EACEA6BE8D0ACC72C12C080 = {isa = PBXBuildFile; fileRef = 03A63C3CA6F24977F19C316D; };
+ 26652AB1BB77C8A39434775F = {isa = PBXBuildFile; fileRef = E061A1C75FA5722167FC4997; };
+ 2707968B431D83AC7E28E49B = {isa = PBXBuildFile; fileRef = E67AB94002886AF67437D6AE; };
+ 712D81867EC698463252FA79 = {isa = PBXBuildFile; fileRef = EDDA01B246C6128CAF7A2914; };
+ 49E7BBD46981F0035E4E9021 = {isa = PBXBuildFile; fileRef = 831A01C745C905F5715CD822; };
+ 611298FAC1A543BDD10D4C41 = {isa = PBXBuildFile; fileRef = 4DF215D350FFE5E119CBA7E5; };
+ D183F8140174ACCDDCD230A2 = {isa = PBXBuildFile; fileRef = 3BC9753E0CD75A36DC742EE0; };
+ FF87532E62753EDFA3D29CAD = {isa = PBXBuildFile; fileRef = 6C5E26B4D28F8450435B8AE1; };
+ 2F76CA28C8C0EFC7453D0EB8 = {isa = PBXBuildFile; fileRef = F5F2EA2238973488632FC322; };
+ 6B5560283DEEBD6DD2D6C984 = {isa = PBXBuildFile; fileRef = C1E93FAF6C68A40A664422CD; };
+ 1DBDFEDE359CFC84F8E3DE4C = {isa = PBXBuildFile; fileRef = FCD0D758C5767944BEC29730; };
+ CDABEA6258EC70C65C9ACCFE = {isa = PBXBuildFile; fileRef = 3E4ED41C374261CFFD309743; };
+ E2F44A968EC2598DAE33A997 = {isa = PBXBuildFile; fileRef = A1D6D36B96B6B37C31F32829; };
+ 5CB78489F16E82144914972D = {isa = PBXBuildFile; fileRef = 979F23EA9E5E76131299E886; };
+ BC6036F22423CA0AFF0385A7 = {isa = PBXBuildFile; fileRef = 94B6C88FE30861A47CD28709; };
+ AEA090DAC5C747C50C7D3FA7 = {isa = PBXBuildFile; fileRef = CE38E6469D98462A2C22C915; };
+ CDEB6BA5341494AF51D07C72 = {isa = PBXBuildFile; fileRef = 0AB68DBAB6B7DAEDDDD5B683; };
+ 0140787C0118A95E37DE90B4 = {isa = PBXBuildFile; fileRef = 9144821E003E15E4042B57DB; };
+ 03A63C3CA6F24977F19C316D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; };
+ 03B0F9318FD583525AB195A9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; };
+ 061AECBF1CC7056F4155812D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs2.cpp; path = ../../Source/Demos/DemoPIPs2.cpp; sourceTree = "SOURCE_ROOT"; };
+ 0AB68DBAB6B7DAEDDDD5B683 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_product_unlocking.mm"; path = "../../JuceLibraryCode/include_juce_product_unlocking.mm"; sourceTree = "SOURCE_ROOT"; };
+ 0B36C013D9790568B481634C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; };
+ 0CCFDC1D1C7B8A12BF4822F1 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = DemoRunner.entitlements; path = DemoRunner.entitlements; sourceTree = "SOURCE_ROOT"; };
+ 112FFCB73597157E721BCDF2 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_analytics"; path = "../../../../modules/juce_analytics"; sourceTree = "SOURCE_ROOT"; };
+ 14CBD28B4887DAF89E27491C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_cryptography"; path = "../../../../modules/juce_cryptography"; sourceTree = "SOURCE_ROOT"; };
+ 1CFE3935A3B810D5D68A2504 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+ 1FCD2145DE3FCFCF4F55A8AD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DemoContentComponent.h; path = ../../Source/UI/DemoContentComponent.h; sourceTree = "SOURCE_ROOT"; };
+ 23CD1A3F9067C3A0ECE7BB67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+ 24D74AF1C95BEF957DC4FA77 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+ 25E5ED33876A2C752378C859 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/UI/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+ 260481E972425474BB8155B0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; };
+ 346450C70C964FD9640B6086 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; };
+ 34F1320BC5C23702C08DF9F0 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
+ 3AB62BFF806112585B54DDA3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoPIPs1.cpp; path = ../../Source/Demos/DemoPIPs1.cpp; sourceTree = "SOURCE_ROOT"; };
+ 3B99CF94C44E2EE04635A439 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
+ 3BC9753E0CD75A36DC742EE0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; };
+ 3E4ED41C374261CFFD309743 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
+ 470C3E4553B513FFEF752779 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ 491641F7632BCC81BBA0ED85 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; };
+ 49ECA8B998B339A083674A22 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 4DF215D350FFE5E119CBA7E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_box2d.cpp"; path = "../../JuceLibraryCode/include_juce_box2d.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 4E9AD0EAF3CA57B548622D9A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; };
+ 4EC2782DE1779A130835B64D = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; };
+ 4F0A137A4115946A346180E6 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+ 4FE6029FF76BCE9698595DC5 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_product_unlocking"; path = "../../../../modules/juce_product_unlocking"; sourceTree = "SOURCE_ROOT"; };
+ 5965349393850F41DF76F350 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_analytics.cpp"; path = "../../JuceLibraryCode/include_juce_analytics.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 5A9F2000C66D24E8B01BE60B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; };
+ 60F2869DC345EAF2314D6C09 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; };
+ 61AE09C749B007B70A265D9B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
+ 651ECE3C7BA845DDCFEE48F3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_osc"; path = "../../../../modules/juce_osc"; sourceTree = "SOURCE_ROOT"; };
+ 6847A9B2C5E3C2ED56D8D4E7 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; };
+ 685A261BE78585293F3EAD36 = {isa = PBXFileReference; lastKnownFileType = folder; name = Assets; path = ../../../Assets; sourceTree = "<group>"; };
+ 6C198AF93E1F6E682189E2F6 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; };
+ 6C2C1AC86623F457427965EF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_box2d"; path = "../../../../modules/juce_box2d"; sourceTree = "SOURCE_ROOT"; };
+ 6C5E26B4D28F8450435B8AE1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_cryptography.mm"; path = "../../JuceLibraryCode/include_juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
+ 72129757D2A553B90A7157C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; };
+ 76A157A111866670A4678F04 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 7983C452610C1638B7E78F12 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
+ 7A5AAE9EE573FC6105CC4AAC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SettingsContent.h; path = ../../Source/UI/SettingsContent.h; sourceTree = "SOURCE_ROOT"; };
+ 8135645508EEFDBDCDF2ADC6 = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = DemoRunner/Images.xcassets; sourceTree = "SOURCE_ROOT"; };
+ 831A01C745C905F5715CD822 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_blocks_basics.cpp"; path = "../../JuceLibraryCode/include_juce_blocks_basics.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 873F9DD54978E601102353B4 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
+ 8CE533D611CD0984AD028D73 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; };
+ 903CD4126C779884797EF915 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; };
+ 9144821E003E15E4042B57DB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; };
+ 934ACDCB3FD9D223A3481D8F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = "SOURCE_ROOT"; };
+ 94B6C88FE30861A47CD28709 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; };
+ 979F23EA9E5E76131299E886 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; };
+ A04E4408525F24F7DCBA000E = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
+ A1D6D36B96B6B37C31F32829 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; };
+ A5256778E2EBD206B337B555 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; };
+ A6F555BE0DDF01C285BD8BF5 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; };
+ A9315F8368A5771EC39631CB = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; };
+ B28EFB9D1DF0B6D6499A7DEF = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; };
+ B2BC383CE102EECCF49C7AF7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IntroScreen.h; path = ../../Source/Demos/IntroScreen.h; sourceTree = "SOURCE_ROOT"; };
+ B4389672DA4CC8E0A531062D = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioKit.framework; path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; };
+ C1E93FAF6C68A40A664422CD = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; };
+ CE38E6469D98462A2C22C915 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; };
+ CFF2BBEB242CC8B3B904B5F9 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoRunner.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
+ D018D636A4DC9BEA11720129 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_blocks_basics"; path = "../../../../modules/juce_blocks_basics"; sourceTree = "SOURCE_ROOT"; };
+ DC192EFA899E6CBE6B5CD394 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+ E061A1C75FA5722167FC4997 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; };
+ E0A3F113BC27B7B4D6F1D693 = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = "SOURCE_ROOT"; };
+ E5BFC17E682AB426D203B3E6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DemoContentComponent.cpp; path = ../../Source/UI/DemoContentComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+ E67AB94002886AF67437D6AE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
+ EB68BD1224CD9748BFA332C0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/UI/MainComponent.h; sourceTree = "SOURCE_ROOT"; };
+ ECE79F1433E92BB6213C86F5 = {isa = PBXFileReference; lastKnownFileType = image.png; name = JUCEAppIcon.png; path = ../../Source/JUCEAppIcon.png; sourceTree = "SOURCE_ROOT"; };
+ EDDA01B246C6128CAF7A2914 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; };
+ EE6BDC78B539D27E65E92265 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JUCEDemos.h; path = ../../Source/Demos/JUCEDemos.h; sourceTree = "SOURCE_ROOT"; };
+ F5F2EA2238973488632FC322 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
+ F90C8B0233A54F1445343F67 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ FB1FC613CE260140F1CFD21B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; };
+ FCD0D758C5767944BEC29730 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
+ FDC3CA8D1403C169659F7D8C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; };
+ CD575607FAA297480EE95F13 = {isa = PBXGroup; children = (
+ 3AB62BFF806112585B54DDA3,
+ 061AECBF1CC7056F4155812D,
+ B2BC383CE102EECCF49C7AF7,
+ 934ACDCB3FD9D223A3481D8F,
+ EE6BDC78B539D27E65E92265, ); name = Demos; sourceTree = "<group>"; };
+ BB12537403CC24C02622582C = {isa = PBXGroup; children = (
+ E5BFC17E682AB426D203B3E6,
+ 1FCD2145DE3FCFCF4F55A8AD,
+ 25E5ED33876A2C752378C859,
+ EB68BD1224CD9748BFA332C0,
+ 7A5AAE9EE573FC6105CC4AAC, ); name = UI; sourceTree = "<group>"; };
+ 6F933968486D9AD9FE112622 = {isa = PBXGroup; children = (
+ CD575607FAA297480EE95F13,
+ BB12537403CC24C02622582C,
+ 260481E972425474BB8155B0,
+ ECE79F1433E92BB6213C86F5, ); name = Source; sourceTree = "<group>"; };
+ 9683F931FA1B8B85FA8C4BD8 = {isa = PBXGroup; children = (
+ 6F933968486D9AD9FE112622, ); name = DemoRunner; sourceTree = "<group>"; };
+ 5A0B2CEF393A25C6D4B1B76C = {isa = PBXGroup; children = (
+ 112FFCB73597157E721BCDF2,
+ 6847A9B2C5E3C2ED56D8D4E7,
+ 60F2869DC345EAF2314D6C09,
+ 491641F7632BCC81BBA0ED85,
+ 346450C70C964FD9640B6086,
+ 0B36C013D9790568B481634C,
+ D018D636A4DC9BEA11720129,
+ 6C2C1AC86623F457427965EF,
+ 903CD4126C779884797EF915,
+ 14CBD28B4887DAF89E27491C,
+ FDC3CA8D1403C169659F7D8C,
+ A6F555BE0DDF01C285BD8BF5,
+ FB1FC613CE260140F1CFD21B,
+ 8CE533D611CD0984AD028D73,
+ 5A9F2000C66D24E8B01BE60B,
+ A9315F8368A5771EC39631CB,
+ 6C198AF93E1F6E682189E2F6,
+ 651ECE3C7BA845DDCFEE48F3,
+ 4FE6029FF76BCE9698595DC5,
+ A5256778E2EBD206B337B555, ); name = "JUCE Modules"; sourceTree = "<group>"; };
+ 61F3057D838D7DABB0FA3D34 = {isa = PBXGroup; children = (
+ 72129757D2A553B90A7157C6,
+ 5965349393850F41DF76F350,
+ 03B0F9318FD583525AB195A9,
+ 03A63C3CA6F24977F19C316D,
+ E061A1C75FA5722167FC4997,
+ E67AB94002886AF67437D6AE,
+ EDDA01B246C6128CAF7A2914,
+ 831A01C745C905F5715CD822,
+ 4DF215D350FFE5E119CBA7E5,
+ 3BC9753E0CD75A36DC742EE0,
+ 6C5E26B4D28F8450435B8AE1,
+ F5F2EA2238973488632FC322,
+ C1E93FAF6C68A40A664422CD,
+ FCD0D758C5767944BEC29730,
+ 3E4ED41C374261CFFD309743,
+ A1D6D36B96B6B37C31F32829,
+ 979F23EA9E5E76131299E886,
+ 94B6C88FE30861A47CD28709,
+ CE38E6469D98462A2C22C915,
+ 0AB68DBAB6B7DAEDDDD5B683,
+ 9144821E003E15E4042B57DB,
+ 4E9AD0EAF3CA57B548622D9A, ); name = "JUCE Library Code"; sourceTree = "<group>"; };
+ D87DCD5DA4EC8D78DFF37FCC = {isa = PBXGroup; children = (
+ 685A261BE78585293F3EAD36,
+ 4EC2782DE1779A130835B64D,
+ 8135645508EEFDBDCDF2ADC6,
+ E0A3F113BC27B7B4D6F1D693, ); name = Resources; sourceTree = "<group>"; };
+ 4452EAA652B65A9AE648288C = {isa = PBXGroup; children = (
+ A04E4408525F24F7DCBA000E,
+ 470C3E4553B513FFEF752779,
+ DC192EFA899E6CBE6B5CD394,
+ 3B99CF94C44E2EE04635A439,
+ 4F0A137A4115946A346180E6,
+ B4389672DA4CC8E0A531062D,
+ 76A157A111866670A4678F04,
+ B28EFB9D1DF0B6D6499A7DEF,
+ 1CFE3935A3B810D5D68A2504,
+ 61AE09C749B007B70A265D9B,
+ 873F9DD54978E601102353B4,
+ 49ECA8B998B339A083674A22,
+ 7983C452610C1638B7E78F12,
+ 24D74AF1C95BEF957DC4FA77,
+ 34F1320BC5C23702C08DF9F0,
+ 23CD1A3F9067C3A0ECE7BB67,
+ F90C8B0233A54F1445343F67, ); name = Frameworks; sourceTree = "<group>"; };
+ BFDAF16175D03695EEB466BC = {isa = PBXGroup; children = (
+ CFF2BBEB242CC8B3B904B5F9, ); name = Products; sourceTree = "<group>"; };
+ 91A9A0FE9DF4F4E10009EEC7 = {isa = PBXGroup; children = (
+ 0CCFDC1D1C7B8A12BF4822F1,
+ 9683F931FA1B8B85FA8C4BD8,
+ 5A0B2CEF393A25C6D4B1B76C,
+ 61F3057D838D7DABB0FA3D34,
+ D87DCD5DA4EC8D78DFF37FCC,
+ 4452EAA652B65A9AE648288C,
+ BFDAF16175D03695EEB466BC, ); name = Source; sourceTree = "<group>"; };
+ B18D059E5616FA729F764229 = {isa = XCBuildConfiguration; buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
CODE_SIGN_ENTITLEMENTS = "DemoRunner.entitlements";
COMBINE_HIDPI_IMAGES = YES;
"JUCE_DEMO_RUNNER=1",
"JUCE_UNIT_TESTS=1",
"JUCER_XCODE_IPHONE_5BC26AE3=1",
- "JUCE_APP_VERSION=5.3.1",
- "JUCE_APP_VERSION_HEX=0x50301",
+ "JUCE_APP_VERSION=5.3.2",
+ "JUCE_APP_VERSION_HEX=0x50302",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
INFOPLIST_FILE = Info-App.plist;
INFOPLIST_PREPROCESS = NO;
INSTALL_PATH = "$(HOME)/Applications";
- PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.demorunner;
+ OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code";
+ PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner;
USE_HEADERMAP = NO; }; name = Debug; };
- 878F062DF0F2D968EC322CF4 = {isa = XCBuildConfiguration; buildSettings = {
+ 69330F27DD2C71609336C7D2 = {isa = XCBuildConfiguration; buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
CODE_SIGN_ENTITLEMENTS = "DemoRunner.entitlements";
COMBINE_HIDPI_IMAGES = YES;
"JUCE_DEMO_RUNNER=1",
"JUCE_UNIT_TESTS=1",
"JUCER_XCODE_IPHONE_5BC26AE3=1",
- "JUCE_APP_VERSION=5.3.1",
- "JUCE_APP_VERSION_HEX=0x50301",
+ "JUCE_APP_VERSION=5.3.2",
+ "JUCE_APP_VERSION_HEX=0x50302",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
INFOPLIST_PREPROCESS = NO;
INSTALL_PATH = "$(HOME)/Applications";
LLVM_LTO = YES;
- PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.demorunner;
+ OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code";
+ PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner;
USE_HEADERMAP = NO; }; name = Release; };
- 49CDF00877DBD03D2C6D7313 = {isa = XCBuildConfiguration; buildSettings = {
+ C01EC82F42B640CA1E54AD53 = {isa = XCBuildConfiguration; buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
TARGETED_DEVICE_FAMILY = "1,2";
WARNING_CFLAGS = -Wreorder;
ZERO_LINK = NO; }; name = Debug; };
- 4CADE461B4B845777C2F3084 = {isa = XCBuildConfiguration; buildSettings = {
+ 07EA85D22270E8EA13CA0BBE = {isa = XCBuildConfiguration; buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
TARGETED_DEVICE_FAMILY = "1,2";
WARNING_CFLAGS = -Wreorder;
ZERO_LINK = NO; }; name = Release; };
- 82C712E3A2B72D3FE08871AB = {isa = PBXTargetDependency; target = AF4A5EF10D3A095A9074F9CF; };
- F63BE64D6F90B83AFFFBC14F = {isa = XCConfigurationList; buildConfigurations = (
- 49CDF00877DBD03D2C6D7313,
- 4CADE461B4B845777C2F3084, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
- 77311CC6EFE85E7117AD3242 = {isa = XCConfigurationList; buildConfigurations = (
- CEC200AA273D1626F466FC27,
- 878F062DF0F2D968EC322CF4, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
- 2077585B61D41BDA5967E25C = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (
- B1776D2FEB204FAE5C17E4C7,
- 686146610021944DA9C987B8,
- F657E50CA75FE6932E710CB0, ); runOnlyForDeploymentPostprocessing = 0; };
- 7C6E2E57520A67ACFE86097B = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (
- F9EDB3A8F55A4499441401D6,
- EACB962CC04BDC0369264A8F,
- 557BA8FDD37630DF5EB84EE0,
- 5CFCACD6AF608BDC2E1E8BD1,
- 9263171BCE90616A9F350405,
- 2EF49BC29DA0951B1C43070F,
- 8861132DCB0DE3F9EB0DD278,
- CCDAEA12C17058099252FD3D,
- 28778136A8C09DBDC980CB72,
- DA696766645C964870153095,
- 8F5FE1B5D44F55667509BC99,
- 3656169644FED0C525D5D30C,
- 2763512B6DFF68C0EEF72496,
- 480F45A17B4E83A26B1ACEF9,
- 3D8EECDED13F0A46A6FA8D3E,
- E433C1C591D091AF71AD528E,
- A5F8F9904580960794429360,
- B298295E61E5DD800B814DAF,
- A7E206DD280DC58E2A150642,
- 26260D259EFF13BD5044CD34,
- 591D5799ED6524DE9BD846D7,
- D09859BDBC491A9932637715,
- 7EC8A06F9290B16DFB16E346,
- 33C96917E46535D30B17B483,
- 8AA7BB967216BDBFF0371267,
- FD5B59B8A0B8258531421E60, ); runOnlyForDeploymentPostprocessing = 0; };
- FB8E53AB54C36DCB3C3FC501 = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (
- C8D093204643DE75CAA41A3F,
- 7286A5BB489F25E6E3CF63D4,
- B6AB4CB9F0A0AD540028A3E1,
- 71F90E5ABB1112D2D92EAB59,
- AB53895F1E4193A2C9B51DB6,
- 9CB6071FE1DD378F7C64C9F5,
- 1D98F6C4127BB7F0890645D6,
- 0B1AC7FEC205238C5701B086,
- 2EF15A7E6ECFD861D719276A,
- 9318D1152DE35146100C7594,
- BA3F994E8752E7310789C02A,
- 06DA6875AC3E734378E374C5,
- 9F59844F463603E7C2467DC4,
- C7D4E452620DF858B785BA82,
- 3D2D1CCFB4B682162034225E,
- EDAD741A46FD4B3F002C96D3, ); runOnlyForDeploymentPostprocessing = 0; };
- AF4A5EF10D3A095A9074F9CF = {isa = PBXNativeTarget; buildConfigurationList = 77311CC6EFE85E7117AD3242; buildPhases = (
- 2077585B61D41BDA5967E25C,
- 7C6E2E57520A67ACFE86097B,
- FB8E53AB54C36DCB3C3FC501, ); buildRules = ( ); dependencies = ( ); name = "DemoRunner - App"; productName = DemoRunner; productReference = B953F5C249804F38B818AD2F; productType = "com.apple.product-type.application"; };
- 15C553274AB25531D0A16FBE = {isa = PBXProject; buildConfigurationList = F63BE64D6F90B83AFFFBC14F; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { AF4A5EF10D3A095A9074F9CF = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.iCloud = { enabled = 1; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9979C8B054ED17C9E04C6BAB; projectDirPath = ""; projectRoot = ""; targets = (AF4A5EF10D3A095A9074F9CF); };
+ D87BAF6D1A7451B7A733B5F1 = {isa = PBXTargetDependency; target = 291E01DCBE746A376DBFA4D1; };
+ 80E8AD1971F52B06F4D28891 = {isa = XCConfigurationList; buildConfigurations = (
+ C01EC82F42B640CA1E54AD53,
+ 07EA85D22270E8EA13CA0BBE, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
+ 413FBEAEC84DFEC41133C78B = {isa = XCConfigurationList; buildConfigurations = (
+ B18D059E5616FA729F764229,
+ 69330F27DD2C71609336C7D2, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; };
+ 57134FDD813875865F5B2057 = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (
+ 47ED2C78B05B8A6A00E36C46,
+ 8E63755144E29269FD82C897,
+ 75DB074DBAE04408A0A917B7, ); runOnlyForDeploymentPostprocessing = 0; };
+ ED916866997CA4F40C7C1016 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (
+ E6F58FC3ACAE774DB4D06420,
+ 36E115D98311F12AA06710E6,
+ B38728296BB32B7994CE28DF,
+ 71DF4F5EB4C8305688416725,
+ 4FBBB55F4E347757F74F1F41,
+ F619F3887CEC064441BB6EE6,
+ C2BB2B6DA237FE0CB64C7EDA,
+ F28112945CEBEA4CE8975833,
+ 9EACEA6BE8D0ACC72C12C080,
+ 26652AB1BB77C8A39434775F,
+ 2707968B431D83AC7E28E49B,
+ 712D81867EC698463252FA79,
+ 49E7BBD46981F0035E4E9021,
+ 611298FAC1A543BDD10D4C41,
+ D183F8140174ACCDDCD230A2,
+ FF87532E62753EDFA3D29CAD,
+ 2F76CA28C8C0EFC7453D0EB8,
+ 6B5560283DEEBD6DD2D6C984,
+ 1DBDFEDE359CFC84F8E3DE4C,
+ CDABEA6258EC70C65C9ACCFE,
+ E2F44A968EC2598DAE33A997,
+ 5CB78489F16E82144914972D,
+ BC6036F22423CA0AFF0385A7,
+ AEA090DAC5C747C50C7D3FA7,
+ CDEB6BA5341494AF51D07C72,
+ 0140787C0118A95E37DE90B4, ); runOnlyForDeploymentPostprocessing = 0; };
+ 4B1F6E32C9FC8D779B21C1AF = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (
+ 48CF0B02E1D06E5DA51E6270,
+ 163B0CF2DD0990A63DF1D5A6,
+ 7B4163348896EB1B86B15160,
+ 8C0AEA08A71075A6C765AEC9,
+ 1351A13E78F38741C6075600,
+ 527DA2E6827BAFDDD3E8E80F,
+ 34A4931AF1DD424D3A400EEF,
+ 7F57DB52C3CEFDC26DDD38FC,
+ 46071CE2B98B562B7BF27CB1,
+ 6A61CBB4E39BFD392D97528F,
+ 0B0CE6D5062E5C02A41F24BC,
+ 5E4310B3F6BB639875D3E9B8,
+ AE7FB2AC3885F4BF53A5DDA1,
+ 1FB200F4AE3E4E7CDFF629BB,
+ AC783ECD84496E0B77911EEE,
+ B1981F62F6A91FD2F579A198,
+ ECA44A41DA8A935178C1A1F4, ); runOnlyForDeploymentPostprocessing = 0; };
+ 291E01DCBE746A376DBFA4D1 = {isa = PBXNativeTarget; buildConfigurationList = 413FBEAEC84DFEC41133C78B; buildPhases = (
+ 57134FDD813875865F5B2057,
+ ED916866997CA4F40C7C1016,
+ 4B1F6E32C9FC8D779B21C1AF, ); buildRules = ( ); dependencies = ( ); name = "DemoRunner - App"; productName = DemoRunner; productReference = CFF2BBEB242CC8B3B904B5F9; productType = "com.apple.product-type.application"; };
+ AC6F0E9A0809A184B2C2B7DE = {isa = PBXProject; buildConfigurationList = 80E8AD1971F52B06F4D28891; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { 291E01DCBE746A376DBFA4D1 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.iCloud = { enabled = 1; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 91A9A0FE9DF4F4E10009EEC7; projectDirPath = ""; projectRoot = ""; targets = (291E01DCBE746A376DBFA4D1); };
};
- rootObject = 15C553274AB25531D0A16FBE;
+ rootObject = AC6F0E9A0809A184B2C2B7DE;
}
<true/>\r
<key>NSMicrophoneUsageDescription</key>\r
<string>This is an audio app which requires audio input. If you do not have a USB audio interface connected it will use the microphone.</string>\r
+ <key>NSCameraUsageDescription</key>\r
+ <string>This app requires camera usage to function properly.</string>\r
<key>UIViewControllerBasedStatusBarAppearance</key>\r
<false/>\r
<key>CFBundleExecutable</key>\r
<string>${EXECUTABLE_NAME}</string>\r
<key>CFBundleIdentifier</key>\r
- <string>com.roli.juce.demorunner</string>\r
+ <string>com.juce.demorunner</string>\r
<key>CFBundleName</key>\r
<string>DemoRunner</string>\r
<key>CFBundleDisplayName</key>\r
<key>CFBundleSignature</key>\r
<string>????</string>\r
<key>CFBundleShortVersionString</key>\r
- <string>5.3.1</string>\r
+ <string>5.3.2</string>\r
<key>CFBundleVersion</key>\r
- <string>5.3.1</string>\r
+ <string>5.3.2</string>\r
<key>NSHumanReadableCopyright</key>\r
<string>Copyright (c) 2018 - ROLI Ltd.</string>\r
<key>NSHighResolutionCapable</key>\r
<true/>\r
<key>UISupportedInterfaceOrientations</key>\r
<array>\r
+ <string>UIInterfaceOrientationPortrait</string>\r
<string>UIInterfaceOrientationLandscapeLeft</string>\r
<string>UIInterfaceOrientationLandscapeRight</string>\r
</array>\r
<?xml version="1.0" encoding="UTF-8"?>\r
\r
<JUCERPROJECT name="DemoRunner" projectType="guiapp" jucerVersion="5.3.1" defines="JUCE_DEMO_RUNNER=1 JUCE_UNIT_TESTS=1"\r
- bundleIdentifier="com.roli.juce.demorunner" version="5.3.1" companyName="ROLI Ltd."\r
+ bundleIdentifier="com.juce.demorunner" version="5.3.2" companyName="ROLI Ltd."\r
companyCopyright="Copyright (c) 2018 - ROLI Ltd." companyWebsite="https://www.juce.com/"\r
- companyEmail="info@juce.com">\r
+ companyEmail="info@juce.com" id="yj7xMM" reportAppUsage="1">\r
<MAINGROUP id="G8kbr7" name="DemoRunner">\r
<GROUP id="{20E3F84A-29E9-D5FF-4559-1A9E4A70CD60}" name="Source">\r
<GROUP id="{272A692A-6AFE-68BD-C8E8-63B3D62245B1}" name="Demos">\r
</MAINGROUP>\r
<EXPORTFORMATS>\r
<XCODE_MAC targetFolder="Builds/MacOSX" smallIcon="YyqWd2" bigIcon="YyqWd2"\r
- extraCompilerFlags="-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code">\r
+ extraCompilerFlags="-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code"\r
+ customXcodeResourceFolders="../Audio ../BLOCKS ../DSP ../GUI ../Utilities">\r
<CONFIGURATIONS>\r
<CONFIGURATION isDebug="1" name="Debug"/>\r
<CONFIGURATION isDebug="0" name="Release"/>\r
</MODULEPATHS>\r
</LINUX_MAKE>\r
<ANDROIDSTUDIO targetFolder="Builds/Android" androidSDKPath="" androidNDKPath=""\r
- androidMinimumSDK="23" androidScreenOrientation="landscape" microphonePermissionNeeded="1"\r
- androidBluetoothNeeded="1" androidExternalReadNeeded="1" androidExternalWriteNeeded="1"\r
+ androidMinimumSDK="23" microphonePermissionNeeded="1" androidBluetoothNeeded="1"\r
+ androidExternalReadNeeded="1" androidExternalWriteNeeded="1"\r
androidEnableContentSharing="1" androidExtraAssetsFolder="../Assets"\r
- smallIcon="YyqWd2" bigIcon="YyqWd2">\r
+ smallIcon="YyqWd2" bigIcon="YyqWd2" cameraPermissionNeeded="1">\r
<CONFIGURATIONS>\r
<CONFIGURATION isDebug="1" name="Debug" androidArchitectures="armeabi x86"/>\r
<CONFIGURATION isDebug="0" name="Release"/>\r
<MODULEPATH id="juce_analytics" path="../../modules"/>\r
</MODULEPATHS>\r
</ANDROIDSTUDIO>\r
- <XCODE_IPHONE targetFolder="Builds/iOS" iosScreenOrientation="landscape" iPadScreenOrientation="landscape"\r
- UISupportsDocumentBrowser="1" microphonePermissionNeeded="1"\r
- iCloudPermissions="1" UIFileSharingEnabled="1" customXcodeResourceFolders="../Assets"\r
- smallIcon="YyqWd2" bigIcon="YyqWd2">\r
+ <XCODE_IPHONE targetFolder="Builds/iOS" UISupportsDocumentBrowser="1" microphonePermissionNeeded="1"\r
+ cameraPermissionNeeded="1" iCloudPermissions="1" UIFileSharingEnabled="1"\r
+ customXcodeResourceFolders="../Assets" smallIcon="YyqWd2" bigIcon="YyqWd2"\r
+ extraCompilerFlags="-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code">\r
<CONFIGURATIONS>\r
<CONFIGURATION isDebug="1" name="Debug"/>\r
<CONFIGURATION isDebug="0" name="Release"/>\r
<MODULE id="juce_video" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>\r
</MODULES>\r
<JUCEOPTIONS JUCE_USE_CAMERA="1" JUCE_USE_MP3AUDIOFORMAT="1"/>\r
+ <LIVE_SETTINGS>\r
+ <OSX/>\r
+ </LIVE_SETTINGS>\r
</JUCERPROJECT>\r
#endif\r
\r
#ifndef JUCE_REPORT_APP_USAGE\r
- #define JUCE_REPORT_APP_USAGE 0\r
+ #define JUCE_REPORT_APP_USAGE 1\r
#endif\r
\r
// END SECTION A\r
//#define JUCE_PLUGINHOST_AU 0\r
#endif\r
\r
+#ifndef JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
//==============================================================================\r
// juce_audio_utils flags:\r
\r
namespace ProjectInfo\r
{\r
const char* const projectName = "DemoRunner";\r
- const char* const versionString = "5.3.1";\r
- const int versionNumber = 0x50301;\r
+ const char* const versionString = "5.3.2";\r
+ const int versionNumber = 0x50302;\r
}\r
#endif\r
#include "../../../Audio/MPEDemo.h"\r
#include "../../../Audio/PluckedStringsDemo.h"\r
\r
-#if (defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) && (defined (JUCE_HAS_CONSTEXPR))\r
+#if JUCE_HAS_CONSTEXPR\r
#include "../../../Audio/SimpleFFTDemo.h"\r
#include "../../../BLOCKS/BlocksDrawingDemo.h"\r
#include "../../../BLOCKS/BlocksMonitorDemo.h"\r
#include "../../../Utilities/LiveConstantDemo.h"\r
#include "../../../Utilities/MultithreadingDemo.h"\r
#include "../../../Utilities/NetworkingDemo.h"\r
-#if defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)\r
- #include "../../../Utilities/OSCDemo.h"\r
-#endif\r
+#include "../../../Utilities/OSCDemo.h"\r
#include "../../../Utilities/SystemInfoDemo.h"\r
#include "../../../Utilities/TimersAndEventsDemo.h"\r
#include "../../../Utilities/UnitTestsDemo.h"\r
REGISTER_DEMO (MPEDemo, Audio, false)\r
REGISTER_DEMO (PluckedStringsDemo, Audio, false)\r
\r
- #if (defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) && (defined (JUCE_HAS_CONSTEXPR))\r
+ #if JUCE_HAS_CONSTEXPR\r
REGISTER_DEMO (SimpleFFTDemo, Audio, false)\r
REGISTER_DEMO (BlocksDrawingDemo, BLOCKS, false)\r
REGISTER_DEMO (BlocksMonitorDemo, BLOCKS, false)\r
REGISTER_DEMO (LiveConstantDemo, Utilities, false)\r
REGISTER_DEMO (MultithreadingDemo, Utilities, false)\r
REGISTER_DEMO (NetworkingDemo, Utilities, false)\r
- #if defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)\r
REGISTER_DEMO (OSCDemo, Utilities, false)\r
- #endif\r
REGISTER_DEMO (SystemInfoDemo, Utilities, false)\r
REGISTER_DEMO (TimersAndEventsDemo, Utilities, false)\r
REGISTER_DEMO_WITH_FILENAME (UnitTestClasses::UnitTestsDemo, Utilities, UnitTestsDemo, false)\r
#include "../../../GUI/AnimationAppDemo.h"\r
#include "../../../GUI/AnimationDemo.h"\r
#include "../../../GUI/BouncingBallWavetableDemo.h"\r
-#if JUCE_MAC || JUCE_WINDOWS\r
+#if JUCE_USE_CAMERA && ! JUCE_LINUX\r
#include "../../../GUI/CameraDemo.h"\r
#endif\r
#if ! JUCE_ANDROID\r
#include "../../../GUI/ComponentDemo.h"\r
#include "../../../GUI/ComponentTransformsDemo.h"\r
#include "../../../GUI/DialogsDemo.h"\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
- #include "../../../GUI/FlexBoxDemo.h"\r
-#endif\r
+#include "../../../GUI/FlexBoxDemo.h"\r
#include "../../../GUI/FontsDemo.h"\r
#include "../../../GUI/GraphicsDemo.h"\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_HAS_CONSTEXPR\r
+#if JUCE_HAS_CONSTEXPR\r
#include "../../../GUI/GridDemo.h"\r
#endif\r
#include "../../../GUI/ImagesDemo.h"\r
REGISTER_DEMO (AnimationAppDemo, GUI, false)\r
REGISTER_DEMO (AnimationDemo, GUI, false)\r
REGISTER_DEMO (BouncingBallWavetableDemo, GUI, false)\r
- #if JUCE_MAC || JUCE_WINDOWS\r
+ #if JUCE_USE_CAMERA && ! JUCE_LINUX\r
REGISTER_DEMO (CameraDemo, GUI, true)\r
#endif\r
#if ! JUCE_ANDROID\r
REGISTER_DEMO (ComponentDemo, GUI, false)\r
REGISTER_DEMO (ComponentTransformsDemo, GUI, false)\r
REGISTER_DEMO (DialogsDemo, GUI, false)\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
REGISTER_DEMO (FlexBoxDemo, GUI, false)\r
- #endif\r
REGISTER_DEMO (FontsDemo, GUI, false)\r
REGISTER_DEMO (GraphicsDemo, GUI, false)\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_HAS_CONSTEXPR\r
+ #if JUCE_HAS_CONSTEXPR\r
REGISTER_DEMO (GridDemo, GUI, false)\r
#endif\r
REGISTER_DEMO (ImagesDemo, GUI, false)\r
\r
void JUCEDemos::registerDemo (std::function<Component*()> constructorCallback, const String& filePath, const String& category, bool isHeavyweight)\r
{\r
- auto f = findExamplesDirectoryFromExecutable (File::getSpecialLocation (File::SpecialLocationType::currentApplicationFile));\r
+ #if JUCE_MAC\r
+ auto f = File::getSpecialLocation (File::currentExecutableFile)\r
+ .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile (filePath);\r
+ #else\r
+ auto f = findExamplesDirectoryFromExecutable (File::getSpecialLocation (File::currentApplicationFile));\r
+ #endif\r
\r
#if ! (JUCE_ANDROID || JUCE_IOS)\r
if (f == File())\r
}\r
\r
//==============================================================================\r
-ScopedPointer<AudioDeviceManager> sharedAudioDeviceManager;\r
+std::unique_ptr<AudioDeviceManager> sharedAudioDeviceManager;\r
\r
static String getCurrentDefaultAudioDeviceName (AudioDeviceManager& deviceManager, bool isInput)\r
{\r
AudioDeviceManager& getSharedAudioDeviceManager (int numInputChannels, int numOutputChannels)\r
{\r
if (sharedAudioDeviceManager == nullptr)\r
- sharedAudioDeviceManager = new AudioDeviceManager();\r
+ sharedAudioDeviceManager.reset (new AudioDeviceManager());\r
\r
auto* currentDevice = sharedAudioDeviceManager->getCurrentAudioDevice();\r
\r
#define REGISTER_DEMO(DemoName, category, heavyweight) JUCEDemos::registerDemo ([] { return new DemoName(); }, CREATE_FILEPATH(DemoName, category), JUCE_STRINGIFY (category), heavyweight);\r
#define REGISTER_DEMO_WITH_FILENAME(DemoName, category, fileName, heavyweight) JUCEDemos::registerDemo ([] { return new DemoName(); }, CREATE_FILEPATH(fileName, category), JUCE_STRINGIFY (category), heavyweight);\r
\r
-\r
//==============================================================================\r
struct JUCEDemos\r
{\r
CodeEditorComponent::ColourScheme getLightColourScheme();\r
\r
//==============================================================================\r
-extern ScopedPointer<AudioDeviceManager> sharedAudioDeviceManager;\r
+extern std::unique_ptr<AudioDeviceManager> sharedAudioDeviceManager;\r
\r
AudioDeviceManager& getSharedAudioDeviceManager (int numInputChannels = -1, int numOutputChannels = -1);\r
// (This function call is for one of the demos, which involves launching a child process)\r
if (invokeChildProcessDemo (commandLine))\r
return;\r
+ #else\r
+ ignoreUnused (commandLine);\r
#endif\r
\r
- mainWindow = new MainAppWindow (getApplicationName());\r
+ mainWindow.reset (new MainAppWindow (getApplicationName()));\r
}\r
\r
void backButtonPressed() override { mainWindow->getMainComponent().getSidePanel().showOrHide (false); }\r
\r
#if JUCE_IOS || JUCE_ANDROID\r
setFullScreen (true);\r
+ Desktop::getInstance().setOrientationsEnabled (Desktop::rotatedClockwise | Desktop::rotatedAntiClockwise);\r
#else\r
setBounds ((int) (0.1f * getParentWidth()),\r
(int) (0.1f * getParentHeight()),\r
setVisible (true);\r
\r
#if JUCE_WINDOWS || JUCE_LINUX || JUCE_MAC\r
- taskbarIcon = new DemoTaskbarComponent();\r
+ taskbarIcon.reset (new DemoTaskbarComponent());\r
#endif\r
}\r
\r
MainComponent& getMainComponent() { return *dynamic_cast<MainComponent*> (getContentComponent()); }\r
\r
private:\r
- ScopedPointer<Component> taskbarIcon;\r
+ std::unique_ptr<Component> taskbarIcon;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainAppWindow)\r
};\r
\r
- ScopedPointer<MainAppWindow> mainWindow;\r
+ std::unique_ptr<MainAppWindow> mainWindow;\r
};\r
\r
//==============================================================================\r
\r
if (comp != nullptr)\r
{\r
- addAndMakeVisible (comp);\r
+ addAndMakeVisible (comp.get());\r
resized();\r
}\r
}\r
void showHomeScreen() { setComponent (createIntroDemo()); }\r
\r
private:\r
- ScopedPointer<Component> comp;\r
+ std::unique_ptr<Component> comp;\r
};\r
\r
//==============================================================================\r
: TabbedComponent (TabbedButtonBar::Orientation::TabsAtTop),\r
demoChangedCallback (callback)\r
{\r
- addTab ("Demo", Colours::transparentBlack, demoContent = new DemoContent(), false);\r
+ demoContent.reset (new DemoContent());\r
+ addTab ("Demo", Colours::transparentBlack, demoContent.get(), false);\r
\r
#if ! (JUCE_ANDROID || JUCE_IOS)\r
- addTab ("Code", Colours::transparentBlack, codeContent = new CodeContent(), false);\r
+ codeContent.reset (new CodeContent());\r
+ addTab ("Code", Colours::transparentBlack, codeContent.get(), false);\r
#endif\r
\r
addTab ("Settings", Colours::transparentBlack, new SettingsContent (dynamic_cast<MainComponent&> (mainComponent)), true);\r
private:\r
std::function<void(bool)> demoChangedCallback;\r
\r
- ScopedPointer<DemoContent> demoContent;\r
+ std::unique_ptr<DemoContent> demoContent;\r
\r
#if ! (JUCE_ANDROID || JUCE_IOS)\r
- ScopedPointer<CodeContent> codeContent;\r
+ std::unique_ptr<CodeContent> codeContent;\r
#endif\r
\r
String currentDemoCategory;\r
//==============================================================================\r
MainComponent::MainComponent()\r
{\r
- contentComponent = new DemoContentComponent (*this, [this] (bool isHeavyweight)\r
+ contentComponent.reset (new DemoContentComponent (*this, [this] (bool isHeavyweight)\r
{\r
#if (JUCE_ANDROID || JUCE_IOS)\r
demosPanel.showOrHide (false);\r
\r
isShowingHeavyweightDemo = isHeavyweight;\r
resized();\r
- });\r
+ }));\r
\r
demosPanel.setContent (new DemoList (*contentComponent));\r
demosPanel.setTitleBarComponent (new SidePanelHeader (*this), true);\r
\r
- addAndMakeVisible (contentComponent);\r
+ addAndMakeVisible (contentComponent.get());\r
addAndMakeVisible (showDemosButton);\r
addAndMakeVisible (demosPanel);\r
\r
void updateRenderingEngine (int index);\r
\r
//==============================================================================\r
- ScopedPointer<DemoContentComponent> contentComponent;\r
+ std::unique_ptr<DemoContentComponent> contentComponent;\r
SidePanel demosPanel { "Demos", 250, true };\r
\r
OpenGLContext openGLContext;\r
rendererLabel.setJustificationType (Justification::centredRight);\r
rendererLabel.attachToComponent (&rendererSelector, true);\r
\r
- addAndMakeVisible (audioSettings = new AudioDeviceSelectorComponent (getSharedAudioDeviceManager(),\r
- 0, 256, 0, 256, true, true, true, false));\r
+ audioSettings.reset (new AudioDeviceSelectorComponent (getSharedAudioDeviceManager(),\r
+ 0, 256, 0, 256, true, true, true, false));\r
+ addAndMakeVisible (audioSettings.get());\r
audioSettings->setItemHeight (itemHeight);\r
\r
setOpaque (true);\r
StringArray lookAndFeelNames;\r
OwnedArray<LookAndFeel> lookAndFeels;\r
\r
- ScopedPointer<AudioDeviceSelectorComponent> audioSettings;\r
+ std::unique_ptr<AudioDeviceSelectorComponent> audioSettings;\r
\r
//==============================================================================\r
void refreshRenderingEngineSelector()\r
\r
dependencies: juce_core, juce_cryptography, juce_data_structures, juce_events,\r
juce_graphics, juce_gui_basics, juce_gui_extra, juce_video\r
- exporters: xcode_mac, vs2017, linux_make\r
+ exporters: xcode_mac, vs2017, androidstudio, xcode_iphone\r
\r
moduleFlags: JUCE_USE_CAMERA=1\r
\r
#include "../Assets/DemoUtilities.h"\r
\r
//==============================================================================\r
-class CameraDemo : public Component,\r
- private CameraDevice::Listener,\r
- private AsyncUpdater\r
+class CameraDemo : public Component\r
{\r
public:\r
CameraDemo()\r
{\r
setOpaque (true);\r
\r
+ #if JUCE_ANDROID\r
+ // Android requires exclusive access to the audio device when recording videos.\r
+ audioDeviceManager.closeAudioDevice();\r
+ #endif\r
+\r
addAndMakeVisible (cameraSelectorComboBox);\r
updateCameraList();\r
cameraSelectorComboBox.setSelectedId (1);\r
cameraSelectorComboBox.setSelectedId (2);\r
\r
setSize (500, 500);\r
+\r
+ #if JUCE_IOS || JUCE_ANDROID\r
+ setPortraitOrientationEnabled (true);\r
+ #endif\r
+ }\r
+\r
+ ~CameraDemo()\r
+ {\r
+ #if JUCE_IOS || JUCE_ANDROID\r
+ setPortraitOrientationEnabled (false);\r
+ #endif\r
+\r
+ #if JUCE_ANDROID\r
+ audioDeviceManager.restartLastAudioDevice();\r
+ #endif\r
}\r
\r
//==============================================================================\r
recordMovieButton.setBounds (top.removeFromLeft (recordMovieButton.getWidth()));\r
\r
r.removeFromTop (4);\r
- auto previewArea = r.removeFromTop (r.getHeight() / 2);\r
+ auto previewArea = shouldUseLandscapeLayout() ? r.removeFromLeft (r.getWidth() / 2)\r
+ : r.removeFromTop (r.getHeight() / 2);\r
\r
if (cameraPreviewComp.get() != nullptr)\r
cameraPreviewComp->setBounds (previewArea);\r
\r
- r.removeFromTop (4);\r
+ if (shouldUseLandscapeLayout())\r
+ r.removeFromLeft (4);\r
+ else\r
+ r.removeFromTop (4);\r
+\r
lastSnapshot.setBounds (r);\r
}\r
\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<CameraDevice> cameraDevice;\r
- ScopedPointer<Component> cameraPreviewComp;\r
+ // if this PIP is running inside the demo runner, we'll use the shared device manager instead\r
+ #ifndef JUCE_DEMO_RUNNER\r
+ AudioDeviceManager audioDeviceManager;\r
+ #else\r
+ AudioDeviceManager& audioDeviceManager { getSharedAudioDeviceManager (0, 2) };\r
+ #endif\r
+\r
+ std::unique_ptr<CameraDevice> cameraDevice;\r
+ std::unique_ptr<Component> cameraPreviewComp;\r
ImageComponent lastSnapshot;\r
\r
ComboBox cameraSelectorComboBox { "Camera" };\r
TextButton snapshotButton { "Take a snapshot" };\r
+ #if ! JUCE_ANDROID && ! JUCE_IOS\r
TextButton recordMovieButton { "Record a movie (to your desktop)..." };\r
+ #else\r
+ TextButton recordMovieButton { "Record a movie" };\r
+ #endif\r
bool recordingMovie = false;\r
+ File recordingFile;\r
+ bool contentSharingPending = false;\r
+\r
+ void setPortraitOrientationEnabled (bool shouldBeEnabled)\r
+ {\r
+ auto allowedOrientations = Desktop::getInstance().getOrientationsEnabled();\r
+\r
+ if (shouldBeEnabled)\r
+ allowedOrientations |= Desktop::upright;\r
+ else\r
+ allowedOrientations &= ~Desktop::upright;\r
+\r
+ Desktop::getInstance().setOrientationsEnabled (allowedOrientations);\r
+ }\r
+\r
+ bool shouldUseLandscapeLayout() const noexcept\r
+ {\r
+ #if JUCE_ANDROID || JUCE_IOS\r
+ auto orientation = Desktop::getInstance().getCurrentOrientation();\r
+ return orientation == Desktop::rotatedClockwise || orientation == Desktop::rotatedAntiClockwise;\r
+ #else\r
+ return false;\r
+ #endif\r
+ }\r
\r
void updateCameraList()\r
{\r
void cameraChanged()\r
{\r
// This is called when the user chooses a camera from the drop-down list.\r
- cameraDevice .reset();\r
+ #if JUCE_IOS\r
+ // On iOS, when switching camera, open the new camera first, so that it can\r
+ // share the underlying camera session with the old camera. Otherwise, the\r
+ // session would have to be closed first, which can take several seconds.\r
+ if (cameraSelectorComboBox.getSelectedId() == 1)\r
+ cameraDevice.reset();\r
+ #else\r
+ cameraDevice.reset();\r
+ #endif\r
cameraPreviewComp.reset();\r
recordingMovie = false;\r
\r
if (cameraSelectorComboBox.getSelectedId() > 1)\r
{\r
- // Try to open the user's choice of camera..\r
- cameraDevice.reset (CameraDevice::openDevice (cameraSelectorComboBox.getSelectedId() - 2));\r
+ #if JUCE_ANDROID || JUCE_IOS\r
+ openCameraAsync();\r
+ #else\r
+ cameraDeviceOpenResult (CameraDevice::openDevice (cameraSelectorComboBox.getSelectedId() - 2), {});\r
+ #endif\r
+ }\r
+ else\r
+ {\r
+ snapshotButton .setEnabled (cameraDevice != nullptr && ! contentSharingPending);\r
+ recordMovieButton.setEnabled (cameraDevice != nullptr && ! contentSharingPending);\r
+ resized();\r
+ }\r
+ }\r
\r
- // and if it worked, create a preview component for it..\r
- if (cameraDevice.get() != nullptr)\r
- {\r
- cameraPreviewComp.reset (cameraDevice->createViewerComponent());\r
- addAndMakeVisible (cameraPreviewComp.get());\r
- }\r
+ void openCameraAsync()\r
+ {\r
+ SafePointer<CameraDemo> safeThis (this);\r
+\r
+ CameraDevice::openDeviceAsync (cameraSelectorComboBox.getSelectedId() - 2,\r
+ [safeThis] (CameraDevice* device, const String& error) mutable\r
+ {\r
+ if (safeThis)\r
+ safeThis->cameraDeviceOpenResult (device, error);\r
+ });\r
+ }\r
+\r
+ void cameraDeviceOpenResult (CameraDevice* device, const String& error)\r
+ {\r
+ // If camera opening worked, create a preview component for it..\r
+ cameraDevice.reset (device);\r
+\r
+ if (cameraDevice.get() != nullptr)\r
+ {\r
+ #if JUCE_ANDROID\r
+ SafePointer<CameraDemo> safeThis (this);\r
+ cameraDevice->onErrorOccurred = [safeThis] (const String& error) mutable { if (safeThis) safeThis->errorOccurred (error); };\r
+ #endif\r
+ cameraPreviewComp.reset (cameraDevice->createViewerComponent());\r
+ addAndMakeVisible (cameraPreviewComp.get());\r
+ }\r
+ else\r
+ {\r
+ AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Camera open failed",\r
+ "Camera open failed, reason: " + error);\r
}\r
\r
- snapshotButton .setEnabled (cameraDevice.get() != nullptr);\r
- recordMovieButton.setEnabled (cameraDevice.get() != nullptr);\r
+ snapshotButton .setEnabled (cameraDevice.get() != nullptr && ! contentSharingPending);\r
+ recordMovieButton.setEnabled (cameraDevice.get() != nullptr && ! contentSharingPending);\r
resized();\r
}\r
\r
// Start recording to a file on the user's desktop..\r
recordingMovie = true;\r
\r
- auto file = File::getSpecialLocation (File::userDesktopDirectory)\r
- .getNonexistentChildFile ("JuceCameraDemo", CameraDevice::getFileExtension());\r
+ #if JUCE_ANDROID || JUCE_IOS\r
+ recordingFile = File::getSpecialLocation (File::tempDirectory)\r
+ #else\r
+ recordingFile = File::getSpecialLocation (File::userDesktopDirectory)\r
+ #endif\r
+ .getNonexistentChildFile ("JuceCameraVideoDemo", CameraDevice::getFileExtension());\r
+\r
+ #if JUCE_ANDROID\r
+ // Android does not support taking pictures while recording video.\r
+ snapshotButton.setEnabled (false);\r
+ #endif\r
\r
- cameraDevice->startRecordingToFile (file);\r
+ cameraSelectorComboBox.setEnabled (false);\r
+ cameraDevice->startRecordingToFile (recordingFile);\r
recordMovieButton.setButtonText ("Stop Recording");\r
}\r
else\r
// Already recording, so stop...\r
recordingMovie = false;\r
cameraDevice->stopRecording();\r
+ #if ! JUCE_ANDROID && ! JUCE_IOS\r
recordMovieButton.setButtonText ("Start recording (to a file on your desktop)");\r
+ #else\r
+ recordMovieButton.setButtonText ("Record a movie");\r
+ #endif\r
+ cameraSelectorComboBox.setEnabled (true);\r
+\r
+ #if JUCE_ANDROID\r
+ snapshotButton.setEnabled (true);\r
+ #endif\r
+\r
+ #if JUCE_ANDROID || JUCE_IOS\r
+ URL url (recordingFile);\r
+\r
+ snapshotButton .setEnabled (false);\r
+ recordMovieButton.setEnabled (false);\r
+ contentSharingPending = true;\r
+\r
+ SafePointer<CameraDemo> safeThis (this);\r
+\r
+ juce::ContentSharer::getInstance()->shareFiles ({url},\r
+ [safeThis] (bool success, const String&) mutable\r
+ {\r
+ if (safeThis)\r
+ safeThis->sharingFinished (success, false);\r
+ });\r
+ #endif\r
}\r
}\r
}\r
\r
void takeSnapshot()\r
{\r
- // When the user clicks the snapshot button, we'll attach ourselves to\r
- // the camera as a listener, and wait for an image to arrive...\r
- cameraDevice->addListener (this);\r
+ SafePointer<CameraDemo> safeThis (this);\r
+ cameraDevice->takeStillPicture ([safeThis] (const Image& image) mutable { safeThis->imageReceived (image); });\r
}\r
\r
// This is called by the camera device when a new image arrives\r
- void imageReceived (const Image& image) override\r
+ void imageReceived (const Image& image)\r
{\r
- // In this app we just want to take one image, so as soon as this happens,\r
- // we'll unregister ourselves as a listener.\r
- if (cameraDevice.get() != nullptr)\r
- cameraDevice->removeListener (this);\r
-\r
- // This callback won't be on the message thread, so to get the image back to\r
- // the message thread, we'll stash a pointer to it (which is reference-counted in\r
- // a thead-safe way), and trigger an async callback which will then display the\r
- // new image..\r
- incomingImage = image;\r
- triggerAsyncUpdate();\r
+ if (! image.isValid())\r
+ return;\r
+\r
+ lastSnapshot.setImage (image);\r
+\r
+ #if JUCE_ANDROID || JUCE_IOS\r
+ auto imageFile = File::getSpecialLocation (File::tempDirectory).getNonexistentChildFile ("JuceCameraPhotoDemo", ".jpg");\r
+\r
+ if (auto stream = std::unique_ptr<OutputStream> (imageFile.createOutputStream()))\r
+ {\r
+ if (JPEGImageFormat().writeImageToStream (image, *stream))\r
+ {\r
+ URL url (imageFile);\r
+\r
+ snapshotButton .setEnabled (false);\r
+ recordMovieButton.setEnabled (false);\r
+ contentSharingPending = true;\r
+\r
+ SafePointer<CameraDemo> safeThis (this);\r
+\r
+ juce::ContentSharer::getInstance()->shareFiles ({url},\r
+ [safeThis] (bool success, const String&) mutable\r
+ {\r
+ if (safeThis)\r
+ safeThis->sharingFinished (success, true);\r
+ });\r
+ }\r
+ }\r
+ #endif\r
}\r
\r
- Image incomingImage;\r
+ void errorOccurred (const String& error)\r
+ {\r
+ AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,\r
+ "Camera Device Error",\r
+ "An error has occurred: " + error + " Camera will be closed.");\r
+\r
+ cameraDevice.reset();\r
+\r
+ cameraSelectorComboBox.setSelectedId (1);\r
+ snapshotButton .setEnabled (false);\r
+ recordMovieButton.setEnabled (false);\r
+ }\r
\r
- void handleAsyncUpdate() override\r
+ void sharingFinished (bool success, bool isCapture)\r
{\r
- if (incomingImage.isValid())\r
- lastSnapshot.setImage (incomingImage);\r
+ AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,\r
+ isCapture ? "Image sharing result" : "Video sharing result",\r
+ success ? "Success!" : "Failed!");\r
+\r
+ contentSharingPending = false;\r
+ snapshotButton .setEnabled (true);\r
+ recordMovieButton.setEnabled (true);\r
}\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CameraDemo)\r
CPlusPlusCodeTokeniser cppTokeniser;\r
\r
// the editor component\r
- ScopedPointer<CodeEditorComponent> editor;\r
+ std::unique_ptr<CodeEditorComponent> editor;\r
\r
FilenameComponent fileChooser { "File", {}, true, false, false, "*.cpp;*.h;*.hpp;*.c;*.mm;*.m", {},\r
"Choose a C++ file to open it in the editor" };\r
public:\r
ComponentTransformsDemo()\r
{\r
- content.reset (new WidgetsDemo());\r
+ content.reset (new WidgetsDemo (true));\r
addAndMakeVisible (content.get());\r
content->setSize (750, 500);\r
\r
}\r
\r
private:\r
- ScopedPointer<Component> content;\r
+ std::unique_ptr<Component> content;\r
\r
struct CornerDragger : public Component\r
{\r
fileToSave = fileToSave.getChildFile ("JUCE.png");\r
fileToSave.deleteFile();\r
\r
- ScopedPointer<OutputStream> outStream (fileToSave.createOutputStream());\r
- ScopedPointer<InputStream> inStream (createAssetInputStream ("juce_icon.png"));\r
+ std::unique_ptr<OutputStream> outStream (fileToSave.createOutputStream());\r
+ std::unique_ptr<InputStream> inStream (createAssetInputStream ("juce_icon.png"));\r
outStream->writeFromInputStream (*inStream, -1);\r
}\r
\r
#if JUCE_ANDROID || JUCE_IOS\r
if (! result.isEmpty())\r
{\r
- ScopedPointer<InputStream> wi (fileToSave.createInputStream());\r
- ScopedPointer<OutputStream> wo (result.createOutputStream());\r
+ std::unique_ptr<InputStream> wi (fileToSave.createInputStream());\r
+ std::unique_ptr<OutputStream> wo (result.createOutputStream());\r
\r
if (wi.get() != nullptr && wo.get() != nullptr)\r
{\r
}\r
\r
ImagePreviewComponent imagePreview;\r
- ScopedPointer<FileChooser> fc;\r
+ std::unique_ptr<FileChooser> fc;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DialogsDemo)\r
};\r
ComboBox styleBox;\r
\r
StretchableLayoutManager verticalLayout;\r
- ScopedPointer<StretchableLayoutResizerBar> verticalDividerBar;\r
+ std::unique_ptr<StretchableLayoutResizerBar> verticalDividerBar;\r
\r
//==============================================================================\r
void refreshPreviewBoxFont()\r
ZipFile icons (createAssetInputStream ("icons.zip"), true);\r
\r
// Load a random SVG file from our embedded icons.zip file.\r
- const ScopedPointer<InputStream> svgFileStream (icons.createStreamForEntry (Random::getSystemRandom().nextInt (icons.getNumEntries())));\r
+ const std::unique_ptr<InputStream> svgFileStream (icons.createStreamForEntry (Random::getSystemRandom().nextInt (icons.getNumEntries())));\r
\r
if (svgFileStream.get() != nullptr)\r
{\r
}\r
\r
Time lastSVGLoadTime;\r
- ScopedPointer<DrawableComposite> svgDrawable;\r
+ std::unique_ptr<DrawableComposite> svgDrawable;\r
};\r
\r
//==============================================================================\r
Result saveDocument (const File& file) override\r
{\r
// attempt to save the contents into the given file\r
- FileOutputStream os (file);\r
+ if (file.replaceWithText (editor.getText()))\r
+ return Result::ok();\r
\r
- if (os.openedOk())\r
- os.writeText (editor.getText(), false, false);\r
-\r
- return Result::ok();\r
+ return Result::fail ("Can't write to file");\r
}\r
\r
File getLastDocumentOpened() override\r
#if JUCE_MODAL_LOOPS_PERMITTED\r
File getSuggestedSaveAsFile (const File&) override\r
{\r
- return File::getSpecialLocation (File::userDesktopDirectory).getChildFile (getName()).withFileExtension ("jnote");\r
+ return File::getSpecialLocation (File::userDesktopDirectory)\r
+ .getChildFile (getName())\r
+ .withFileExtension ("jnote");\r
}\r
#endif\r
\r
private:\r
ApplicationCommandManager commandManager;\r
\r
- ScopedPointer<MenuBarComponent> menuBar;\r
+ std::unique_ptr<MenuBarComponent> menuBar;\r
MenuBarPosition menuBarPosition = MenuBarPosition::window;\r
\r
SidePanel sidePanel { "Menu", 300, false };\r
" gl_FragColor = colour;\n"\r
"}\n";\r
\r
- ScopedPointer<OpenGLShaderProgram> newShader (new OpenGLShaderProgram (openGLContext));\r
+ std::unique_ptr<OpenGLShaderProgram> newShader (new OpenGLShaderProgram (openGLContext));\r
String statusText;\r
\r
if (newShader->addVertexShader (OpenGLHelpers::translateVertexShaderToV3 (vertexShader))\r
if (textureCoordIn.get() != nullptr) glContext.extensions.glDisableVertexAttribArray (textureCoordIn->attributeID);\r
}\r
\r
- ScopedPointer<OpenGLShaderProgram::Attribute> position, normal, sourceColour, textureCoordIn;\r
+ std::unique_ptr<OpenGLShaderProgram::Attribute> position, normal, sourceColour, textureCoordIn;\r
\r
private:\r
static OpenGLShaderProgram::Attribute* createAttribute (OpenGLContext& openGLContext,\r
viewMatrix .reset (createUniform (openGLContext, shaderProgram, "viewMatrix"));\r
}\r
\r
- ScopedPointer<OpenGLShaderProgram::Uniform> projectionMatrix, viewMatrix;\r
+ std::unique_ptr<OpenGLShaderProgram::Uniform> projectionMatrix, viewMatrix;\r
\r
private:\r
static OpenGLShaderProgram::Uniform* createUniform (OpenGLContext& openGLContext,\r
const char* vertexShader;\r
const char* fragmentShader;\r
\r
- ScopedPointer<OpenGLShaderProgram> shader;\r
- ScopedPointer<Shape> shape;\r
- ScopedPointer<Attributes> attributes;\r
- ScopedPointer<Uniforms> uniforms;\r
+ std::unique_ptr<OpenGLShaderProgram> shader;\r
+ std::unique_ptr<Shape> shape;\r
+ std::unique_ptr<Attributes> attributes;\r
+ std::unique_ptr<Uniforms> uniforms;\r
\r
String newVertexShader, newFragmentShader;\r
\r
if (textureCoordIn.get() != nullptr) openGLContext.extensions.glDisableVertexAttribArray (textureCoordIn->attributeID);\r
}\r
\r
- ScopedPointer<OpenGLShaderProgram::Attribute> position, normal, sourceColour, textureCoordIn;\r
+ std::unique_ptr<OpenGLShaderProgram::Attribute> position, normal, sourceColour, textureCoordIn;\r
\r
private:\r
static OpenGLShaderProgram::Attribute* createAttribute (OpenGLContext& openGLContext,\r
bouncingNumber .reset (createUniform (openGLContext, shader, "bouncingNumber"));\r
}\r
\r
- ScopedPointer<OpenGLShaderProgram::Uniform> projectionMatrix, viewMatrix, texture, lightPosition, bouncingNumber;\r
+ std::unique_ptr<OpenGLShaderProgram::Uniform> projectionMatrix, viewMatrix, texture, lightPosition, bouncingNumber;\r
\r
private:\r
static OpenGLShaderProgram::Uniform* createUniform (OpenGLContext& openGLContext,\r
void drawBackground2DStuff (float desktopScale)\r
{\r
// Create an OpenGLGraphicsContext that will draw into this GL window..\r
- ScopedPointer<LowLevelGraphicsContext> glRenderer (createOpenGLGraphicsContext (openGLContext,\r
+ std::unique_ptr<LowLevelGraphicsContext> glRenderer (createOpenGLGraphicsContext (openGLContext,\r
roundToInt (desktopScale * getWidth()),\r
roundToInt (desktopScale * getHeight())));\r
\r
\r
OpenGLContext openGLContext;\r
\r
- ScopedPointer<DemoControlsOverlay> controlsOverlay;\r
+ std::unique_ptr<DemoControlsOverlay> controlsOverlay;\r
\r
float rotation = 0.0f;\r
\r
- ScopedPointer<OpenGLShaderProgram> shader;\r
- ScopedPointer<Shape> shape;\r
- ScopedPointer<Attributes> attributes;\r
- ScopedPointer<Uniforms> uniforms;\r
+ std::unique_ptr<OpenGLShaderProgram> shader;\r
+ std::unique_ptr<Shape> shape;\r
+ std::unique_ptr<Attributes> attributes;\r
+ std::unique_ptr<Uniforms> uniforms;\r
\r
OpenGLTexture texture;\r
DemoTexture* textureToUse = nullptr;\r
{\r
if (newVertexShader.isNotEmpty() || newFragmentShader.isNotEmpty())\r
{\r
- ScopedPointer<OpenGLShaderProgram> newShader (new OpenGLShaderProgram (openGLContext));\r
+ std::unique_ptr<OpenGLShaderProgram> newShader (new OpenGLShaderProgram (openGLContext));\r
\r
if (newShader->addVertexShader (OpenGLHelpers::translateVertexShaderToV3 (newVertexShader))\r
&& newShader->addFragmentShader (OpenGLHelpers::translateFragmentShaderToV3 (newFragmentShader))\r
startTimer (1);\r
}\r
\r
- ScopedPointer<OpenGLGraphicsContextCustomShader> shader;\r
+ std::unique_ptr<OpenGLGraphicsContextCustomShader> shader;\r
\r
Label statusLabel, presetLabel { {}, "Shader Preset:" };\r
ComboBox presetBox;\r
}\r
\r
private:\r
- ScopedPointer<DemoBrowserComponent> webView;\r
+ std::unique_ptr<DemoBrowserComponent> webView;\r
\r
TextEditor addressTextBox;\r
\r
\r
//==============================================================================\r
static void showBubbleMessage (Component& targetComponent, const String& textToShow,\r
- ScopedPointer<BubbleMessageComponent>& bmc)\r
-{\r
- bmc.reset (new BubbleMessageComponent());\r
-\r
- if (Desktop::canUseSemiTransparentWindows())\r
- {\r
- bmc->setAlwaysOnTop (true);\r
- bmc->addToDesktop (0);\r
- }\r
- else\r
- {\r
- targetComponent.getTopLevelComponent()->addChildComponent (bmc.get());\r
- }\r
-\r
- AttributedString text (textToShow);\r
- text.setJustification (Justification::centred);\r
- text.setColour (targetComponent.findColour (TextButton::textColourOffId));\r
-\r
- bmc->showAt (&targetComponent, text, 2000, true, false);\r
-}\r
+ std::unique_ptr<BubbleMessageComponent>& bmc,\r
+ bool isRunningComponentTransformDemo);\r
\r
//==============================================================================\r
/** To demonstrate how sliders can have custom snapping applied to their values,\r
//==============================================================================\r
struct ButtonsPage : public Component\r
{\r
- ButtonsPage()\r
+ ButtonsPage (bool isRunningComponentTransformDemo)\r
{\r
{\r
auto* group = addToList (new GroupComponent ("group", "Radio buttons"));\r
down.setImage (getImageFromAssets ("juce_icon.png"));\r
down.setOverlayColour (Colours::black.withAlpha (0.3f));\r
\r
- auto popupMessageCallback = [this]\r
+ auto popupMessageCallback = [this, isRunningComponentTransformDemo]\r
{\r
if (auto* focused = Component::getCurrentlyFocusedComponent())\r
showBubbleMessage (*focused,\r
"This is a demo of the BubbleMessageComponent, which lets you pop up a message pointing "\r
"at a component or somewhere on the screen.\n\n"\r
"The message bubbles will disappear after a timeout period, or when the mouse is clicked.",\r
- this->bubbleMessage);\r
+ this->bubbleMessage,\r
+ isRunningComponentTransformDemo);\r
};\r
\r
{\r
\r
private:\r
OwnedArray<Component> components;\r
- ScopedPointer<BubbleMessageComponent> bubbleMessage;\r
+ std::unique_ptr<BubbleMessageComponent> bubbleMessage;\r
\r
// This little function avoids a bit of code-duplication by adding a component to\r
// our list as well as calling addAndMakeVisible on it..\r
\r
for (int i = 0; i < icons.getNumEntries(); ++i)\r
{\r
- ScopedPointer<InputStream> svgFileStream (icons.createStreamForEntry (i));\r
+ std::unique_ptr<InputStream> svgFileStream (icons.createStreamForEntry (i));\r
\r
if (svgFileStream.get() != nullptr)\r
{\r
TableListBox table; // the table component itself\r
Font font { 14.0f };\r
\r
- ScopedPointer<XmlElement> demoData; // This is the XML document loaded from the embedded file "demo table data.xml"\r
+ std::unique_ptr<XmlElement> demoData; // This is the XML document loaded from the embedded file "demo table data.xml"\r
XmlElement* columnList = nullptr; // A pointer to the sub-node of demoData that contains the list of columns\r
XmlElement* dataList = nullptr; // A pointer to the sub-node of demoData that contains the list of data rows\r
int numRows; // The number of rows of data we've got\r
//==============================================================================\r
struct DemoTabbedComponent : public TabbedComponent\r
{\r
- DemoTabbedComponent()\r
+ DemoTabbedComponent (bool isRunningComponenTransformsDemo)\r
: TabbedComponent (TabbedButtonBar::TabsAtTop)\r
{\r
auto colour = findColour (ResizableWindow::backgroundColourId);\r
\r
- addTab ("Buttons", colour, new ButtonsPage(), true);\r
- addTab ("Sliders", colour, new SlidersPage(), true);\r
- addTab ("Toolbars", colour, new ToolbarDemoComp(), true);\r
- addTab ("Misc", colour, new MiscPage(), true);\r
- addTab ("Tables", colour, new TableDemoComponent(), true);\r
- addTab ("Drag & Drop", colour, new DragAndDropDemo(), true);\r
+ addTab ("Buttons", colour, new ButtonsPage (isRunningComponenTransformsDemo), true);\r
+ addTab ("Sliders", colour, new SlidersPage(), true);\r
+ addTab ("Toolbars", colour, new ToolbarDemoComp(), true);\r
+ addTab ("Misc", colour, new MiscPage(), true);\r
+ addTab ("Tables", colour, new TableDemoComponent(), true);\r
+ addTab ("Drag & Drop", colour, new DragAndDropDemo(), true);\r
\r
- getTabbedButtonBar().getTabButton (5)->setExtraComponent (new CustomTabButton(), TabBarButton::afterText);\r
+ getTabbedButtonBar().getTabButton (5)->setExtraComponent (new CustomTabButton (isRunningComponenTransformsDemo),\r
+ TabBarButton::afterText);\r
}\r
\r
// This is a small star button that is put inside one of the tabs. You can\r
class CustomTabButton : public Component\r
{\r
public:\r
- CustomTabButton()\r
+ CustomTabButton (bool isRunningComponenTransformsDemo)\r
+ : runningComponenTransformsDemo (isRunningComponenTransformsDemo)\r
{\r
setSize (20, 20);\r
}\r
"\n"\r
"You can use these to implement things like close-buttons "\r
"or status displays for your tabs.",\r
- bubbleMessage);\r
+ bubbleMessage,\r
+ runningComponenTransformsDemo);\r
}\r
private:\r
- ScopedPointer<BubbleMessageComponent> bubbleMessage;\r
+ bool runningComponenTransformsDemo;\r
+ std::unique_ptr<BubbleMessageComponent> bubbleMessage;\r
};\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoTabbedComponent)\r
//==============================================================================\r
struct WidgetsDemo : public Component\r
{\r
- WidgetsDemo()\r
+ WidgetsDemo (bool isRunningComponenTransformsDemo = false)\r
+ : tabs (isRunningComponenTransformsDemo)\r
{\r
setOpaque (true);\r
addAndMakeVisible (tabs);\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WidgetsDemo)\r
};\r
+\r
+//==============================================================================\r
+void showBubbleMessage (Component& targetComponent, const String& textToShow,\r
+ std::unique_ptr<BubbleMessageComponent>& bmc,\r
+ bool isRunningComponentTransformDemo)\r
+{\r
+ bmc.reset (new BubbleMessageComponent());\r
+\r
+ if (isRunningComponentTransformDemo)\r
+ {\r
+ targetComponent.findParentComponentOfClass<WidgetsDemo>()->addChildComponent (bmc.get());\r
+ }\r
+ else if (Desktop::canUseSemiTransparentWindows())\r
+ {\r
+ bmc->setAlwaysOnTop (true);\r
+ bmc->addToDesktop (0);\r
+ }\r
+ else\r
+ {\r
+ targetComponent.getTopLevelComponent()->addChildComponent (bmc.get());\r
+ }\r
+\r
+ AttributedString text (textToShow);\r
+ text.setJustification (Justification::centred);\r
+ text.setColour (targetComponent.findColour (TextButton::textColourOffId));\r
+\r
+ bmc->showAt (&targetComponent, text, 2000, true, false);\r
+}\r
\r
if (auto* assetStream = createAssetInputStream ("proaudio.path"))\r
{\r
- ScopedPointer<InputStream> fileStream (assetStream);\r
+ std::unique_ptr<InputStream> fileStream (assetStream);\r
\r
Path proAudioPath;\r
proAudioPath.loadPathFromStream (*fileStream);\r
\r
void loadNewSample (InputStream* soundBuffer, const char* format)\r
{\r
- ScopedPointer<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));\r
+ std::unique_ptr<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));\r
\r
BigInteger midiNotes;\r
midiNotes.setRange (0, 126, true);\r
auto* stream = new MemoryOutputStream (mb, true);\r
\r
{\r
- ScopedPointer<AudioFormatWriter> writer (formatManager.findFormatForFileExtension ("wav")->createWriterFor (stream, lastSampleRate, 1, 16,\r
+ std::unique_ptr<AudioFormatWriter> writer (formatManager.findFormatForFileExtension ("wav")->createWriterFor (stream, lastSampleRate, 1, 16,\r
StringPairArray(), 0));\r
writer->writeFromAudioSampleBuffer (currentRecording, 0, currentRecording.getNumSamples());\r
writer->flush();\r
// whose contents will have been created by the getStateInformation() call.\r
\r
// This getXmlFromBinary() helper function retrieves our XML from the binary blob..\r
- ScopedPointer<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));\r
+ std::unique_ptr<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));\r
\r
if (xmlState.get() != nullptr)\r
{\r
gainLabel { {}, "Throughput level:" },\r
delayLabel { {}, "Delay:" };\r
\r
- ScopedPointer<ParameterSlider> gainSlider, delaySlider;\r
+ std::unique_ptr<ParameterSlider> gainSlider, delaySlider;\r
Colour backgroundColour;\r
\r
//==============================================================================\r
auto maxSize = static_cast<size_t> (roundToInt (getSampleRate() * (8192.0 / 44100.0)));\r
auto assetName = (type == 0 ? "Impulse1.wav" : "Impulse2.wav");\r
\r
- ScopedPointer<InputStream> assetInputStream (createAssetInputStream (assetName));\r
+ std::unique_ptr<InputStream> assetInputStream (createAssetInputStream (assetName));\r
+\r
if (assetInputStream != nullptr)\r
{\r
currentCabinetData.reset();\r
//==============================================================================\r
DspModulePluginDemoAudioProcessor& processor;\r
\r
- ScopedPointer<ParameterSlider> inputVolumeSlider, outputVolumeSlider,\r
+ std::unique_ptr<ParameterSlider> inputVolumeSlider, outputVolumeSlider,\r
lowPassFilterFreqSlider, highPassFilterFreqSlider;\r
ComboBox stereoBox, slopeBox, waveshaperBox, cabinetTypeBox;\r
ToggleButton cabinetSimButton, oversamplingButton;\r
\r
dsp::Gain<float> inputVolume, outputVolume;\r
\r
- ScopedPointer<dsp::Oversampling<float>> oversampling;\r
+ std::unique_ptr<dsp::Oversampling<float>> oversampling;\r
bool audioCurrentlyOversampled = false;\r
\r
Atomic<int> cabinetType;\r
//==============================================================================\r
void getStateInformation (MemoryBlock& destData) override\r
{\r
- auto xml = ScopedPointer<XmlElement> (parameters.state.createXml());\r
+ auto xml = std::unique_ptr<XmlElement> (parameters.state.createXml());\r
copyXmlToBinary (*xml, destData);\r
}\r
\r
void setStateInformation (const void* data, int sizeInBytes) override\r
{\r
- auto xmlState = ScopedPointer<XmlElement> (getXmlFromBinary (data, sizeInBytes));\r
+ auto xmlState = std::unique_ptr<XmlElement> (getXmlFromBinary (data, sizeInBytes));\r
\r
if (xmlState.get() != nullptr)\r
if (xmlState->hasTagName (parameters.state.getType()))\r
\r
void loadNewSample (InputStream* soundBuffer, const char* format)\r
{\r
- ScopedPointer<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));\r
+ std::unique_ptr<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));\r
\r
BigInteger midiNotes;\r
midiNotes.setRange (0, 126, true);\r
loopKindLabel { {}, "Looping Mode" };\r
\r
\r
- FileChooser fileChooser { "Select a file to load...",\r
- File::nonexistent,\r
+ FileChooser fileChooser { "Select a file to load...", File(),\r
dataModel.getAudioFormatManager().getWildcardForAllFormats() };\r
\r
UndoManager* undoManager;\r
{\r
if (auto* asset = createAssetInputStream ("cello.wav"))\r
{\r
- ScopedPointer<InputStream> inputStream (asset);\r
+ std::unique_ptr<InputStream> inputStream (asset);\r
inputStream->readIntoMemoryBlock (mb);\r
\r
readerFactory.reset (new MemoryAudioFormatReaderFactory (mb.getData(), mb.getSize()));\r
// method is called on app shutdown so it needs to complete quickly!\r
\r
XmlDocument previouslySavedEvents (savedEventsFile);\r
- ScopedPointer<XmlElement> xml (previouslySavedEvents.getDocumentElement());\r
+ std::unique_ptr<XmlElement> xml (previouslySavedEvents.getDocumentElement());\r
\r
if (xml.get() == nullptr || xml->getTagName() != "events")\r
xml.reset (new XmlElement ("events"));\r
void restoreUnloggedEvents (std::deque<AnalyticsEvent>& restoredEventQueue) override\r
{\r
XmlDocument savedEvents (savedEventsFile);\r
- ScopedPointer<XmlElement> xml (savedEvents.getDocumentElement());\r
+ std::unique_ptr<XmlElement> xml (savedEvents.getDocumentElement());\r
\r
if (xml.get() == nullptr || xml->getTagName() != "events")\r
return;\r
\r
CriticalSection webStreamCreation;\r
bool shouldExit = false;\r
- ScopedPointer<WebInputStream> webStream;\r
+ std::unique_ptr<WebInputStream> webStream;\r
\r
String apiKey;\r
\r
}\r
\r
TextButton eventButton { "Press me!" }, crashButton { "Simulate crash!" };\r
- ScopedPointer<ButtonTracker> logEventButtonPress;\r
+ std::unique_ptr<ButtonTracker> logEventButtonPress;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AnalyticsCollectionDemo)\r
};\r
virtual void Keyboard (unsigned char /*key*/) {}\r
virtual void KeyboardUp (unsigned char /*key*/) {}\r
\r
- ScopedPointer<b2World> m_world { new b2World (b2Vec2 (0.0f, -10.0f)) };\r
+ std::unique_ptr<b2World> m_world { new b2World (b2Vec2 (0.0f, -10.0f)) };\r
};\r
\r
#include "../Assets/Box2DTests/AddPair.h"\r
}\r
}\r
\r
- ScopedPointer<Test> currentTest;\r
+ std::unique_ptr<Test> currentTest;\r
};\r
\r
//==============================================================================\r
\r
static String valueTreeToString (const ValueTree& v)\r
{\r
- ScopedPointer<XmlElement> xml (v.createXml());\r
+ std::unique_ptr<XmlElement> xml (v.createXml());\r
\r
if (xml.get() != nullptr)\r
return xml->createDocument ({}, true, false);\r
};\r
\r
//==============================================================================\r
- ScopedPointer<DemoMasterProcess> masterProcess;\r
+ std::unique_ptr<DemoMasterProcess> masterProcess;\r
\r
private:\r
TextButton launchButton { "Launch Child Process" };\r
*/\r
bool invokeChildProcessDemo (const String& commandLine)\r
{\r
- ScopedPointer<DemoSlaveProcess> slave (new DemoSlaveProcess());\r
+ std::unique_ptr<DemoSlaveProcess> slave (new DemoSlaveProcess());\r
\r
if (slave->initialiseFromCommandLine (commandLine, demoCommandLineUID))\r
{\r
if (invokeChildProcessDemo (commandLine))\r
return;\r
\r
- mainWindow = new MainWindow ("ChildProcessDemo", new ChildProcessDemo());\r
+ mainWindow.reset (new MainWindow ("ChildProcessDemo", new ChildProcessDemo()));\r
}\r
\r
void shutdown() override { mainWindow = nullptr; }\r
private:\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)\r
};\r
- ScopedPointer<MainWindow> mainWindow;\r
+\r
+ std::unique_ptr<MainWindow> mainWindow;\r
};\r
\r
//==============================================================================\r
\r
if (auto* assetStream = createAssetInputStream (String ("Purchases/" + String (imageResourceName)).toRawUTF8()))\r
{\r
- ScopedPointer<InputStream> fileStream (assetStream);\r
-\r
+ std::unique_ptr<InputStream> fileStream (assetStream);\r
avatar = PNGImageFormat().decodeImage (*fileStream);\r
}\r
}\r
\r
if (auto* assetStream = createAssetInputStream (assetName.toRawUTF8()))\r
{\r
- ScopedPointer<InputStream> fileStream (assetStream);\r
+ std::unique_ptr<InputStream> fileStream (assetStream);\r
\r
currentPhraseData.reset();\r
fileStream->readIntoMemoryBlock (currentPhraseData);\r
\r
Label phraseLabel { "phraseLabel", NEEDS_TRANS ("Phrases:") };\r
ListBox phraseListBox { "phraseListBox" };\r
- ScopedPointer<ListBoxModel> phraseModel { new PhraseModel() };\r
+ std::unique_ptr<ListBoxModel> phraseModel { new PhraseModel() };\r
TextButton playStopButton { "Play" };\r
\r
SoundPlayer player;\r
\r
Label voiceLabel { "voiceLabel", NEEDS_TRANS ("Voices:") };\r
ListBox voiceListBox { "voiceListBox" };\r
- ScopedPointer<VoiceModel> voiceModel { new VoiceModel (purchases) };\r
+ std::unique_ptr<VoiceModel> voiceModel { new VoiceModel (purchases) };\r
\r
MemoryBlock currentPhraseData;\r
\r
\r
private:\r
CodeDocument codeDocument;\r
- ScopedPointer<CodeEditorComponent> editor;\r
+ std::unique_ptr<CodeEditorComponent> editor;\r
TextEditor outputDisplay;\r
\r
void codeDocumentTextInserted (const String&, int) override { startTimer (300); }\r
StringPairArray responseHeaders;\r
int statusCode = 0;\r
\r
- ScopedPointer<InputStream> stream (url.createInputStream (false, nullptr, nullptr, {},\r
+ std::unique_ptr<InputStream> stream (url.createInputStream (false, nullptr, nullptr, {},\r
10000, // timeout in millisecs\r
&responseHeaders, &statusCode));\r
if (stream.get() != nullptr)\r
}\r
\r
private:\r
- ScopedPointer<TestRunnerThread> currentTestThread;\r
+ std::unique_ptr<TestRunnerThread> currentTestThread;\r
\r
TextButton startTestButton { "Run Unit Tests..." };\r
ComboBox categoriesBox;\r
{\r
if (items.size() > 0)\r
{\r
- ScopedPointer<XmlElement> oldOpenness (treeView.getOpennessState (false));\r
+ std::unique_ptr<XmlElement> oldOpenness (treeView.getOpennessState (false));\r
\r
for (auto* v : items)\r
{\r
TextButton undoButton { "Undo" },\r
redoButton { "Redo" };\r
\r
- ScopedPointer<ValueTreeItem> rootItem;\r
+ std::unique_ptr<ValueTreeItem> rootItem;\r
UndoManager undoManager;\r
\r
void timerCallback() override\r
CodeEditorComponent codeDocumentComponent { codeDocument, nullptr };\r
TreeView resultsTree;\r
\r
- ScopedPointer<TreeViewItem> rootItem;\r
- ScopedPointer<XmlElement> parsedXml;\r
+ std::unique_ptr<TreeViewItem> rootItem;\r
+ std::unique_ptr<XmlElement> parsedXml;\r
TextEditor errorMessage;\r
\r
void rebuildTree()\r
{\r
- ScopedPointer<XmlElement> openness;\r
+ std::unique_ptr<XmlElement> openness;\r
\r
if (rootItem.get() != nullptr)\r
openness.reset (rootItem->getOpennessState());\r
<MODULEPATH id="juce_audio_utils" path="../../modules"/>\r
</MODULEPATHS>\r
</XCODE_IPHONE>\r
- <VS2015 targetFolder="Builds/VisualStudio2015" extraCompilerFlags="">\r
+ <VS2017 targetFolder="Builds/VisualStudio2017">\r
<CONFIGURATIONS>\r
- <CONFIGURATION name="Debug" isDebug="1" targetName="AudioPerformanceTest"/>\r
- <CONFIGURATION name="Release" isDebug="0" targetName="AudioPerformanceTest"/>\r
+ <CONFIGURATION isDebug="1" name="Debug"/>\r
+ <CONFIGURATION isDebug="0" name="Release"/>\r
</CONFIGURATIONS>\r
<MODULEPATHS>\r
- <MODULEPATH id="juce_core" path="../../modules"/>\r
- <MODULEPATH id="juce_events" path="../../modules"/>\r
+ <MODULEPATH id="juce_gui_extra" path="../../modules"/>\r
+ <MODULEPATH id="juce_gui_basics" path="../../modules"/>\r
<MODULEPATH id="juce_graphics" path="../../modules"/>\r
+ <MODULEPATH id="juce_events" path="../../modules"/>\r
<MODULEPATH id="juce_data_structures" path="../../modules"/>\r
- <MODULEPATH id="juce_gui_basics" path="../../modules"/>\r
- <MODULEPATH id="juce_gui_extra" path="../../modules"/>\r
- <MODULEPATH id="juce_audio_basics" path="../../modules"/>\r
- <MODULEPATH id="juce_audio_devices" path="../../modules"/>\r
- <MODULEPATH id="juce_audio_formats" path="../../modules"/>\r
- <MODULEPATH id="juce_audio_processors" path="../../modules"/>\r
+ <MODULEPATH id="juce_core" path="../../modules"/>\r
<MODULEPATH id="juce_audio_utils" path="../../modules"/>\r
+ <MODULEPATH id="juce_audio_processors" path="../../modules"/>\r
+ <MODULEPATH id="juce_audio_formats" path="../../modules"/>\r
+ <MODULEPATH id="juce_audio_devices" path="../../modules"/>\r
+ <MODULEPATH id="juce_audio_basics" path="../../modules"/>\r
</MODULEPATHS>\r
- </VS2015>\r
+ </VS2017>\r
<LINUX_MAKE targetFolder="Builds/LinuxMakefile" extraCompilerFlags="">\r
<CONFIGURATIONS>\r
<CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" targetName="AudioPerformanceTest"/>\r
<MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="0"/>\r
</MODULES>\r
<JUCEOPTIONS/>\r
+ <LIVE_SETTINGS>\r
+ <OSX/>\r
+ </LIVE_SETTINGS>\r
</JUCERPROJECT>\r
"../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"\r
"../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h"\r
"../../../../../modules/juce_core/containers/juce_SortedSet.h"\r
+ "../../../../../modules/juce_core/containers/juce_SparseSet.cpp"\r
"../../../../../modules/juce_core/containers/juce_SparseSet.h"\r
"../../../../../modules/juce_core/containers/juce_Variant.cpp"\r
"../../../../../modules/juce_core/containers/juce_Variant.h"\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
import android.content.res.Configuration;\r
import android.content.pm.PackageInfo;\r
import android.content.pm.PackageManager;\r
+import android.hardware.camera2.*;\r
import android.net.http.SslError;\r
import android.net.Uri;\r
import android.os.Bundle;\r
private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+ private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
\r
private static String getAndroidPermissionName (int permissionID)\r
{\r
// use string value as this is not defined in SDKs < 16\r
case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE";\r
case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+ case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA;\r
}\r
\r
// unknown permission ID!\r
setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
\r
permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+ appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
}\r
\r
@Override\r
{\r
suspendApp();\r
\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appPaused();\r
+\r
try\r
{\r
Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
super.onResume();\r
resumeApp();\r
\r
- // Ensure that navigation/status bar visibility is correctly restored.\r
- for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
- {\r
- if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
- ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
- }\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appResumed();\r
}\r
\r
@Override\r
{\r
ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
viewHolder.addView (v);\r
+ addAppPausedResumedListener (v, host);\r
return v;\r
}\r
\r
public final void deleteView (ComponentPeerView view)\r
{\r
+ removeAppPausedResumedListener (view, view.host);\r
+\r
view.host = 0;\r
\r
ViewGroup group = (ViewGroup) (view.getParent());\r
\r
public native void alertDismissed (long callback, int id);\r
\r
+ //==============================================================================\r
+ public interface AppPausedResumedListener\r
+ {\r
+ void appPaused();\r
+ void appResumed();\r
+ }\r
+\r
+ private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+ public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.put (new Long (listenerHost), l);\r
+ }\r
+\r
+ public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.remove (new Long (listenerHost));\r
+ }\r
+\r
//==============================================================================\r
public final class ComponentPeerView extends ViewGroup\r
- implements View.OnFocusChangeListener\r
+ implements View.OnFocusChangeListener, AppPausedResumedListener\r
{\r
public ComponentPeerView (Context context, boolean opaque_, long host)\r
{\r
}\r
\r
//==============================================================================\r
+ private native void handleAppPaused (long host);\r
private native void handleAppResumed (long host);\r
\r
+ @Override\r
+ public void appPaused()\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ handleAppPaused (host);\r
+ }\r
+\r
+ @Override\r
public void appResumed()\r
{\r
if (host == 0)\r
return;\r
\r
+ // Ensure that navigation/status bar visibility is correctly restored.\r
handleAppResumed (host);\r
}\r
}\r
private final Object hostLock = new Object();\r
}\r
\r
+\r
+ //==============================================================================\r
+ public class CameraDeviceStateCallback extends CameraDevice.StateCallback\r
+ {\r
+ private native void cameraDeviceStateClosed (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateError (long host, CameraDevice camera, int error);\r
+ private native void cameraDeviceStateOpened (long host, CameraDevice camera);\r
+\r
+ CameraDeviceStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateClosed (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onDisconnected (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateDisconnected (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onError (CameraDevice camera, int error)\r
+ {\r
+ cameraDeviceStateError (host, camera, error);\r
+ }\r
+\r
+ @Override\r
+ public void onOpened (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateOpened (host, camera);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback\r
+ {\r
+ private native void cameraCaptureSessionActive (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionReady (long host, CameraCaptureSession session);\r
+\r
+ CameraCaptureSessionStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onActive (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionActive (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionClosed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigureFailed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigureFailed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigured (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigured (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onReady (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionReady (host, session);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback\r
+ {\r
+ private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result);\r
+ private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure);\r
+ private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult);\r
+ private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber);\r
+ private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+ private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+\r
+ CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+ {\r
+ host = hostToUse;\r
+ preview = shouldBePreview;\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+ TotalCaptureResult result)\r
+ {\r
+ cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+ {\r
+ cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+ CaptureResult partialResult)\r
+ {\r
+ cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+ long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+ }\r
+\r
+ private long host;\r
+ private boolean preview;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class JuceOrientationEventListener extends OrientationEventListener\r
+ {\r
+ private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+ public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+ {\r
+ super (context, rate);\r
+\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onOrientationChanged (int orientation)\r
+ {\r
+ deviceOrientationChanged (host, orientation);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+\r
//==============================================================================\r
public static final String getLocaleValue (boolean isRegion)\r
{\r
1DFEAF972822E305E013CC06, ); name = Source; sourceTree = "<group>"; };
19B7C16D592FB25D09022191 = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
USE_HEADERMAP = NO; }; name = Debug; };
B7A6988E30C0A68B01EDC53B = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
C86DD529EC94922C2AB61742,
6C2BE2DE2ECC96615ED827AB,
409D569C572B6EF7F4F1702D, ); buildRules = ( ); dependencies = ( ); name = "AudioPerformanceTest - App"; productName = AudioPerformanceTest; productReference = 614F2084407B35D62101F69F; productType = "com.apple.product-type.application"; };
- 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); };
+ 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); };
};
rootObject = 9CE2A44801B5B4BE7A9667DA;
}
--- /dev/null
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual Studio 2017\r
+\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioPerformanceTest - App", "AudioPerformanceTest_App.vcxproj", "{78607AE9-F43B-3DDB-0FE1-D745771AF527}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|x64 = Debug|x64\r
+ Release|x64 = Release|x64\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|x64.ActiveCfg = Debug|x64\r
+ {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|x64.Build.0 = Debug|x64\r
+ {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|x64.ActiveCfg = Release|x64\r
+ {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|x64.Build.0 = Release|x64\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<Project DefaultTargets="Build"\r
+ ToolsVersion="15.0"\r
+ xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{78607AE9-F43B-3DDB-0FE1-D745771AF527}</ProjectGuid>\r
+ <PlatformToolset>v141</PlatformToolset>\r
+ <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"\r
+ Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <UseOfMfc>false</UseOfMfc>\r
+ <WholeProgramOptimization>false</WholeProgramOptimization>\r
+ <PlatformToolset>v141</PlatformToolset>\r
+ <PlatformToolset>v141</PlatformToolset>\r
+ <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"\r
+ Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <UseOfMfc>false</UseOfMfc>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ <PlatformToolset>v141</PlatformToolset>\r
+ <PlatformToolset>v141</PlatformToolset>\r
+ <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>\r
+ <ImportGroup Label="ExtensionSettings"/>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"\r
+ Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"\r
+ Label="LocalAppDataPlatform"/>\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros">\r
+ <PlatformToolset>v141</PlatformToolset>\r
+ <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <TargetExt>.exe</TargetExt>\r
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\App\</OutDir>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\App\</IntDir>\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AudioPerformanceTest</TargetName>\r
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>\r
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\App\</OutDir>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\App\</IntDir>\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AudioPerformanceTest</TargetName>\r
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>\r
+ <PlatformToolset>v141</PlatformToolset>\r
+ <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+ <Midl>\r
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <MkTypLibCompatible>true</MkTypLibCompatible>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <TargetEnvironment>Win32</TargetEnvironment>\r
+ <HeaderFileName/>\r
+ </Midl>\r
+ <ClCompile>\r
+ <Optimization>Disabled</Optimization>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
+ <PrecompiledHeader/>\r
+ <AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>\r
+ <ObjectFileName>$(IntDir)\</ObjectFileName>\r
+ <ProgramDataBaseFileName>$(IntDir)\</ProgramDataBaseFileName>\r
+ <WarningLevel>Level4</WarningLevel>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
+ <LanguageStandard>stdcpp14</LanguageStandard>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ResourceCompile>\r
+ <Link>\r
+ <OutputFile>$(OutDir)\AudioPerformanceTest.exe</OutputFile>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <IgnoreSpecificDefaultLibraries>libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <ProgramDatabaseFile>$(IntDir)\AudioPerformanceTest.pdb</ProgramDatabaseFile>\r
+ <SubSystem>Windows</SubSystem>\r
+ <LargeAddressAware>true</LargeAddressAware>\r
+ </Link>\r
+ <Bscmake>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <OutputFile>$(IntDir)\AudioPerformanceTest.bsc</OutputFile>\r
+ </Bscmake>\r
+ <Lib/>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+ <Midl>\r
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <MkTypLibCompatible>true</MkTypLibCompatible>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <TargetEnvironment>Win32</TargetEnvironment>\r
+ <HeaderFileName/>\r
+ </Midl>\r
+ <ClCompile>\r
+ <Optimization>Full</Optimization>\r
+ <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
+ <PrecompiledHeader/>\r
+ <AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>\r
+ <ObjectFileName>$(IntDir)\</ObjectFileName>\r
+ <ProgramDataBaseFileName>$(IntDir)\</ProgramDataBaseFileName>\r
+ <WarningLevel>Level4</WarningLevel>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
+ <LanguageStandard>stdcpp14</LanguageStandard>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ResourceCompile>\r
+ <Link>\r
+ <OutputFile>$(OutDir)\AudioPerformanceTest.exe</OutputFile>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r
+ <GenerateDebugInformation>false</GenerateDebugInformation>\r
+ <ProgramDatabaseFile>$(IntDir)\AudioPerformanceTest.pdb</ProgramDatabaseFile>\r
+ <SubSystem>Windows</SubSystem>\r
+ <OptimizeReferences>true</OptimizeReferences>\r
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+ <LargeAddressAware>true</LargeAddressAware>\r
+ </Link>\r
+ <Bscmake>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <OutputFile>$(IntDir)\AudioPerformanceTest.bsc</OutputFile>\r
+ </Bscmake>\r
+ <Lib/>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\..\Source\Main.cpp"/>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioDataConverters.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_CatmullRomInterpolator.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_IIRFilter.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LagrangeInterpolator.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiBuffer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiFile.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiKeyboardState.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessage.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessageSequence.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiRPN.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEInstrument.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEMessages.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPENote.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_IIRFilterAudioSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MemoryAudioSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MixerAudioSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ResamplingAudioSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ReverbAudioSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ToneGeneratorAudioSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\synthesisers\juce_Synthesiser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioDeviceManager.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODevice.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiMessageCollector.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiOutput.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Audio.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Midi.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Oboe.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_OpenSL.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_ios_Audio.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_ALSA.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_Bela.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_JackAudio.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_Midi.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_mac_CoreAudio.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_mac_CoreMidi.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_ASIO.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_DirectSound.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_Midi.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_WASAPI.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioSourcePlayer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioTransportSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitmath.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitreader.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitwriter.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\cpu.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\crc.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\fixed.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\float.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\format.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\lpc_flac.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\md5.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\memory.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_decoder.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_encoder.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_encoder_framing.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\window_flac.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\analysis.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\bitrate.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\block.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codebook.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\envelope.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\floor0.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\floor1.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\info.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lpc.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lsp.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mapping0.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mdct.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\psy.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\registry.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\res0.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\sharedbook.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\smallft.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\synthesis.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\vorbisenc.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\vorbisfile.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\window.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\bitwise.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\framing.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_AiffAudioFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_CoreAudioFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_FlacAudioFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_LAMEEncoderAudioFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_MP3AudioFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReaderSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatWriter.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioSubsectionReader.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_BufferingAudioFormatReader.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\sampler\juce_Sampler.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LegacyAudioParameter.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioPluginInstance.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessor.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorEditor.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorGraph.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameters.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioAppComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioDeviceSelectorComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnail.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_android_BluetoothMidiDevicePairingDialogue.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_linux_AudioCDReader.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_linux_BluetoothMidiDevicePairingDialogue.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win_BluetoothMidiDevicePairingDialogue.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win32_AudioCDBurner.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win32_AudioCDReader.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_AbstractFifo.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_DynamicObject.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_HashMap_test.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_File.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileInputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\javascript\juce_JSON.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\logging\juce_FileLogger.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\logging\juce_Logger.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_BigInteger.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Expression.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Result.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_RuntimePermissions.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_StdFunctionCompat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Files.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Misc.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Network.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_RuntimePermissions.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_SystemStats.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Threads.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_curl_Network.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_CommonFile.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Files.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Network.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_SystemStats.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Threads.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_posix_NamedPipe.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Files.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Network.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Registry.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_SystemStats.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Threads.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_MACAddress.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_NamedPipe.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_Socket.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_URL.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_InputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_MemoryInputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_MemoryOutputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_OutputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_SubregionStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_URLInputSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\system\juce_SystemStats.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_Base64.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_CharacterFunctions.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_Identifier.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_LocalisedStrings.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_String.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringArray.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringPairArray.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringPool.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_TextDiff.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ChildProcess.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_HighResolutionTimer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ReadWriteLock.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_Thread.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ThreadPool.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_TimeSliceThread.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_PerformanceCounter.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_RelativeTime.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_Time.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\unit_tests\juce_UnitTest.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\xml\juce_XmlDocument.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\xml\juce_XmlElement.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\adler32.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\compress.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\crc32.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\deflate.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\infback.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inffast.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inflate.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inftrees.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\trees.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\uncompr.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\zutil.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_GZIPCompressorOutputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_GZIPDecompressorInputStream.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_ZipFile.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\juce_core.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_ApplicationProperties.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_PropertiesFile.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoManager.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionBroadcaster.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_AsyncUpdater.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeBroadcaster.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_ConnectedChildProcess.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnection.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnectionServer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_ApplicationBase.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_DeletedAtShutdown.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_MessageListener.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_MessageManager.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_android_Messaging.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_linux_Messaging.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_win32_Messaging.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_win32_WinRTWrapper.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\timers\juce_MultiTimer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\timers\juce_Timer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\juce_events.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_Colour.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_ColourGradient.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_Colours.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_FillType.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_GraphicsContext.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\effects\juce_DropShadowEffect.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\effects\juce_GlowEffect.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_AttributedString.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_CustomTypeface.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_Font.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_GlyphArrangement.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_TextLayout.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_Typeface.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_AffineTransform.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_EdgeTable.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_Path.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathIterator.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapimin.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapistd.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jccoefct.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jccolor.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcdctmgr.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jchuff.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcinit.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmainct.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmarker.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmaster.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcomapi.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcparam.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcphuff.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcprepct.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcsample.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jctrans.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdapimin.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdapistd.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdatasrc.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdcoefct.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdcolor.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jddctmgr.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdhuff.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdinput.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmainct.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmarker.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmaster.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmerge.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdphuff.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdpostct.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdsample.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdtrans.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jerror.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctflt.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctfst.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctint.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctflt.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctfst.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctint.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctred.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemmgr.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemnobs.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jquant1.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jquant2.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jutils.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\transupp.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\png.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngerror.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngget.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngmem.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngpread.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngread.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrio.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrtran.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrutil.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngset.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngtrans.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwio.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwrite.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwtran.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwutil.c">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_GIFLoader.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_JPEGLoader.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_PNGLoader.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_Image.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_Fonts.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_GraphicsContext.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_IconHelpers.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_freetype_Fonts.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_linux_Fonts.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_linux_IconHelpers.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_mac_IconHelpers.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Direct2DGraphicsContext.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_DirectWriteTypeface.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_DirectWriteTypeLayout.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Fonts.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_IconHelpers.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_RectanglePlacement.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\juce_graphics.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\application\juce_Application.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ArrowButton.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_Button.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_DrawableButton.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_HyperlinkButton.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ImageButton.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ShapeButton.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_TextButton.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToggleButton.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToolbarButton.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandInfo.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandManager.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandTarget.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_KeyPressMappingSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_Component.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_ComponentListener.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_Desktop.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_ModalComponentManager.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_Drawable.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableComposite.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableImage.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawablePath.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableRectangle.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableShape.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableText.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_SVGParser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ContentSharer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsDisplayComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsList.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooserDialogBox.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileListComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilenameComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileSearchPathListComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileTreeComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ImagePreviewComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_CaretComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyboardFocusTraverser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyListener.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyPress.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_ModifierKeys.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentAnimator.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBoundsConstrainer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBuilder.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentMovementWatcher.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ConcertinaPanel.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexBox.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Grid.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridItem.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridUnitTests.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GroupComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_MultiDocumentPanel.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableBorderComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableCornerComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableEdgeComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ScrollBar.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_SidePanel.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutManager.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutResizerBar.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableObjectResizer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedButtonBar.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Viewport.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V1.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V2.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V3.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V4.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_BurgerMenuComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarModel.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseCursor.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseEvent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_ContentSharer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_FileChooser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_Windowing.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_common_MimeTypes.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_ContentSharer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_FileChooser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11_Clipboard.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11_Windowing.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_DragAndDrop.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_FileChooser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_Windowing.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinatePositioner.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeParallelogram.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePoint.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePointPath.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeRectangle.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_BooleanPropertyComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ButtonPropertyComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ChoicePropertyComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_MultiChoicePropertyComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyPanel.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_SliderPropertyComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_TextPropertyComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ComboBox.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ImageComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Label.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ListBox.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ProgressBar.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Slider.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableHeaderComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableListBox.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TextEditor.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Toolbar.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemPalette.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TreeView.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_AlertWindow.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_CallOutBox.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ComponentPeer.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DialogWindow.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DocumentWindow.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ResizableWindow.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ThreadWithProgressWindow.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TooltipWindow.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TopLevelWindow.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeDocument.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeEditorComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_LuaCodeTokeniser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_XMLCodeTokeniser.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\documents\juce_FileBasedDocument.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_BubbleMessageComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_ColourSelector.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_KeyMappingEditorComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_LiveConstantEditor.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PreferencesPanel.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PushNotifications.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_RecentlyOpenedFilesList.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_android_PushNotifications.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_android_WebBrowserComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_AndroidViewComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_ios_PushNotifications.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_X11_SystemTrayIcon.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_X11_WebBrowserComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_XEmbedComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_PushNotifications.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_SystemTrayIcon.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_ActiveXComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_SystemTrayIcon.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_WebBrowserComponent.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_basics.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_devices.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_formats.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_utils.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_core.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_data_structures.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_events.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_graphics.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_gui_basics.cpp"/>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_gui_extra.cpp"/>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\..\Source\MainComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\audio_play_head\juce_AudioPlayHead.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioDataConverters.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioSampleBuffer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_CatmullRomInterpolator.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_Decibels.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_IIRFilter.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LagrangeInterpolator.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LinearSmoothedValue.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_Reverb.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiBuffer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiFile.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiKeyboardState.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessage.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessageSequence.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiRPN.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEInstrument.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEMessages.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPENote.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_IIRFilterAudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MemoryAudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MixerAudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_PositionableAudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ResamplingAudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ReverbAudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ToneGeneratorAudioSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\synthesisers\juce_Synthesiser.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioDeviceManager.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODevice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_SystemAudioVolume.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiInput.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiMessageCollector.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiOutput.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\native\juce_ios_Audio.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\native\juce_MidiDataConcatenator.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioSourcePlayer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioTransportSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\all.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitmath.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitreader.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitwriter.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\cpu.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\crc.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\fixed.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\float.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\format.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\lpc.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\md5.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\memory.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\metadata.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\stream_encoder.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\stream_encoder_framing.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\window.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\all.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\stream_decoder.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\stream_encoder.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\all.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\alloc.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\assert.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\callback.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\compat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\endswap.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\export.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\format.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\metadata.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\ordinals.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\stream_decoder.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\stream_encoder.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\win_utf8_io.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled\res_books_51.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled\res_books_stereo.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor\floor_books.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled\res_books_uncoupled.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\floor_all.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_8.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_11.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_16.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_44.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_8.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_16.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44p51.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44u.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_8.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_11.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_16.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_22.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_32.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44p51.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44u.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_X.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\backends.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\bitrate.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codebook.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codec_internal.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\envelope.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\highlevel.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup_data.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lpc.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lsp.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\masking.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mdct.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\misc.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\os.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\psy.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\registry.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\scales.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\smallft.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\window.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\codec.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\config_types.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\ogg.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\os_types.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\vorbisenc.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\vorbisfile.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_AiffAudioFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_CoreAudioFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_FlacAudioFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_LAMEEncoderAudioFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_MP3AudioFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReaderSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatWriter.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioSubsectionReader.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_BufferingAudioFormatReader.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_MemoryMappedAudioFormatReader.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\sampler\juce_Sampler.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Common.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Headers.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTCommon.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTInterface.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTMidiEventList.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioPluginInstance.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessor.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorEditor.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorGraph.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorListener.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorParameter.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterChoice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterFloat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterInt.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameterWithID.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDBurner.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioAppComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioDeviceSelectorComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnail.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailBase.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_BluetoothMidiDevicePairingDialogue.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_AbstractFifo.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Array.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ArrayAllocationBase.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_DynamicObject.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ElementComparator.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_HashMap.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_LinkedListPointer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ReferenceCountedArray.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ScopedValueSetter.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SortedSet.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Variant.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_File.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileInputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_JSON.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\logging\juce_FileLogger.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\logging\juce_Logger.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_BigInteger.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Expression.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_MathsFunctions.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_NormalisableRange.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_HeapBlock.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_LeakedObjectDetector.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Memory.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_OptionalScopedPointer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ReferenceCountedObject.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ScopedPointer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_SharedResourcePointer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Singleton.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_WeakReference.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_Result.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_RuntimePermissions.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_StdFunctionCompat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_WindowsRegistry.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_MACAddress.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_NamedPipe.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_Socket.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_URL.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_MemoryInputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_MemoryOutputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_OutputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_SubregionStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_URLInputSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_CompilerSupport.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_PlatformDefs.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_StandardHeader.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_SystemStats.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_TargetPlatform.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_Base64.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharacterFunctions.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_ASCII.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF8.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF16.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF32.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_Identifier.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_LocalisedStrings.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_NewLine.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_String.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringArray.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringPairArray.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringPool.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringRef.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_TextDiff.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ChildProcess.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_CriticalSection.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_DynamicLibrary.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_HighResolutionTimer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_InterProcessLock.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_Process.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ReadWriteLock.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedLock.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedReadLock.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedWriteLock.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_SpinLock.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_Thread.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ThreadLocalValue.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ThreadPool.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_TimeSliceThread.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_WaitableEvent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_PerformanceCounter.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_RelativeTime.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_Time.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\unit_tests\juce_UnitTest.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\xml\juce_XmlDocument.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\xml\juce_XmlElement.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\crc32.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\deflate.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inffast.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inffixed.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inflate.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inftrees.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\trees.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zconf.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zconf.in.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zlib.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zutil.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_GZIPCompressorOutputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_GZIPDecompressorInputStream.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_ZipFile.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\juce_core.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_ApplicationProperties.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_PropertiesFile.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoableAction.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoManager.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionBroadcaster.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionListener.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_AsyncUpdater.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeBroadcaster.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeListener.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_ConnectedChildProcess.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnection.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnectionServer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_ApplicationBase.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_CallbackMessage.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_DeletedAtShutdown.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_Initialisation.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_Message.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MessageListener.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MessageManager.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MountedVolumeListChangeDetector.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_NotificationType.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoop.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_osx_MessageQueue.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_HiddenMessageWindow.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_WinRTWrapper.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\timers\juce_MultiTimer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\timers\juce_Timer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\juce_events.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_Colour.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_ColourGradient.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_Colours.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_FillType.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_PixelFormats.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_GraphicsContext.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsContext.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_DropShadowEffect.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_GlowEffect.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_ImageEffectFilter.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_AttributedString.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_CustomTypeface.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_Font.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_GlyphArrangement.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_TextLayout.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_Typeface.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_AffineTransform.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_BorderSize.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_EdgeTable.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Line.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Parallelogram.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Path.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathIterator.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\cderror.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jchuff.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jconfig.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdct.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdhuff.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jerror.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jinclude.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemsys.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmorecfg.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jpegint.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jpeglib.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jversion.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\transupp.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\png.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngconf.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pnginfo.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngpriv.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngstruct.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_Image.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsHelpers.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_RenderingHelpers.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Direct2DGraphicsContext.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\placement\juce_RectanglePlacement.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\juce_graphics.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\application\juce_Application.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ArrowButton.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_Button.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_DrawableButton.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_HyperlinkButton.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ImageButton.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ShapeButton.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_TextButton.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToggleButton.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToolbarButton.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandID.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandInfo.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandManager.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandTarget.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_KeyPressMappingSet.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_CachedComponentImage.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_Component.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_ComponentListener.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_Desktop.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_ModalComponentManager.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_Drawable.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableComposite.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableImage.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawablePath.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableRectangle.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableShape.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableText.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ContentSharer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsDisplayComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsList.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserListener.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooser.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooserDialogBox.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileListComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilenameComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilePreviewComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileSearchPathListComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileTreeComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ImagePreviewComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_CaretComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyboardFocusTraverser.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyListener.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyPress.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_ModifierKeys.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_SystemClipboard.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_TextEditorKeyMapper.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_TextInputTarget.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_AnimatedPosition.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_AnimatedPositionBehaviours.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentAnimator.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBoundsConstrainer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBuilder.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentMovementWatcher.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ConcertinaPanel.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexBox.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexItem.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Grid.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridItem.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GroupComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_MultiDocumentPanel.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableBorderComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableCornerComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableEdgeComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ScrollBar.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_SidePanel.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutManager.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutResizerBar.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableObjectResizer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedButtonBar.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Viewport.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V1.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V2.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V3.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V4.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_BurgerMenuComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarModel.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropTarget.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_FileDragAndDropTarget.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_LassoComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseCursor.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseEvent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_SelectedItemSet.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TextDragAndDropTarget.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TooltipClient.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_MultiTouchMapper.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinatePositioner.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeParallelogram.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePoint.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePointPath.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeRectangle.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_BooleanPropertyComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ButtonPropertyComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ChoicePropertyComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_MultiChoicePropertyComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyPanel.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_SliderPropertyComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_TextPropertyComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ComboBox.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ImageComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Label.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ListBox.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ProgressBar.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Slider.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableHeaderComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableListBox.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TextEditor.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Toolbar.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemFactory.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemPalette.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TreeView.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_AlertWindow.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_CallOutBox.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ComponentPeer.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DialogWindow.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DocumentWindow.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_NativeMessageBox.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ResizableWindow.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ThreadWithProgressWindow.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TooltipWindow.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TopLevelWindow.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeDocument.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeEditorComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeTokeniser.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniser.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniserFunctions.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_LuaCodeTokeniser.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_XMLCodeTokeniser.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\documents\juce_FileBasedDocument.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_ActiveXControlComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_AndroidViewComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_NSViewComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_UIViewComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_XEmbedComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AppleRemote.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_BubbleMessageComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_ColourSelector.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_KeyMappingEditorComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_LiveConstantEditor.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PreferencesPanel.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PushNotifications.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_RecentlyOpenedFilesList.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_WebBrowserComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_CarbonViewWrapperComponent.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.h"/>\r
+ <ClInclude Include="..\..\JuceLibraryCode\AppConfig.h"/>\r
+ <ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h"/>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\Flac Licence.txt"/>\r
+ <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\Ogg Vorbis Licence.txt"/>\r
+ <None Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\changes to libjpeg for JUCE.txt"/>\r
+ <None Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\libpng_readme.txt"/>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include=".\resources.rc"/>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>\r
+ <ImportGroup Label="ExtensionTargets"/>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="AudioPerformanceTest\Source">\r
+ <UniqueIdentifier>{D163E404-6FE0-D71C-79C0-B2C2204C6939}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="AudioPerformanceTest">\r
+ <UniqueIdentifier>{EA26FD9B-DE67-F842-284B-F11CFEA08C63}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_basics\audio_play_head">\r
+ <UniqueIdentifier>{EB58F05A-A968-CEBE-40C4-107CDD8F240F}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_basics\buffers">\r
+ <UniqueIdentifier>{5FCF559E-451A-CB1E-B177-A5DC5A0005BB}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_basics\effects">\r
+ <UniqueIdentifier>{31054003-EA72-6A9D-D650-56451D9820E6}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_basics\midi">\r
+ <UniqueIdentifier>{D78296AF-218E-B17E-7F8B-9D148601188D}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_basics\mpe">\r
+ <UniqueIdentifier>{B96EBA26-E668-FFAF-FC53-1EC1337DAF5A}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_basics\native">\r
+ <UniqueIdentifier>{D8532E5E-469E-5042-EFC8-238241704735}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_basics\sources">\r
+ <UniqueIdentifier>{777B5D1D-9AF0-B22B-8894-034603EE97F5}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_basics\synthesisers">\r
+ <UniqueIdentifier>{8292766D-2459-2E7E-7615-17216318BA93}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_basics">\r
+ <UniqueIdentifier>{10472B2C-9888-D269-F351-0D0AC3BCD16C}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_devices\audio_io">\r
+ <UniqueIdentifier>{BF23FC10-1D57-2A9B-706F-6DD8A7B593D4}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_devices\midi_io">\r
+ <UniqueIdentifier>{092EFC17-7C95-7E04-0ACA-0D61A462EE81}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_devices\native">\r
+ <UniqueIdentifier>{0AFC1CE8-F6E6-9817-8C21-8432B2A375DA}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_devices\sources">\r
+ <UniqueIdentifier>{0D1AF264-3AC1-78A2-B2A4-AE6171F9194A}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_devices">\r
+ <UniqueIdentifier>{9A5DB854-CFFB-5F88-C566-0E10F994DDB3}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private">\r
+ <UniqueIdentifier>{38A5DDC7-416E-548F-39DA-887875FE6B20}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected">\r
+ <UniqueIdentifier>{980FE2DB-05D3-5FDA-79DA-067A56F5D19D}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include">\r
+ <UniqueIdentifier>{F336DC25-747A-0663-93D6-E3EB9AA0CBF8}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac\libFLAC">\r
+ <UniqueIdentifier>{7D78546A-80FC-4DCA-00B9-F191F0AB2179}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\flac">\r
+ <UniqueIdentifier>{9EB3EC7F-2AB7-DDAA-3C05-DF382B728D3F}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled">\r
+ <UniqueIdentifier>{02D37B85-7DE2-C8E7-A274-A5A0FBE99D69}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor">\r
+ <UniqueIdentifier>{DAF3BAAF-5207-4C34-61B9-A97DDC930D50}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled">\r
+ <UniqueIdentifier>{C7885588-8436-4C21-DC1E-58879BF53BDC}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books">\r
+ <UniqueIdentifier>{E4ECEA39-0EFF-2443-91B3-1E5DA7AD5AE4}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes">\r
+ <UniqueIdentifier>{210B8D25-68E0-32C3-1449-6A40F109C5E9}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib">\r
+ <UniqueIdentifier>{378AD911-E8E4-D230-E76B-34542849509D}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2">\r
+ <UniqueIdentifier>{F6CED5B6-0A8C-56D2-C1AC-DED6BE774A13}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs\oggvorbis">\r
+ <UniqueIdentifier>{E684D858-09E8-0251-8E86-5657129641E1}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\codecs">\r
+ <UniqueIdentifier>{1EF1BF17-F941-243A-04D1-EE617D140CBA}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\format">\r
+ <UniqueIdentifier>{344DB016-679C-FBD0-3EC6-4570C47522DE}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats\sampler">\r
+ <UniqueIdentifier>{3D9758A0-9359-1710-87C1-05D475C08B17}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_formats">\r
+ <UniqueIdentifier>{E824435F-FC7B-10BE-5D1A-5DACC51A8836}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_processors\format">\r
+ <UniqueIdentifier>{86737735-F6BA-F64A-5EC7-5C9F36755F79}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_processors\format_types">\r
+ <UniqueIdentifier>{6B7BE34D-1BC1-C7B9-111F-C55CA8250943}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_processors\processors">\r
+ <UniqueIdentifier>{9B6B6D54-D378-80C2-8CC9-D1D8FB44C2A8}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_processors\scanning">\r
+ <UniqueIdentifier>{D0584AC3-6837-14F6-90BF-5EA604D1F074}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_processors\utilities">\r
+ <UniqueIdentifier>{794B64EC-B809-32E3-AD00-4EE6A74802CA}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_processors">\r
+ <UniqueIdentifier>{67BE498C-9E1F-C73A-B99A-387C034CE680}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_utils\audio_cd">\r
+ <UniqueIdentifier>{1A9C8538-959B-25E3-473D-B462C9A9D458}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_utils\gui">\r
+ <UniqueIdentifier>{AA9F594C-DFAF-C0A7-0CCD-9F90E54D3A01}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_utils\native">\r
+ <UniqueIdentifier>{230BF784-34F4-3BE8-46D4-54E6B67E5E9E}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_utils\players">\r
+ <UniqueIdentifier>{39F680F3-5161-4D1C-EAD0-3911ED808874}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_audio_utils">\r
+ <UniqueIdentifier>{3197198B-A978-E330-C7FB-07E5CE8236C7}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\containers">\r
+ <UniqueIdentifier>{42F7BE9D-3C8A-AE26-289B-8F355C068036}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\files">\r
+ <UniqueIdentifier>{7868764A-6572-381A-906C-9C26792A4C29}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\javascript">\r
+ <UniqueIdentifier>{03678508-A517-48BB-FB4A-485628C34E08}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\logging">\r
+ <UniqueIdentifier>{07D27C1D-3227-F527-356C-17DA11551A99}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\maths">\r
+ <UniqueIdentifier>{6146D580-99D2-A6C8-5908-30DC355BB6BA}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\memory">\r
+ <UniqueIdentifier>{C67003E8-BEA8-2188-F4B3-A122F4B4FA3F}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\misc">\r
+ <UniqueIdentifier>{09B91E68-1FF4-C7ED-9055-D4D96E66A0BA}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\native">\r
+ <UniqueIdentifier>{4F24EEED-AA33-AC6C-9A39-72E71CF83EF0}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\network">\r
+ <UniqueIdentifier>{0F70B1A9-BB50-23F5-2AE7-F95E51A00389}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\streams">\r
+ <UniqueIdentifier>{D4C8DC40-2CD2-04B6-05D0-1E7A88841390}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\system">\r
+ <UniqueIdentifier>{58BED6AF-DB89-7560-B2B8-D937C1C0825A}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\text">\r
+ <UniqueIdentifier>{B958F86B-6926-8D9B-2FC6-8BFD4BDC72C9}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\threads">\r
+ <UniqueIdentifier>{DB624F7D-D513-25AC-C13C-B9062EB3BEEE}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\time">\r
+ <UniqueIdentifier>{89AA9B6C-4029-A34F-C1B0-3B5D8691F4D4}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\unit_tests">\r
+ <UniqueIdentifier>{1A7F541C-B032-9C66-C320-A13B2A8A9866}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\xml">\r
+ <UniqueIdentifier>{4BAB7C18-51AB-0D9D-83CD-9C37F28D2E38}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\zip\zlib">\r
+ <UniqueIdentifier>{5523922E-8B0C-A52B-477C-752C09F8197F}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core\zip">\r
+ <UniqueIdentifier>{857B6D8B-0ECB-FE9E-D1EB-D5E45E72F057}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_core">\r
+ <UniqueIdentifier>{BAA582FA-40B7-320E-EE7A-4C3892C7BE72}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_data_structures\app_properties">\r
+ <UniqueIdentifier>{632B4C79-AF7D-BFB5-D006-5AE67F607130}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_data_structures\undomanager">\r
+ <UniqueIdentifier>{B10E20C2-4583-2B79-60B7-FE4D4B044313}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_data_structures\values">\r
+ <UniqueIdentifier>{CFB54F15-8A8A-0505-9B7F-ECA41CEE38E8}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_data_structures">\r
+ <UniqueIdentifier>{911F0159-A7A8-4A43-3FD4-154F62F4A44B}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_events\broadcasters">\r
+ <UniqueIdentifier>{9D5816C2-E2B2-2E3F-B095-AC8BD1100D29}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_events\interprocess">\r
+ <UniqueIdentifier>{3FDCD000-763F-8477-9AF8-70ABA2E91E5E}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_events\messages">\r
+ <UniqueIdentifier>{0947506F-66FA-EF8D-8A4E-4D48BCDBB226}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_events\native">\r
+ <UniqueIdentifier>{E4B6AED3-F54C-3FF2-069F-640BACAE0E08}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_events\timers">\r
+ <UniqueIdentifier>{D5EADBCC-6A1C-C940-0206-26E49110AF08}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_events">\r
+ <UniqueIdentifier>{D27DC92D-5BEB-9294-DCD1-81D54E245AD5}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\colour">\r
+ <UniqueIdentifier>{BCD73D20-42B1-6CDB-DE66-B06236A60F47}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\contexts">\r
+ <UniqueIdentifier>{20DC13F6-2369-8841-9F0B-D13FA14EEE74}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\effects">\r
+ <UniqueIdentifier>{A302A8DB-120F-9EBB-A3D5-2C29963AA56B}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\fonts">\r
+ <UniqueIdentifier>{45489C2A-6E0E-CCDC-6638-0DACEEB63CCA}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\geometry">\r
+ <UniqueIdentifier>{F1B90726-DB55-0293-BFAF-C65C7DF5489C}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\image_formats\jpglib">\r
+ <UniqueIdentifier>{2C55FD42-0ACD-B0B8-7EAE-EB17F09BAEEC}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\image_formats\pnglib">\r
+ <UniqueIdentifier>{B68CD2B2-701F-9AB7-4638-2485D6E06BCF}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\image_formats">\r
+ <UniqueIdentifier>{B0B7C78E-729E-0FFA-D611-82AE8BC7FE2C}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\images">\r
+ <UniqueIdentifier>{0A4F7E12-220C-14EF-0026-9C0629FA9C17}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\native">\r
+ <UniqueIdentifier>{37F49E10-4E62-6D5C-FF70-722D0CA3D97E}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics\placement">\r
+ <UniqueIdentifier>{160D9882-0F68-278D-C5F9-8960FD7421D2}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_graphics">\r
+ <UniqueIdentifier>{4CED05DA-E0A2-E548-F753-1F2EF299A8E3}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\application">\r
+ <UniqueIdentifier>{294E4CD5-B06F-97D1-04A3-51871CEA507C}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\buttons">\r
+ <UniqueIdentifier>{77228F15-BD91-06FF-2C7E-0377D25C2C94}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\commands">\r
+ <UniqueIdentifier>{5CB531E6-BF9A-2C50-056C-EE5A525D28D3}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\components">\r
+ <UniqueIdentifier>{E4EA47E5-B41C-2A19-1783-7E9104096ECD}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\drawables">\r
+ <UniqueIdentifier>{46A17AC9-0BFF-B5CE-26D6-B9D1992C88AC}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\filebrowser">\r
+ <UniqueIdentifier>{D90A8DF7-FBAB-D363-13C0-6707BB22B72B}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\keyboard">\r
+ <UniqueIdentifier>{8AE77C40-6839-EC37-4515-BD3CC269BCE4}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\layout">\r
+ <UniqueIdentifier>{0EAD99DB-011F-09E5-45A2-365F646EB004}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\lookandfeel">\r
+ <UniqueIdentifier>{F57590C6-3B90-1BE1-1006-488BA33E8BD9}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\menus">\r
+ <UniqueIdentifier>{7C319D73-0D93-5842-0874-398D2D3038D5}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\misc">\r
+ <UniqueIdentifier>{2CB4DB0C-DD3B-6195-D822-76EC7A5C88D2}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\mouse">\r
+ <UniqueIdentifier>{FE3CB19C-EF43-5CF5-DAF0-09D4E43D0AB9}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\native">\r
+ <UniqueIdentifier>{895C2D33-E08D-B1BA-BB36-FC4CA65090C8}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\positioning">\r
+ <UniqueIdentifier>{D64A57DB-A956-5519-1929-1D929B56E1B0}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\properties">\r
+ <UniqueIdentifier>{5A99CC24-AC45-7ED6-C11A-B8B86E76D884}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\widgets">\r
+ <UniqueIdentifier>{7A131EEC-25A7-22F6-2839-A2194DDF3007}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics\windows">\r
+ <UniqueIdentifier>{EA9DB76C-CEF7-6BFC-2070-28B7DF8E8063}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_basics">\r
+ <UniqueIdentifier>{3C206A40-6F1B-E683-ACF1-DEC3703D0140}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_extra\code_editor">\r
+ <UniqueIdentifier>{DF95D4BF-E18C-125A-5EBB-8993A06E232C}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_extra\documents">\r
+ <UniqueIdentifier>{118946F2-AC24-0F09-62D5-753DF87A60CD}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_extra\embedding">\r
+ <UniqueIdentifier>{07329F9B-7D3D-CEB3-C771-714842076140}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_extra\misc">\r
+ <UniqueIdentifier>{08BBBECB-B0D1-7611-37EC-F57E1D0CE2A2}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_extra\native">\r
+ <UniqueIdentifier>{268E8F2A-980C-BF2F-B161-AACABC9D91F3}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules\juce_gui_extra">\r
+ <UniqueIdentifier>{A4D76113-9EDC-DA60-D89B-5BACF7F1C426}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Modules">\r
+ <UniqueIdentifier>{FE955B6B-68AC-AA07-70D8-2413F6DB65C8}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="JUCE Library Code">\r
+ <UniqueIdentifier>{7ED5A90E-41AF-A1EF-659B-37CEEAB9BA61}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\..\Source\Main.cpp">\r
+ <Filter>AudioPerformanceTest\Source</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioDataConverters.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_CatmullRomInterpolator.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_IIRFilter.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LagrangeInterpolator.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiBuffer.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiFile.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiKeyboardState.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessage.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessageSequence.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiRPN.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEInstrument.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEMessages.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPENote.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_IIRFilterAudioSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MemoryAudioSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MixerAudioSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ResamplingAudioSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ReverbAudioSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ToneGeneratorAudioSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\synthesisers\juce_Synthesiser.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics\synthesisers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.cpp">\r
+ <Filter>JUCE Modules\juce_audio_basics</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.mm">\r
+ <Filter>JUCE Modules\juce_audio_basics</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioDeviceManager.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODevice.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiMessageCollector.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiOutput.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Audio.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Midi.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_Oboe.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_android_OpenSL.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_ios_Audio.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_ALSA.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_Bela.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_JackAudio.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_linux_Midi.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_mac_CoreAudio.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_mac_CoreMidi.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_ASIO.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_DirectSound.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_Midi.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\native\juce_win32_WASAPI.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioSourcePlayer.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioTransportSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices\sources</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.cpp">\r
+ <Filter>JUCE Modules\juce_audio_devices</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.mm">\r
+ <Filter>JUCE Modules\juce_audio_devices</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitmath.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitreader.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\bitwriter.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\cpu.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\crc.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\fixed.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\float.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\format.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\lpc_flac.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\md5.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\memory.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_decoder.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_encoder.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\stream_encoder_framing.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\window_flac.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\analysis.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\bitrate.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\block.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codebook.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\envelope.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\floor0.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\floor1.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\info.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lpc.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lsp.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mapping0.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mdct.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\psy.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\registry.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\res0.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\sharedbook.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\smallft.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\synthesis.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\vorbisenc.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\vorbisfile.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\window.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\bitwise.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\framing.c">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_AiffAudioFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_CoreAudioFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_FlacAudioFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_LAMEEncoderAudioFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_MP3AudioFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReaderSource.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatWriter.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioSubsectionReader.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_BufferingAudioFormatReader.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\sampler\juce_Sampler.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats\sampler</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.cpp">\r
+ <Filter>JUCE Modules\juce_audio_formats</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.mm">\r
+ <Filter>JUCE Modules\juce_audio_formats</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\format</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\format</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.mm">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LegacyAudioParameter.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioPluginInstance.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessor.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorEditor.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorGraph.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameters.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.cpp">\r
+ <Filter>JUCE Modules\juce_audio_processors</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.mm">\r
+ <Filter>JUCE Modules\juce_audio_processors</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\audio_cd</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioAppComponent.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioDeviceSelectorComponent.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnail.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_android_BluetoothMidiDevicePairingDialogue.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_ios_BluetoothMidiDevicePairingDialogue.mm">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_linux_AudioCDReader.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_linux_BluetoothMidiDevicePairingDialogue.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_mac_AudioCDBurner.mm">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_mac_AudioCDReader.mm">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_mac_BluetoothMidiDevicePairingDialogue.mm">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win_BluetoothMidiDevicePairingDialogue.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win32_AudioCDBurner.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_win32_AudioCDReader.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\players</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils\players</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.cpp">\r
+ <Filter>JUCE Modules\juce_audio_utils</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.mm">\r
+ <Filter>JUCE Modules\juce_audio_utils</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_AbstractFifo.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_DynamicObject.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_HashMap_test.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.cpp">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_File.cpp">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.cpp">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileInputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.cpp">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.cpp">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.cpp">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.cpp">\r
+ <Filter>JUCE Modules\juce_core\javascript</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\javascript\juce_JSON.cpp">\r
+ <Filter>JUCE Modules\juce_core\javascript</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\logging\juce_FileLogger.cpp">\r
+ <Filter>JUCE Modules\juce_core\logging</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\logging\juce_Logger.cpp">\r
+ <Filter>JUCE Modules\juce_core\logging</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_BigInteger.cpp">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Expression.cpp">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Result.cpp">\r
+ <Filter>JUCE Modules\juce_core\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_RuntimePermissions.cpp">\r
+ <Filter>JUCE Modules\juce_core\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_StdFunctionCompat.cpp">\r
+ <Filter>JUCE Modules\juce_core\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.cpp">\r
+ <Filter>JUCE Modules\juce_core\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Files.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Misc.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Network.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_RuntimePermissions.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_SystemStats.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Threads.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_curl_Network.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_CommonFile.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Files.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Network.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_SystemStats.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_linux_Threads.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_Files.mm">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_Network.mm">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_Strings.mm">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_SystemStats.mm">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_mac_Threads.mm">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_posix_NamedPipe.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Files.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Network.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Registry.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_SystemStats.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_win32_Threads.cpp">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.cpp">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_MACAddress.cpp">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_NamedPipe.cpp">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_Socket.cpp">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_URL.cpp">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.cpp">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_InputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_MemoryInputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_MemoryOutputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_OutputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_SubregionStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\streams\juce_URLInputSource.cpp">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\system\juce_SystemStats.cpp">\r
+ <Filter>JUCE Modules\juce_core\system</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_Base64.cpp">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_CharacterFunctions.cpp">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_Identifier.cpp">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_LocalisedStrings.cpp">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_String.cpp">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringArray.cpp">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringPairArray.cpp">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_StringPool.cpp">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\text\juce_TextDiff.cpp">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ChildProcess.cpp">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_HighResolutionTimer.cpp">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ReadWriteLock.cpp">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_Thread.cpp">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_ThreadPool.cpp">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\threads\juce_TimeSliceThread.cpp">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_PerformanceCounter.cpp">\r
+ <Filter>JUCE Modules\juce_core\time</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_RelativeTime.cpp">\r
+ <Filter>JUCE Modules\juce_core\time</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\time\juce_Time.cpp">\r
+ <Filter>JUCE Modules\juce_core\time</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\unit_tests\juce_UnitTest.cpp">\r
+ <Filter>JUCE Modules\juce_core\unit_tests</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\xml\juce_XmlDocument.cpp">\r
+ <Filter>JUCE Modules\juce_core\xml</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\xml\juce_XmlElement.cpp">\r
+ <Filter>JUCE Modules\juce_core\xml</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\adler32.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\compress.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\crc32.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\deflate.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\infback.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inffast.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inflate.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\inftrees.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\trees.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\uncompr.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\zlib\zutil.c">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_GZIPCompressorOutputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\zip</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_GZIPDecompressorInputStream.cpp">\r
+ <Filter>JUCE Modules\juce_core\zip</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\zip\juce_ZipFile.cpp">\r
+ <Filter>JUCE Modules\juce_core\zip</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\juce_core.cpp">\r
+ <Filter>JUCE Modules\juce_core</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\juce_core.mm">\r
+ <Filter>JUCE Modules\juce_core</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_ApplicationProperties.cpp">\r
+ <Filter>JUCE Modules\juce_data_structures\app_properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_PropertiesFile.cpp">\r
+ <Filter>JUCE Modules\juce_data_structures\app_properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoManager.cpp">\r
+ <Filter>JUCE Modules\juce_data_structures\undomanager</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.cpp">\r
+ <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.cpp">\r
+ <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.cpp">\r
+ <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">\r
+ <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.cpp">\r
+ <Filter>JUCE Modules\juce_data_structures</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.mm">\r
+ <Filter>JUCE Modules\juce_data_structures</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionBroadcaster.cpp">\r
+ <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_AsyncUpdater.cpp">\r
+ <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeBroadcaster.cpp">\r
+ <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_ConnectedChildProcess.cpp">\r
+ <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnection.cpp">\r
+ <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnectionServer.cpp">\r
+ <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_ApplicationBase.cpp">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_DeletedAtShutdown.cpp">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_MessageListener.cpp">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\messages\juce_MessageManager.cpp">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_android_Messaging.cpp">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_ios_MessageManager.mm">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_linux_Messaging.cpp">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_mac_MessageManager.mm">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_win32_Messaging.cpp">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\native\juce_win32_WinRTWrapper.cpp">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\timers\juce_MultiTimer.cpp">\r
+ <Filter>JUCE Modules\juce_events\timers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\timers\juce_Timer.cpp">\r
+ <Filter>JUCE Modules\juce_events\timers</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\juce_events.cpp">\r
+ <Filter>JUCE Modules\juce_events</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_events\juce_events.mm">\r
+ <Filter>JUCE Modules\juce_events</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_Colour.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_ColourGradient.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_Colours.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\colour\juce_FillType.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_GraphicsContext.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\effects\juce_DropShadowEffect.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\effects\juce_GlowEffect.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_AttributedString.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_CustomTypeface.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_Font.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_GlyphArrangement.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_TextLayout.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\fonts\juce_Typeface.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_AffineTransform.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_EdgeTable.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_Path.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathIterator.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapimin.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapistd.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jccoefct.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jccolor.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcdctmgr.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jchuff.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcinit.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmainct.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmarker.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcmaster.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcomapi.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcparam.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcphuff.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcprepct.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcsample.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jctrans.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdapimin.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdapistd.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdatasrc.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdcoefct.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdcolor.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jddctmgr.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdhuff.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdinput.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmainct.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmarker.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmaster.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdmerge.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdphuff.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdpostct.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdsample.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdtrans.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jerror.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctflt.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctfst.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jfdctint.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctflt.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctfst.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctint.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jidctred.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemmgr.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemnobs.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jquant1.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jquant2.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jutils.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\transupp.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\png.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngerror.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngget.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngmem.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngpread.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngread.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrio.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrtran.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngrutil.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngset.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngtrans.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwio.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwrite.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwtran.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngwutil.c">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_GIFLoader.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_JPEGLoader.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\juce_PNGLoader.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_Image.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_Fonts.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_GraphicsContext.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_android_IconHelpers.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_freetype_Fonts.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_linux_Fonts.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_linux_IconHelpers.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.mm">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_mac_Fonts.mm">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_mac_IconHelpers.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Direct2DGraphicsContext.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_DirectWriteTypeface.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_DirectWriteTypeLayout.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Fonts.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\native\juce_win32_IconHelpers.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_RectanglePlacement.cpp">\r
+ <Filter>JUCE Modules\juce_graphics\placement</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\juce_graphics.cpp">\r
+ <Filter>JUCE Modules\juce_graphics</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_graphics\juce_graphics.mm">\r
+ <Filter>JUCE Modules\juce_graphics</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\application\juce_Application.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\application</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ArrowButton.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_Button.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_DrawableButton.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_HyperlinkButton.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ImageButton.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ShapeButton.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_TextButton.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToggleButton.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToolbarButton.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandInfo.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandManager.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandTarget.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\commands\juce_KeyPressMappingSet.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_Component.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_ComponentListener.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_Desktop.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\components\juce_ModalComponentManager.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_Drawable.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableComposite.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableImage.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawablePath.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableRectangle.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableShape.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableText.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_SVGParser.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ContentSharer.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsDisplayComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsList.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooser.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooserDialogBox.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileListComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilenameComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileSearchPathListComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileTreeComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ImagePreviewComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_CaretComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyboardFocusTraverser.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyListener.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyPress.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_ModifierKeys.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentAnimator.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBoundsConstrainer.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBuilder.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentMovementWatcher.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ConcertinaPanel.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexBox.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Grid.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridItem.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridUnitTests.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GroupComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_MultiDocumentPanel.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableBorderComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableCornerComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableEdgeComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ScrollBar.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_SidePanel.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutManager.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutResizerBar.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableObjectResizer.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedButtonBar.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Viewport.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V1.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V2.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V3.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V4.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_BurgerMenuComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarModel.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseCursor.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseEvent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_ContentSharer.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_FileChooser.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_Windowing.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_common_MimeTypes.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_ContentSharer.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_FileChooser.mm">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_UIViewComponentPeer.mm">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_Windowing.mm">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_FileChooser.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11_Clipboard.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11_Windowing.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_FileChooser.mm">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_MainMenu.mm">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_MouseCursor.mm">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_NSViewComponentPeer.mm">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_Windowing.mm">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_DragAndDrop.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_FileChooser.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_Windowing.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinatePositioner.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeParallelogram.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePoint.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePointPath.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeRectangle.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_BooleanPropertyComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ButtonPropertyComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ChoicePropertyComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_MultiChoicePropertyComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyPanel.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_SliderPropertyComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\properties\juce_TextPropertyComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ComboBox.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ImageComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Label.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ListBox.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ProgressBar.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Slider.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableHeaderComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableListBox.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TextEditor.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Toolbar.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemPalette.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TreeView.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_AlertWindow.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_CallOutBox.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ComponentPeer.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DialogWindow.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DocumentWindow.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ResizableWindow.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ThreadWithProgressWindow.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TooltipWindow.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TopLevelWindow.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.cpp">\r
+ <Filter>JUCE Modules\juce_gui_basics</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.mm">\r
+ <Filter>JUCE Modules\juce_gui_basics</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeDocument.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeEditorComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniser.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_LuaCodeTokeniser.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_XMLCodeTokeniser.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\documents\juce_FileBasedDocument.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\documents</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_BubbleMessageComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_ColourSelector.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_KeyMappingEditorComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_LiveConstantEditor.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PreferencesPanel.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PushNotifications.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_RecentlyOpenedFilesList.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_android_PushNotifications.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_android_WebBrowserComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_AndroidViewComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_ios_PushNotifications.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_ios_UIViewComponent.mm">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_X11_SystemTrayIcon.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_X11_WebBrowserComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_linux_XEmbedComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_AppleRemote.mm">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_NSViewComponent.mm">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_PushNotifications.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_SystemTrayIcon.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_WebBrowserComponent.mm">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_ActiveXComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_SystemTrayIcon.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\native\juce_win32_WebBrowserComponent.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.cpp">\r
+ <Filter>JUCE Modules\juce_gui_extra</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.mm">\r
+ <Filter>JUCE Modules\juce_gui_extra</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_basics.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_devices.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_formats.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_utils.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_core.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_data_structures.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_events.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_graphics.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_gui_basics.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\JuceLibraryCode\include_juce_gui_extra.cpp">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\..\Source\MainComponent.h">\r
+ <Filter>AudioPerformanceTest\Source</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\audio_play_head\juce_AudioPlayHead.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\audio_play_head</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioDataConverters.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioSampleBuffer.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_CatmullRomInterpolator.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_Decibels.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_IIRFilter.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LagrangeInterpolator.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_LinearSmoothedValue.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\effects\juce_Reverb.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\effects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiBuffer.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiFile.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiKeyboardState.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessage.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiMessageSequence.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\midi\juce_MidiRPN.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\midi</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEInstrument.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEMessages.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPENote.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\mpe</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_IIRFilterAudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MemoryAudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_MixerAudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_PositionableAudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ResamplingAudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ReverbAudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ToneGeneratorAudioSource.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\synthesisers\juce_Synthesiser.h">\r
+ <Filter>JUCE Modules\juce_audio_basics\synthesisers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_basics\juce_audio_basics.h">\r
+ <Filter>JUCE Modules\juce_audio_basics</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioDeviceManager.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODevice.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_SystemAudioVolume.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiInput.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiMessageCollector.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiOutput.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\native\juce_ios_Audio.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\native\juce_MidiDataConcatenator.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioSourcePlayer.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\sources\juce_AudioTransportSource.h">\r
+ <Filter>JUCE Modules\juce_audio_devices\sources</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_devices\juce_audio_devices.h">\r
+ <Filter>JUCE Modules\juce_audio_devices</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\all.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitmath.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitreader.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\bitwriter.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\cpu.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\crc.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\fixed.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\float.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\format.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\lpc.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\md5.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\memory.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\metadata.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\stream_encoder.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\stream_encoder_framing.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\private\window.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\private</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\all.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\stream_decoder.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\libFLAC\include\protected\stream_encoder.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\all.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\alloc.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\assert.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\callback.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\compat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\endswap.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\export.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\format.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\metadata.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\ordinals.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\stream_decoder.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\stream_encoder.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\win_utf8_io.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled\res_books_51.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled\res_books_stereo.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor\floor_books.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled\res_books_uncoupled.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\floor_all.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_8.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_11.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_16.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\psych_44.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_8.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_16.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44p51.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\residue_44u.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_8.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_11.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_16.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_22.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_32.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44p51.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_44u.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes\setup_X.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\backends.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\bitrate.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codebook.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\codec_internal.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\envelope.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\highlevel.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lookup_data.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lpc.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\lsp.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\masking.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\mdct.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\misc.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\os.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\psy.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\registry.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\scales.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\smallft.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\window.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\codec.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\config_types.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\ogg.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\os_types.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\vorbisenc.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\vorbisfile.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_AiffAudioFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_CoreAudioFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_FlacAudioFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_LAMEEncoderAudioFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_MP3AudioFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReaderSource.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatWriter.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioSubsectionReader.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_BufferingAudioFormatReader.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_MemoryMappedAudioFormatReader.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\sampler\juce_Sampler.h">\r
+ <Filter>JUCE Modules\juce_audio_formats\sampler</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.h">\r
+ <Filter>JUCE Modules\juce_audio_formats</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Common.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Headers.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTCommon.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTInterface.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTMidiEventList.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioPluginInstance.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessor.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorEditor.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorGraph.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorListener.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorParameter.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\processors</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterChoice.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterFloat.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterInt.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameterWithID.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.h">\r
+ <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.h">\r
+ <Filter>JUCE Modules\juce_audio_processors</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDBurner.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\audio_cd</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\audio_cd</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioAppComponent.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioDeviceSelectorComponent.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnail.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailBase.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_BluetoothMidiDevicePairingDialogue.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\gui</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\players</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.h">\r
+ <Filter>JUCE Modules\juce_audio_utils\players</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.h">\r
+ <Filter>JUCE Modules\juce_audio_utils</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_AbstractFifo.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Array.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ArrayAllocationBase.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_DynamicObject.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ElementComparator.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_HashMap.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_LinkedListPointer.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ReferenceCountedArray.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ScopedValueSetter.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SortedSet.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Variant.h">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.h">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_File.h">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.h">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileInputStream.h">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileOutputStream.h">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileSearchPath.h">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_MemoryMappedFile.h">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_TemporaryFile.h">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_WildcardFileFilter.h">\r
+ <Filter>JUCE Modules\juce_core\files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_Javascript.h">\r
+ <Filter>JUCE Modules\juce_core\javascript</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\javascript\juce_JSON.h">\r
+ <Filter>JUCE Modules\juce_core\javascript</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\logging\juce_FileLogger.h">\r
+ <Filter>JUCE Modules\juce_core\logging</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\logging\juce_Logger.h">\r
+ <Filter>JUCE Modules\juce_core\logging</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_BigInteger.h">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Expression.h">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_MathsFunctions.h">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_NormalisableRange.h">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">\r
+ <Filter>JUCE Modules\juce_core\maths</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_HeapBlock.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_LeakedObjectDetector.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Memory.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_OptionalScopedPointer.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ReferenceCountedObject.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ScopedPointer.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_SharedResourcePointer.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Singleton.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_WeakReference.h">\r
+ <Filter>JUCE Modules\juce_core\memory</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_Result.h">\r
+ <Filter>JUCE Modules\juce_core\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_RuntimePermissions.h">\r
+ <Filter>JUCE Modules\juce_core\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_StdFunctionCompat.h">\r
+ <Filter>JUCE Modules\juce_core\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.h">\r
+ <Filter>JUCE Modules\juce_core\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\misc\juce_WindowsRegistry.h">\r
+ <Filter>JUCE Modules\juce_core\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h">\r
+ <Filter>JUCE Modules\juce_core\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_MACAddress.h">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_NamedPipe.h">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_Socket.h">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_URL.h">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.h">\r
+ <Filter>JUCE Modules\juce_core\network</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.h">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.h">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputSource.h">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputStream.h">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_MemoryInputStream.h">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_MemoryOutputStream.h">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_OutputStream.h">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_SubregionStream.h">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_URLInputSource.h">\r
+ <Filter>JUCE Modules\juce_core\streams</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_CompilerSupport.h">\r
+ <Filter>JUCE Modules\juce_core\system</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_PlatformDefs.h">\r
+ <Filter>JUCE Modules\juce_core\system</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_StandardHeader.h">\r
+ <Filter>JUCE Modules\juce_core\system</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_SystemStats.h">\r
+ <Filter>JUCE Modules\juce_core\system</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\system\juce_TargetPlatform.h">\r
+ <Filter>JUCE Modules\juce_core\system</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_Base64.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharacterFunctions.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_ASCII.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF8.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF16.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_CharPointer_UTF32.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_Identifier.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_LocalisedStrings.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_NewLine.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_String.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringArray.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringPairArray.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringPool.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_StringRef.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\text\juce_TextDiff.h">\r
+ <Filter>JUCE Modules\juce_core\text</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ChildProcess.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_CriticalSection.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_DynamicLibrary.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_HighResolutionTimer.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_InterProcessLock.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_Process.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ReadWriteLock.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedLock.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedReadLock.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ScopedWriteLock.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_SpinLock.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_Thread.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ThreadLocalValue.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_ThreadPool.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_TimeSliceThread.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\threads\juce_WaitableEvent.h">\r
+ <Filter>JUCE Modules\juce_core\threads</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_PerformanceCounter.h">\r
+ <Filter>JUCE Modules\juce_core\time</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_RelativeTime.h">\r
+ <Filter>JUCE Modules\juce_core\time</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\time\juce_Time.h">\r
+ <Filter>JUCE Modules\juce_core\time</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\unit_tests\juce_UnitTest.h">\r
+ <Filter>JUCE Modules\juce_core\unit_tests</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\xml\juce_XmlDocument.h">\r
+ <Filter>JUCE Modules\juce_core\xml</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\xml\juce_XmlElement.h">\r
+ <Filter>JUCE Modules\juce_core\xml</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\crc32.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\deflate.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inffast.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inffixed.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inflate.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\inftrees.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\trees.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zconf.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zconf.in.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zlib.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\zlib\zutil.h">\r
+ <Filter>JUCE Modules\juce_core\zip\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_GZIPCompressorOutputStream.h">\r
+ <Filter>JUCE Modules\juce_core\zip</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_GZIPDecompressorInputStream.h">\r
+ <Filter>JUCE Modules\juce_core\zip</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\zip\juce_ZipFile.h">\r
+ <Filter>JUCE Modules\juce_core\zip</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_core\juce_core.h">\r
+ <Filter>JUCE Modules\juce_core</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_ApplicationProperties.h">\r
+ <Filter>JUCE Modules\juce_data_structures\app_properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\app_properties\juce_PropertiesFile.h">\r
+ <Filter>JUCE Modules\juce_data_structures\app_properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoableAction.h">\r
+ <Filter>JUCE Modules\juce_data_structures\undomanager</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\undomanager\juce_UndoManager.h">\r
+ <Filter>JUCE Modules\juce_data_structures\undomanager</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.h">\r
+ <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.h">\r
+ <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.h">\r
+ <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h">\r
+ <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h">\r
+ <Filter>JUCE Modules\juce_data_structures\values</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h">\r
+ <Filter>JUCE Modules\juce_data_structures</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionBroadcaster.h">\r
+ <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ActionListener.h">\r
+ <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_AsyncUpdater.h">\r
+ <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeBroadcaster.h">\r
+ <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\broadcasters\juce_ChangeListener.h">\r
+ <Filter>JUCE Modules\juce_events\broadcasters</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_ConnectedChildProcess.h">\r
+ <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnection.h">\r
+ <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\interprocess\juce_InterprocessConnectionServer.h">\r
+ <Filter>JUCE Modules\juce_events\interprocess</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_ApplicationBase.h">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_CallbackMessage.h">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_DeletedAtShutdown.h">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_Initialisation.h">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_Message.h">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MessageListener.h">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MessageManager.h">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MountedVolumeListChangeDetector.h">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_NotificationType.h">\r
+ <Filter>JUCE Modules\juce_events\messages</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoop.h">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_osx_MessageQueue.h">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_HiddenMessageWindow.h">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_WinRTWrapper.h">\r
+ <Filter>JUCE Modules\juce_events\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\timers\juce_MultiTimer.h">\r
+ <Filter>JUCE Modules\juce_events\timers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\timers\juce_Timer.h">\r
+ <Filter>JUCE Modules\juce_events\timers</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_events\juce_events.h">\r
+ <Filter>JUCE Modules\juce_events</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_Colour.h">\r
+ <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_ColourGradient.h">\r
+ <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_Colours.h">\r
+ <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_FillType.h">\r
+ <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\colour\juce_PixelFormats.h">\r
+ <Filter>JUCE Modules\juce_graphics\colour</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_GraphicsContext.h">\r
+ <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsContext.h">\r
+ <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsPostScriptRenderer.h">\r
+ <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\contexts\juce_LowLevelGraphicsSoftwareRenderer.h">\r
+ <Filter>JUCE Modules\juce_graphics\contexts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_DropShadowEffect.h">\r
+ <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_GlowEffect.h">\r
+ <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\effects\juce_ImageEffectFilter.h">\r
+ <Filter>JUCE Modules\juce_graphics\effects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_AttributedString.h">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_CustomTypeface.h">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_Font.h">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_GlyphArrangement.h">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_TextLayout.h">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\fonts\juce_Typeface.h">\r
+ <Filter>JUCE Modules\juce_graphics\fonts</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_AffineTransform.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_BorderSize.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_EdgeTable.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Line.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Parallelogram.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Path.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathIterator.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h">\r
+ <Filter>JUCE Modules\juce_graphics\geometry</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\cderror.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jchuff.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jconfig.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdct.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jdhuff.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jerror.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jinclude.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmemsys.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jmorecfg.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jpegint.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jpeglib.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jversion.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\transupp.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\png.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngconf.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pnginfo.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngpriv.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\pngstruct.h">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_Image.h">\r
+ <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.h">\r
+ <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.h">\r
+ <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.h">\r
+ <Filter>JUCE Modules\juce_graphics\images</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.h">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsHelpers.h">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_RenderingHelpers.h">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_win32_Direct2DGraphicsContext.h">\r
+ <Filter>JUCE Modules\juce_graphics\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.h">\r
+ <Filter>JUCE Modules\juce_graphics\placement</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\placement\juce_RectanglePlacement.h">\r
+ <Filter>JUCE Modules\juce_graphics\placement</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_graphics\juce_graphics.h">\r
+ <Filter>JUCE Modules\juce_graphics</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\application\juce_Application.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\application</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ArrowButton.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_Button.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_DrawableButton.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_HyperlinkButton.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ImageButton.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ShapeButton.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_TextButton.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToggleButton.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\buttons\juce_ToolbarButton.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\buttons</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandID.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandInfo.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandManager.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_ApplicationCommandTarget.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\commands\juce_KeyPressMappingSet.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\commands</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_CachedComponentImage.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_Component.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_ComponentListener.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_Desktop.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\components\juce_ModalComponentManager.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\components</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_Drawable.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableComposite.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableImage.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawablePath.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableRectangle.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableShape.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\drawables\juce_DrawableText.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\drawables</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ContentSharer.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsDisplayComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_DirectoryContentsList.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileBrowserListener.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooser.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileChooserDialogBox.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileListComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilenameComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FilePreviewComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileSearchPathListComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_FileTreeComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\filebrowser\juce_ImagePreviewComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\filebrowser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_CaretComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyboardFocusTraverser.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyListener.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_KeyPress.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_ModifierKeys.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_SystemClipboard.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_TextEditorKeyMapper.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\keyboard\juce_TextInputTarget.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\keyboard</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_AnimatedPosition.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_AnimatedPositionBehaviours.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentAnimator.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBoundsConstrainer.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentBuilder.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ComponentMovementWatcher.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ConcertinaPanel.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexBox.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_FlexItem.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Grid.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GridItem.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_GroupComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_MultiDocumentPanel.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableBorderComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableCornerComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ResizableEdgeComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_ScrollBar.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_SidePanel.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutManager.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableLayoutResizerBar.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_StretchableObjectResizer.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedButtonBar.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_TabbedComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\layout\juce_Viewport.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\layout</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V1.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V2.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V3.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\lookandfeel\juce_LookAndFeel_V4.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\lookandfeel</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_BurgerMenuComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_MenuBarModel.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\menus</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropTarget.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_FileDragAndDropTarget.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_LassoComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseCursor.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseEvent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_SelectedItemSet.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TextDragAndDropTarget.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TooltipClient.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_linux_X11.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_MultiTouchMapper.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinatePositioner.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeParallelogram.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePoint.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativePointPath.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeRectangle.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\positioning</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_BooleanPropertyComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ButtonPropertyComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_ChoicePropertyComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_MultiChoicePropertyComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_PropertyPanel.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_SliderPropertyComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\properties\juce_TextPropertyComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\properties</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ComboBox.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ImageComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Label.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ListBox.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ProgressBar.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Slider.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableHeaderComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TableListBox.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TextEditor.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_Toolbar.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemFactory.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_ToolbarItemPalette.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\widgets\juce_TreeView.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\widgets</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_AlertWindow.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_CallOutBox.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ComponentPeer.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DialogWindow.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_DocumentWindow.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_NativeMessageBox.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ResizableWindow.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_ThreadWithProgressWindow.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TooltipWindow.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\windows\juce_TopLevelWindow.h">\r
+ <Filter>JUCE Modules\juce_gui_basics\windows</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_basics\juce_gui_basics.h">\r
+ <Filter>JUCE Modules\juce_gui_basics</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeDocument.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeEditorComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CodeTokeniser.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniser.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_CPlusPlusCodeTokeniserFunctions.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_LuaCodeTokeniser.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\code_editor\juce_XMLCodeTokeniser.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\code_editor</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\documents\juce_FileBasedDocument.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\documents</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_ActiveXControlComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_AndroidViewComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_NSViewComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_UIViewComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_XEmbedComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AppleRemote.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_BubbleMessageComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_ColourSelector.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_KeyMappingEditorComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_LiveConstantEditor.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PreferencesPanel.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_PushNotifications.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_RecentlyOpenedFilesList.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_WebBrowserComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\misc</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_CarbonViewWrapperComponent.h">\r
+ <Filter>JUCE Modules\juce_gui_extra\native</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.h">\r
+ <Filter>JUCE Modules\juce_gui_extra</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\JuceLibraryCode\AppConfig.h">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\Flac Licence.txt">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\flac</Filter>\r
+ </None>\r
+ <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\Ogg Vorbis Licence.txt">\r
+ <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>\r
+ </None>\r
+ <None Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\changes to libjpeg for JUCE.txt">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>\r
+ </None>\r
+ <None Include="..\..\..\..\modules\juce_graphics\image_formats\pnglib\libpng_readme.txt">\r
+ <Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>\r
+ </None>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include=".\resources.rc">\r
+ <Filter>JUCE Library Code</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+#ifdef JUCE_USER_DEFINED_RC_FILE\r
+ #include JUCE_USER_DEFINED_RC_FILE\r
+#else\r
+\r
+#undef WIN32_LEAN_AND_MEAN\r
+#define WIN32_LEAN_AND_MEAN\r
+#include <windows.h>\r
+\r
+VS_VERSION_INFO VERSIONINFO\r
+FILEVERSION 1,0,0,0\r
+BEGIN\r
+ BLOCK "StringFileInfo"\r
+ BEGIN\r
+ BLOCK "040904E4"\r
+ BEGIN\r
+ VALUE "CompanyName", "ROLI Ltd.\0"\r
+ VALUE "LegalCopyright", "ROLI Ltd.\0"\r
+ VALUE "FileDescription", "AudioPerformanceTest\0"\r
+ VALUE "FileVersion", "1.0.0\0"\r
+ VALUE "ProductName", "AudioPerformanceTest\0"\r
+ VALUE "ProductVersion", "1.0.0\0"\r
+ END\r
+ END\r
+\r
+ BLOCK "VarFileInfo"\r
+ BEGIN\r
+ VALUE "Translation", 0x409, 1252\r
+ END\r
+END\r
+\r
+#endif\r
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
C86DD529EC94922C2AB61742,
6C2BE2DE2ECC96615ED827AB,
409D569C572B6EF7F4F1702D, ); buildRules = ( ); dependencies = ( ); name = "AudioPerformanceTest - App"; productName = AudioPerformanceTest; productReference = 614F2084407B35D62101F69F; productType = "com.apple.product-type.application"; };
- 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); };
+ 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); };
};
rootObject = 9CE2A44801B5B4BE7A9667DA;
}
//#define JUCE_PLUGINHOST_AU 0\r
#endif\r
\r
+#ifndef JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
//==============================================================================\r
// juce_audio_utils flags:\r
\r
//==============================================================================\r
void initialise (const String&) override\r
{\r
- mainWindow = new MainWindow (getApplicationName());\r
+ mainWindow.reset (new MainWindow (getApplicationName()));\r
}\r
\r
void shutdown() override\r
};\r
\r
private:\r
- ScopedPointer<MainWindow> mainWindow;\r
+ std::unique_ptr<MainWindow> mainWindow;\r
};\r
\r
//==============================================================================\r
<JUCEOPTIONS JUCE_WASAPI="1" JUCE_DIRECTSOUND="1" JUCE_ALSA="1" JUCE_QUICKTIME="disabled"\r
JUCE_USE_FLAC="0" JUCE_USE_OGGVORBIS="0" JUCE_USE_CDBURNER="0"\r
JUCE_USE_CDREADER="0" JUCE_USE_CAMERA="0" JUCE_PLUGINHOST_VST="1"\r
- JUCE_PLUGINHOST_AU="1" JUCE_WEB_BROWSER="0" JUCE_PLUGINHOST_VST3="1"/>\r
+ JUCE_PLUGINHOST_AU="1" JUCE_WEB_BROWSER="0" JUCE_PLUGINHOST_VST3="1"\r
+ JUCE_PLUGINHOST_LADSPA="1"/>\r
<MODULES>\r
<MODULE id="juce_audio_basics" showAllCode="1"/>\r
<MODULE id="juce_audio_devices" showAllCode="1"/>\r
<MODULE id="juce_opengl" showAllCode="1"/>\r
<MODULE id="juce_video" showAllCode="1"/>\r
</MODULES>\r
+ <LIVE_SETTINGS>\r
+ <OSX/>\r
+ </LIVE_SETTINGS>\r
</JUCERPROJECT>\r
"../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"\r
"../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h"\r
"../../../../../modules/juce_core/containers/juce_SortedSet.h"\r
+ "../../../../../modules/juce_core/containers/juce_SparseSet.cpp"\r
"../../../../../modules/juce_core/containers/juce_SparseSet.h"\r
"../../../../../modules/juce_core/containers/juce_Variant.cpp"\r
"../../../../../modules/juce_core/containers/juce_Variant.h"\r
"../../../../../modules/juce_video/capture/juce_CameraDevice.cpp"\r
"../../../../../modules/juce_video/capture/juce_CameraDevice.h"\r
"../../../../../modules/juce_video/native/juce_android_CameraDevice.h"\r
+ "../../../../../modules/juce_video/native/juce_ios_CameraDevice.h"\r
"../../../../../modules/juce_video/native/juce_mac_CameraDevice.h"\r
"../../../../../modules/juce_video/native/juce_mac_Video.h"\r
"../../../../../modules/juce_video/native/juce_win32_CameraDevice.h"\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/capture/juce_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/native/juce_android_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_video/native/juce_ios_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/native/juce_mac_Video.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_video/native/juce_win32_CameraDevice.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
import android.content.res.Configuration;\r
import android.content.pm.PackageInfo;\r
import android.content.pm.PackageManager;\r
+import android.hardware.camera2.*;\r
import android.net.http.SslError;\r
import android.net.Uri;\r
import android.os.Bundle;\r
private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+ private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
\r
private static String getAndroidPermissionName (int permissionID)\r
{\r
// use string value as this is not defined in SDKs < 16\r
case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE";\r
case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+ case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA;\r
}\r
\r
// unknown permission ID!\r
setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
\r
permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+ appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
}\r
\r
@Override\r
{\r
suspendApp();\r
\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appPaused();\r
+\r
try\r
{\r
Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
super.onResume();\r
resumeApp();\r
\r
- // Ensure that navigation/status bar visibility is correctly restored.\r
- for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
- {\r
- if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
- ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
- }\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appResumed();\r
}\r
\r
@Override\r
{\r
ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
viewHolder.addView (v);\r
+ addAppPausedResumedListener (v, host);\r
return v;\r
}\r
\r
public final void deleteView (ComponentPeerView view)\r
{\r
+ removeAppPausedResumedListener (view, view.host);\r
+\r
view.host = 0;\r
\r
ViewGroup group = (ViewGroup) (view.getParent());\r
\r
public native void alertDismissed (long callback, int id);\r
\r
+ //==============================================================================\r
+ public interface AppPausedResumedListener\r
+ {\r
+ void appPaused();\r
+ void appResumed();\r
+ }\r
+\r
+ private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+ public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.put (new Long (listenerHost), l);\r
+ }\r
+\r
+ public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.remove (new Long (listenerHost));\r
+ }\r
+\r
//==============================================================================\r
public final class ComponentPeerView extends ViewGroup\r
- implements View.OnFocusChangeListener\r
+ implements View.OnFocusChangeListener, AppPausedResumedListener\r
{\r
public ComponentPeerView (Context context, boolean opaque_, long host)\r
{\r
}\r
\r
//==============================================================================\r
+ private native void handleAppPaused (long host);\r
private native void handleAppResumed (long host);\r
\r
+ @Override\r
+ public void appPaused()\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ handleAppPaused (host);\r
+ }\r
+\r
+ @Override\r
public void appResumed()\r
{\r
if (host == 0)\r
return;\r
\r
+ // Ensure that navigation/status bar visibility is correctly restored.\r
handleAppResumed (host);\r
}\r
}\r
private final Object hostLock = new Object();\r
}\r
\r
+\r
+ //==============================================================================\r
+ public class CameraDeviceStateCallback extends CameraDevice.StateCallback\r
+ {\r
+ private native void cameraDeviceStateClosed (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateError (long host, CameraDevice camera, int error);\r
+ private native void cameraDeviceStateOpened (long host, CameraDevice camera);\r
+\r
+ CameraDeviceStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateClosed (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onDisconnected (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateDisconnected (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onError (CameraDevice camera, int error)\r
+ {\r
+ cameraDeviceStateError (host, camera, error);\r
+ }\r
+\r
+ @Override\r
+ public void onOpened (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateOpened (host, camera);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback\r
+ {\r
+ private native void cameraCaptureSessionActive (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionReady (long host, CameraCaptureSession session);\r
+\r
+ CameraCaptureSessionStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onActive (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionActive (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionClosed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigureFailed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigureFailed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigured (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigured (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onReady (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionReady (host, session);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback\r
+ {\r
+ private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result);\r
+ private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure);\r
+ private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult);\r
+ private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber);\r
+ private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+ private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+\r
+ CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+ {\r
+ host = hostToUse;\r
+ preview = shouldBePreview;\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+ TotalCaptureResult result)\r
+ {\r
+ cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+ {\r
+ cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+ CaptureResult partialResult)\r
+ {\r
+ cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+ long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+ }\r
+\r
+ private long host;\r
+ private boolean preview;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class JuceOrientationEventListener extends OrientationEventListener\r
+ {\r
+ private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+ public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+ {\r
+ super (context, rate);\r
+\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onOrientationChanged (int orientation)\r
+ {\r
+ deviceOrientationChanged (host, orientation);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+\r
//==============================================================================\r
public static final String getLocaleValue (boolean isRegion)\r
{\r
D85C0D11EE4F6C73B9EB5BCD, ); name = Source; sourceTree = "<group>"; };
C8B793AC1BEFBE7A99BE8352 = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
USE_HEADERMAP = NO; }; name = Debug; };
49453CC5AD9F08D2738464AC = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
2429BB4D705CC57F49418CFB,
E8E94B3C187DA578BFCBDA98,
C515A1FE1A53D3968C22FAEF, ); buildRules = ( ); dependencies = ( ); name = "AudioPluginHost - App"; productName = AudioPluginHost; productReference = 8D8BBC353637DA442C5575DA; productType = "com.apple.product-type.application"; };
- ADE6E539DB98A302483A82D0 = {isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); };
+ ADE6E539DB98A302483A82D0 = {isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); };
};
rootObject = ADE6E539DB98A302483A82D0;
}
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_opengl\juce_opengl.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+ <Filter>JUCE Modules\juce_video\native</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_opengl\juce_opengl.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+ <Filter>JUCE Modules\juce_video\native</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_opengl\juce_opengl.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+ <Filter>JUCE Modules\juce_video\native</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
2429BB4D705CC57F49418CFB,
E8E94B3C187DA578BFCBDA98,
C515A1FE1A53D3968C22FAEF, ); buildRules = ( ); dependencies = ( ); name = "AudioPluginHost - App"; productName = AudioPluginHost; productReference = 8D8BBC353637DA442C5575DA; productType = "com.apple.product-type.application"; };
- ADE6E539DB98A302483A82D0 = {isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); };
+ ADE6E539DB98A302483A82D0 = {isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); };
};
rootObject = ADE6E539DB98A302483A82D0;
}
#define JUCE_PLUGINHOST_AU 1\r
#endif\r
\r
+#ifndef JUCE_PLUGINHOST_LADSPA\r
+ #define JUCE_PLUGINHOST_LADSPA 1\r
+#endif\r
+\r
//==============================================================================\r
// juce_audio_utils flags:\r
\r
const char* JUCEAppIcon_png = (const char*) temp_binary_data_0;\r
\r
\r
-const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept\r
+const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)\r
{\r
unsigned int hash = 0;\r
if (resourceNameUTF8 != 0)\r
"JUCEAppIcon.png"\r
};\r
\r
-const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept\r
+const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)\r
{\r
for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)\r
{\r
\r
// If you provide the name of one of the binary resource variables above, this function will\r
// return the corresponding data and its size (or a null pointer if the name isn't found).\r
- const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept;\r
+ const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);\r
\r
// If you provide the name of one of the binary resource variables above, this function will\r
// return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).\r
- const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept;\r
+ const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);\r
}\r
Result FilterGraph::loadDocument (const File& file)\r
{\r
XmlDocument doc (file);\r
- ScopedPointer<XmlElement> xml (doc.getDocumentElement());\r
+ std::unique_ptr<XmlElement> xml (doc.getDocumentElement());\r
\r
if (xml == nullptr || ! xml->hasTagName ("FILTERGRAPH"))\r
return Result::fail ("Not a valid filter graph file");\r
\r
Result FilterGraph::saveDocument (const File& file)\r
{\r
- ScopedPointer<XmlElement> xml (createXml());\r
+ std::unique_ptr<XmlElement> xml (createXml());\r
\r
if (! xml->writeToFile (file, {}))\r
return Result::fail ("Couldn't write to the file");\r
}\r
\r
if (p.getBusCount (true) > 0 || p.canAddBus (true))\r
- addAndMakeVisible (inConfig = new InputOutputConfig (*this, true));\r
+ {\r
+ inConfig.reset (new InputOutputConfig (*this, true));\r
+ addAndMakeVisible (inConfig.get());\r
+ }\r
\r
if (p.getBusCount (false) > 0 || p.canAddBus (false))\r
- addAndMakeVisible (outConfig = new InputOutputConfig (*this, false));\r
+ {\r
+ outConfig.reset (new InputOutputConfig (*this, false));\r
+ addAndMakeVisible (outConfig.get());\r
+ }\r
\r
currentLayout = p.getBusesLayout();\r
setSize (400, (inConfig != nullptr && outConfig != nullptr ? 160 : 0) + 200);\r
\r
AudioProcessor::BusesLayout currentLayout;\r
Label title;\r
- ScopedPointer<InputOutputConfig> inConfig, outConfig;\r
+ std::unique_ptr<InputOutputConfig> inConfig, outConfig;\r
\r
- InputOutputConfig* getConfig (bool isInput) noexcept { return isInput ? inConfig : outConfig; }\r
+ InputOutputConfig* getConfig (bool isInput) noexcept { return isInput ? inConfig.get() : outConfig.get(); }\r
void update();\r
\r
MainHostWindow* getMainWindow() const;\r
options.filenameSuffix = "settings";\r
options.osxLibrarySubFolder = "Preferences";\r
\r
- appProperties = new ApplicationProperties();\r
+ appProperties.reset (new ApplicationProperties());\r
appProperties->setStorageParameters (options);\r
\r
- mainWindow = new MainHostWindow();\r
+ mainWindow.reset (new MainHostWindow());\r
mainWindow->setUsingNativeTitleBar (true);\r
\r
commandManager.registerAllCommandsForTarget (this);\r
- commandManager.registerAllCommandsForTarget (mainWindow);\r
+ commandManager.registerAllCommandsForTarget (mainWindow.get());\r
\r
mainWindow->menuItemsChanged();\r
\r
bool moreThanOneInstanceAllowed() override { return true; }\r
\r
ApplicationCommandManager commandManager;\r
- ScopedPointer<ApplicationProperties> appProperties;\r
+ std::unique_ptr<ApplicationProperties> appProperties;\r
\r
private:\r
- ScopedPointer<MainHostWindow> mainWindow;\r
+ std::unique_ptr<MainHostWindow> mainWindow;\r
};\r
\r
static PluginHostApp& getApp() { return *dynamic_cast<PluginHostApp*>(JUCEApplication::getInstance()); }\r
KnownPluginList& knownPluginList;\r
AudioUnitPluginFormat formatToScan;\r
\r
- ScopedPointer<PluginDirectoryScanner> scanner;\r
+ std::unique_ptr<PluginDirectoryScanner> scanner;\r
FileSearchPath paths;\r
\r
ThreadPool pool;\r
auto deadMansPedalFile = getAppProperties().getUserSettings()\r
->getFile().getSiblingFile ("RecentlyCrashedPluginsList");\r
\r
- scanner = new PluginDirectoryScanner (knownPluginList, formatToScan, paths,\r
- true, deadMansPedalFile, true);\r
+ scanner.reset (new PluginDirectoryScanner (knownPluginList, formatToScan, paths,\r
+ true, deadMansPedalFile, true));\r
\r
for (int i = 5; --i >= 0;)\r
pool.addJob (new ScanJob (*this), true);\r
\r
void showPopupMenu()\r
{\r
- menu = new PopupMenu;\r
+ menu.reset (new PopupMenu);\r
menu->addItem (1, "Delete this filter");\r
menu->addItem (2, "Disconnect all pins");\r
menu->addItem (3, "Toggle Bypass");\r
Font font { 13.0f, Font::bold };\r
int numIns = 0, numOuts = 0;\r
DropShadowEffect shadow;\r
- ScopedPointer<PopupMenu> menu;\r
+ std::unique_ptr<PopupMenu> menu;\r
};\r
\r
\r
\r
void GraphEditorPanel::showPopupMenu (Point<int> mousePos)\r
{\r
- menu = new PopupMenu;\r
+ menu.reset (new PopupMenu);\r
\r
if (auto* mainWindow = findParentComponentOfClass<MainHostWindow>())\r
{\r
{\r
auto* c = dynamic_cast<ConnectorComponent*> (e.originalComponent);\r
connectors.removeObject (c, false);\r
- draggingConnector = c;\r
+ draggingConnector.reset (c);\r
\r
if (draggingConnector == nullptr)\r
- draggingConnector = new ConnectorComponent (*this);\r
+ draggingConnector.reset (new ConnectorComponent (*this));\r
\r
draggingConnector->setInput (source);\r
draggingConnector->setOutput (dest);\r
\r
- addAndMakeVisible (draggingConnector);\r
+ addAndMakeVisible (draggingConnector.get());\r
draggingConnector->toFront (false);\r
\r
dragConnector (e);\r
owner.addMouseListener (this, true);\r
\r
#if JUCE_IOS\r
- scanner = new AUScanner (knownPlugins);\r
+ scanner.reset (new AUScanner (knownPlugins));\r
#endif\r
}\r
\r
bool isOverSelectedRow = false;\r
\r
#if JUCE_IOS\r
- ScopedPointer<AUScanner> scanner;\r
+ std::unique_ptr<AUScanner> scanner;\r
#endif\r
};\r
\r
{\r
init();\r
\r
- deviceManager.addChangeListener (graphPanel);\r
+ deviceManager.addChangeListener (graphPanel.get());\r
deviceManager.addAudioCallback (&graphPlayer);\r
deviceManager.addMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector());\r
}\r
\r
void GraphDocumentComponent::init()\r
{\r
- addAndMakeVisible (graphPanel = new GraphEditorPanel (*graph));\r
+ graphPanel.reset (new GraphEditorPanel (*graph));\r
+ addAndMakeVisible (graphPanel.get());\r
graphPlayer.setProcessor (&graph->graph);\r
\r
keyState.addListener (&graphPlayer.getMidiMessageCollector());\r
\r
- addAndMakeVisible (keyboardComp = new MidiKeyboardComponent (keyState, MidiKeyboardComponent::horizontalKeyboard));\r
- addAndMakeVisible (statusBar = new TooltipBar());\r
+ keyboardComp.reset (new MidiKeyboardComponent (keyState, MidiKeyboardComponent::horizontalKeyboard));\r
+ addAndMakeVisible (keyboardComp.get());\r
+ statusBar.reset (new TooltipBar());\r
+ addAndMakeVisible (statusBar.get());\r
\r
graphPanel->updateComponents();\r
\r
if (isOnTouchDevice())\r
{\r
if (isOnTouchDevice())\r
- addAndMakeVisible (titleBarComponent = new TitleBarComponent (*this));\r
+ {\r
+ titleBarComponent.reset (new TitleBarComponent (*this));\r
+ addAndMakeVisible (titleBarComponent.get());\r
+ }\r
\r
- pluginListBoxModel = new PluginListBoxModel (pluginListBox, pluginList);\r
+ pluginListBoxModel.reset (new PluginListBoxModel (pluginListBox, pluginList));\r
\r
- pluginListBox.setModel (pluginListBoxModel);\r
+ pluginListBox.setModel (pluginListBoxModel.get());\r
pluginListBox.setRowHeight (40);\r
\r
pluginListSidePanel.setContent (&pluginListBox, false);\r
\r
if (graphPanel != nullptr)\r
{\r
- deviceManager.removeChangeListener (graphPanel);\r
+ deviceManager.removeChangeListener (graphPanel.get());\r
graphPanel = nullptr;\r
}\r
\r
\r
OwnedArray<FilterComponent> nodes;\r
OwnedArray<ConnectorComponent> connectors;\r
- ScopedPointer<ConnectorComponent> draggingConnector;\r
- ScopedPointer<PopupMenu> menu;\r
+ std::unique_ptr<ConnectorComponent> draggingConnector;\r
+ std::unique_ptr<PopupMenu> menu;\r
\r
FilterComponent* getComponentForFilter (AudioProcessorGraph::NodeID) const;\r
ConnectorComponent* getComponentForConnection (const AudioProcessorGraph::Connection&) const;\r
bool closeAnyOpenPluginWindows();\r
\r
//==============================================================================\r
- ScopedPointer<FilterGraph> graph;\r
+ std::unique_ptr<FilterGraph> graph;\r
\r
void resized() override;\r
void unfocusKeyboardComponent();\r
void itemDropped (const SourceDetails&) override;\r
\r
//==============================================================================\r
- ScopedPointer<GraphEditorPanel> graphPanel;\r
- ScopedPointer<MidiKeyboardComponent> keyboardComp;\r
+ std::unique_ptr<GraphEditorPanel> graphPanel;\r
+ std::unique_ptr<MidiKeyboardComponent> keyboardComp;\r
\r
//==============================================================================\r
void showSidePanel (bool isSettingsPanel);\r
MidiKeyboardState keyState;\r
\r
struct TooltipBar;\r
- ScopedPointer<TooltipBar> statusBar;\r
+ std::unique_ptr<TooltipBar> statusBar;\r
\r
class TitleBarComponent;\r
- ScopedPointer<TitleBarComponent> titleBarComponent;\r
+ std::unique_ptr<TitleBarComponent> titleBarComponent;\r
\r
//==============================================================================\r
struct PluginListBoxModel;\r
- ScopedPointer<PluginListBoxModel> pluginListBoxModel;\r
+ std::unique_ptr<PluginListBoxModel> pluginListBoxModel;\r
\r
ListBox pluginListBox;\r
\r
RuntimePermissions::request (RuntimePermissions::recordAudio,\r
[safeThis = SafePointer<MainHostWindow> (this)] (bool granted) mutable\r
{\r
- ScopedPointer<XmlElement> savedAudioState (getAppProperties().getUserSettings()\r
- ->getXmlValue ("audioDeviceState"));\r
+ std::unique_ptr<XmlElement> savedAudioState (getAppProperties().getUserSettings()\r
+ ->getXmlValue ("audioDeviceState"));\r
\r
- safeThis->deviceManager.initialise (granted ? 256 : 0, 256, savedAudioState, true);\r
+ safeThis->deviceManager.initialise (granted ? 256 : 0, 256, savedAudioState.get(), true);\r
});\r
\r
#if JUCE_IOS || JUCE_ANDROID\r
centreWithSize (800, 600);\r
#endif\r
\r
- graphHolder = new GraphDocumentComponent (formatManager, deviceManager, knownPluginList);\r
+ graphHolder.reset (new GraphDocumentComponent (formatManager, deviceManager, knownPluginList));\r
\r
- setContentNonOwned (graphHolder, false);\r
+ setContentNonOwned (graphHolder.get(), false);\r
\r
restoreWindowStateFromString (getAppProperties().getUserSettings()->getValue ("mainWindowPos"));\r
\r
InternalPluginFormat internalFormat;\r
internalFormat.getAllTypes (internalTypes);\r
\r
- ScopedPointer<XmlElement> savedPluginList (getAppProperties().getUserSettings()->getXmlValue ("pluginList"));\r
+ std::unique_ptr<XmlElement> savedPluginList (getAppProperties().getUserSettings()->getXmlValue ("pluginList"));\r
\r
if (savedPluginList != nullptr)\r
knownPluginList.recreateFromXml (*savedPluginList);\r
\r
// save the plugin list every time it gets changed, so that if we're scanning\r
// and it crashes, we've still saved the previous ones\r
- ScopedPointer<XmlElement> savedPluginList (knownPluginList.createXml());\r
+ std::unique_ptr<XmlElement> savedPluginList (knownPluginList.createXml());\r
\r
if (savedPluginList != nullptr)\r
{\r
- getAppProperties().getUserSettings()->setValue ("pluginList", savedPluginList);\r
+ getAppProperties().getUserSettings()->setValue ("pluginList", savedPluginList.get());\r
getAppProperties().saveIfNeeded();\r
}\r
}\r
- else if (graphHolder != nullptr && changed == graphHolder->graph)\r
+ else if (graphHolder != nullptr && changed == graphHolder->graph.get())\r
{\r
auto title = JUCEApplication::getInstance()->getApplicationName();\r
auto f = graphHolder->graph->getFile();\r
\r
case CommandIDs::showPluginListEditor:\r
if (pluginListWindow == nullptr)\r
- pluginListWindow = new PluginListWindow (*this, formatManager);\r
+ pluginListWindow.reset (new PluginListWindow (*this, formatManager));\r
\r
pluginListWindow->toFront (true);\r
break;\r
ModalCallbackFunction::create\r
([safeThis = SafePointer<MainHostWindow> (this)] (int)\r
{\r
- ScopedPointer<XmlElement> audioState (safeThis->deviceManager.createStateXml());\r
+ std::unique_ptr<XmlElement> audioState (safeThis->deviceManager.createStateXml());\r
\r
- getAppProperties().getUserSettings()->setValue ("audioDeviceState", audioState);\r
+ getAppProperties().getUserSettings()->setValue ("audioDeviceState", audioState.get());\r
getAppProperties().getUserSettings()->saveIfNeeded();\r
\r
if (safeThis->graphHolder != nullptr)\r
bool isDoublePrecisionProcessing();\r
void updatePrecisionMenuItem (ApplicationCommandInfo& info);\r
\r
- ScopedPointer<GraphDocumentComponent> graphHolder;\r
+ std::unique_ptr<GraphDocumentComponent> graphHolder;\r
\r
private:\r
//==============================================================================\r
KnownPluginList::SortMethod pluginSortMethod;\r
\r
class PluginListWindow;\r
- ScopedPointer<PluginListWindow> pluginListWindow;\r
+ std::unique_ptr<PluginListWindow> pluginListWindow;\r
\r
void showAudioSettings();\r
\r
<MODULES>\r
<MODULE id="juce_core" showAllCode="1"/>\r
</MODULES>\r
+ <LIVE_SETTINGS>\r
+ <OSX/>\r
+ </LIVE_SETTINGS>\r
</JUCERPROJECT>\r
70A875922C34E55D4F48A196, ); name = Source; sourceTree = "<group>"; };
00F18709927DE6070FBA7BD0 = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
USE_HEADERMAP = NO; }; name = Debug; };
8A190EF24B99F557190320DA = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
4F5C64675AD3AC67829798FF,
A69CF4AD8F7015A8D3228FDE,
2722C90F3B5DAD661891FDF4, ); buildRules = ( ); dependencies = ( ); name = "BinaryBuilder - ConsoleApp"; productName = BinaryBuilder; productReference = 799073185F72F5FAD05253C3; productType = "com.apple.product-type.tool"; };
- 36B6F402BC83F21646259DEF = {isa = PBXProject; buildConfigurationList = E4C85B0464A93027D035AA1F; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = C18D022743CF5BD14D6A6A9E; projectDirPath = ""; projectRoot = ""; targets = (80B70DE094998C267F152DD5); };
+ 36B6F402BC83F21646259DEF = {isa = PBXProject; buildConfigurationList = E4C85B0464A93027D035AA1F; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = C18D022743CF5BD14D6A6A9E; projectDirPath = ""; projectRoot = ""; targets = (80B70DE094998C267F152DD5); };
};
rootObject = 36B6F402BC83F21646259DEF;
}
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
cppStream << "const char* " << classname << "::" << name\r
<< " = (const char*) temp" << tempNum << ";\r\n\r\n";\r
\r
- return mb.getSize();\r
+ return (int) mb.getSize();\r
}\r
\r
static bool isHiddenFile (const File& f, const File& root)\r
headerFile.deleteFile();\r
cppFile.deleteFile();\r
\r
- ScopedPointer<OutputStream> header (headerFile.createOutputStream());\r
+ std::unique_ptr<OutputStream> header (headerFile.createOutputStream());\r
\r
if (header == nullptr)\r
{\r
return 0;\r
}\r
\r
- ScopedPointer<OutputStream> cpp (cppFile.createOutputStream());\r
+ std::unique_ptr<OutputStream> cpp (cppFile.createOutputStream());\r
\r
if (cpp == nullptr)\r
{\r
"../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h"\r
"../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h"\r
"../../../../../modules/juce_core/containers/juce_SortedSet.h"\r
+ "../../../../../modules/juce_core/containers/juce_SparseSet.cpp"\r
"../../../../../modules/juce_core/containers/juce_SparseSet.h"\r
"../../../../../modules/juce_core/containers/juce_Variant.cpp"\r
"../../../../../modules/juce_core/containers/juce_Variant.h"\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_ReferenceCountedArray.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_ScopedValueSetter.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_SortedSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
+set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_SparseSet.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)\r
set_source_files_properties("../../../../../modules/juce_core/containers/juce_Variant.h" PROPERTIES HEADER_FILE_ONLY TRUE)\r
private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+ private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
\r
private static String getAndroidPermissionName (int permissionID)\r
{\r
// use string value as this is not defined in SDKs < 16\r
case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE";\r
case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+ case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA;\r
}\r
\r
// unknown permission ID!\r
setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
\r
permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+ appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
}\r
\r
@Override\r
{\r
suspendApp();\r
\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appPaused();\r
+\r
try\r
{\r
Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
super.onResume();\r
resumeApp();\r
\r
- // Ensure that navigation/status bar visibility is correctly restored.\r
- for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
- {\r
- if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
- ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
- }\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appResumed();\r
}\r
\r
@Override\r
{\r
ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
viewHolder.addView (v);\r
+ addAppPausedResumedListener (v, host);\r
return v;\r
}\r
\r
public final void deleteView (ComponentPeerView view)\r
{\r
+ removeAppPausedResumedListener (view, view.host);\r
+\r
view.host = 0;\r
\r
ViewGroup group = (ViewGroup) (view.getParent());\r
\r
public native void alertDismissed (long callback, int id);\r
\r
+ //==============================================================================\r
+ public interface AppPausedResumedListener\r
+ {\r
+ void appPaused();\r
+ void appResumed();\r
+ }\r
+\r
+ private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+ public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.put (new Long (listenerHost), l);\r
+ }\r
+\r
+ public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.remove (new Long (listenerHost));\r
+ }\r
+\r
//==============================================================================\r
public final class ComponentPeerView extends ViewGroup\r
- implements View.OnFocusChangeListener\r
+ implements View.OnFocusChangeListener, AppPausedResumedListener\r
{\r
public ComponentPeerView (Context context, boolean opaque_, long host)\r
{\r
}\r
\r
//==============================================================================\r
+ private native void handleAppPaused (long host);\r
private native void handleAppResumed (long host);\r
\r
+ @Override\r
+ public void appPaused()\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ handleAppPaused (host);\r
+ }\r
+\r
+ @Override\r
public void appResumed()\r
{\r
if (host == 0)\r
return;\r
\r
+ // Ensure that navigation/status bar visibility is correctly restored.\r
handleAppResumed (host);\r
}\r
}\r
private final Object hostLock = new Object();\r
}\r
\r
+\r
//==============================================================================\r
public static final String getLocaleValue (boolean isRegion)\r
{\r
8B59A884C62D960EE9DFEF47, ); name = Source; sourceTree = "<group>"; };
EE7498599191DDC73ECB55B0 = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
USE_HEADERMAP = NO; }; name = Debug; };
2E06386CE7CCA5FF76819BFF = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
714944DB86A4D402E7FA269E,
C2977559BF9148DB70CA10AE,
865E89B94B41EB14C202CBB0, ); buildRules = ( ); dependencies = ( ); name = "NetworkGraphicsDemo - App"; productName = NetworkGraphicsDemo; productReference = E4162459ED4C829EF7B19691; productType = "com.apple.product-type.application"; };
- A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); };
+ A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); };
};
rootObject = A5398ADB6F5B128C00EB935C;
}
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
714944DB86A4D402E7FA269E,
C2977559BF9148DB70CA10AE,
865E89B94B41EB14C202CBB0, ); buildRules = ( ); dependencies = ( ); name = "NetworkGraphicsDemo - App"; productName = NetworkGraphicsDemo; productReference = E4162459ED4C829EF7B19691; productType = "com.apple.product-type.application"; };
- A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); };
+ A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); };
};
rootObject = A5398ADB6F5B128C00EB935C;
}
//#define JUCE_PLUGINHOST_AU 0\r
#endif\r
\r
+#ifndef JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
//==============================================================================\r
// juce_audio_utils flags:\r
\r
const char* juce_icon_png = (const char*) temp_binary_data_0;\r
\r
\r
-const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept\r
+const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)\r
{\r
unsigned int hash = 0;\r
if (resourceNameUTF8 != 0)\r
"juce_icon.png"\r
};\r
\r
-const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept\r
+const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)\r
{\r
for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)\r
{\r
\r
// If you provide the name of one of the binary resource variables above, this function will\r
// return the corresponding data and its size (or a null pointer if the name isn't found).\r
- const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept;\r
+ const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);\r
\r
// If you provide the name of one of the binary resource variables above, this function will\r
// return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).\r
- const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept;\r
+ const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);\r
}\r
<MODULE id="juce_osc" showAllCode="1" useLocalCopy="0"/>\r
</MODULES>\r
<JUCEOPTIONS/>\r
+ <LIVE_SETTINGS>\r
+ <OSX/>\r
+ </LIVE_SETTINGS>\r
</JUCERPROJECT>\r
</svg>\r
)blahblah";\r
\r
- ScopedPointer<XmlElement> svg (XmlDocument::parse (logoData));\r
- logo = Drawable::createFromSVG (*svg);\r
+ std::unique_ptr<XmlElement> svg (XmlDocument::parse (logoData));\r
+ logo.reset (Drawable::createFromSVG (*svg));\r
}\r
\r
String getName() const override { return "Background Image"; }\r
logo->drawWithin (g, canvas.getLimits().reduced (3.0f), RectanglePlacement (RectanglePlacement::centred), 0.6f);\r
}\r
\r
- ScopedPointer<Drawable> logo;\r
+ std::unique_ptr<Drawable> logo;\r
};\r
\r
//==============================================================================\r
{\r
Bird()\r
{\r
- Random rng;\r
- pos.x = rng.nextFloat() * 10.0f - 5.0f;\r
- pos.y = rng.nextFloat() * 10.0f - 5.0f;\r
- velocity.x = rng.nextFloat() * 0.001f;\r
- velocity.y = rng.nextFloat() * 0.001f;\r
+ Random randGen;\r
+ pos.x = randGen.nextFloat() * 10.0f - 5.0f;\r
+ pos.y = randGen.nextFloat() * 10.0f - 5.0f;\r
+ velocity.x = randGen.nextFloat() * 0.001f;\r
+ velocity.y = randGen.nextFloat() * 0.001f;\r
\r
- colour = Colour::fromHSV (rng.nextFloat(), 0.2f, 0.9f, rng.nextFloat() * 0.4f + 0.2f);\r
+ colour = Colour::fromHSV (randGen.nextFloat(), 0.2f, 0.9f, randGen.nextFloat() * 0.4f + 0.2f);\r
\r
shape.addTriangle (0.0f, 0.0f, -0.3f, 1.0f, 0.3f, 1.0f);\r
shape = shape.createPathWithRoundedCorners (0.2f);\r
\r
- shape.applyTransform (AffineTransform::scale (rng.nextFloat() + 1.0f));\r
+ shape.applyTransform (AffineTransform::scale (randGen.nextFloat() + 1.0f));\r
}\r
\r
Point<float> pos, velocity, acc;\r
as.append (text, Font (textSize * scale), Colour (0x80ffffff).withMultipliedAlpha (alpha));\r
\r
as.setJustification (Justification::centred);\r
- auto centre = canvas.clients[clientIndex % canvas.clients.size()].centre * scale;\r
- as.draw (g, Rectangle<float> (textBlockWidth * scale, textBlockWidth * scale).withCentre (centre));\r
+ auto middle = canvas.clients[clientIndex % canvas.clients.size()].centre * scale;\r
+ as.draw (g, Rectangle<float> (textBlockWidth * scale, textBlockWidth * scale).withCentre (middle));\r
}\r
\r
void tick()\r
createAllDemos (demos);\r
setContent (0);\r
\r
- setSize (15.0f * currentCanvas.getLimits().getWidth(),\r
- 15.0f * currentCanvas.getLimits().getHeight());\r
+ setSize ((int) (15.0f * currentCanvas.getLimits().getWidth()),\r
+ (int) (15.0f * currentCanvas.getLimits().getHeight()));\r
\r
if (! OSCSender::connect (getBroadcastIPAddress(), masterPortNumber))\r
error = "Master app OSC sender: network connection error.";\r
updateCanvasInfo (currentCanvas);\r
\r
{\r
- ScopedPointer<CanvasGeneratingContext> context (new CanvasGeneratingContext (currentCanvas));\r
+ std::unique_ptr<CanvasGeneratingContext> context (new CanvasGeneratingContext (currentCanvas));\r
Graphics g (*context);\r
\r
if (content != nullptr)\r
TARGET_ARCH := -march=native\r
endif\r
\r
- JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.1 -DJUCE_APP_VERSION_HEX=0x50301 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
+ JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.2 -DJUCE_APP_VERSION_HEX=0x50302 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
JUCE_TARGET_APP := Projucer\r
\r
TARGET_ARCH := -march=native\r
endif\r
\r
- JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.1 -DJUCE_APP_VERSION_HEX=0x50301 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
+ JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.3.2 -DJUCE_APP_VERSION_HEX=0x50302 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)\r
JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
JUCE_TARGET_APP := Projucer\r
\r
<key>CFBundleSignature</key>\r
<string>????</string>\r
<key>CFBundleShortVersionString</key>\r
- <string>5.3.1</string>\r
+ <string>5.3.2</string>\r
<key>CFBundleVersion</key>\r
- <string>5.3.1</string>\r
+ <string>5.3.2</string>\r
<key>NSHumanReadableCopyright</key>\r
<string>ROLI Ltd.</string>\r
<key>NSHighResolutionCapable</key>\r
"_DEBUG=1",
"DEBUG=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
- "JUCE_APP_VERSION=5.3.1",
- "JUCE_APP_VERSION_HEX=0x50301",
+ "JUCE_APP_VERSION=5.3.2",
+ "JUCE_APP_VERSION_HEX=0x50302",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
"_NDEBUG=1",
"NDEBUG=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
- "JUCE_APP_VERSION=5.3.1",
- "JUCE_APP_VERSION_HEX=0x50301",
+ "JUCE_APP_VERSION=5.3.2",
+ "JUCE_APP_VERSION_HEX=0x50302",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
C262D0F297DDE25326F5AC81,
5CB869A8DA78BE6FA2757034,
D150288A32EE596408C2B99F, ); buildRules = ( ); dependencies = ( ); name = "Projucer - App"; productName = Projucer; productReference = 09DE066936CF037E9709ADB1; productType = "com.apple.product-type.application"; };
- 74EA481348A24104E6ACE009 = {isa = PBXProject; buildConfigurationList = F90407F24422C589DA251604; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { 0039FE1A254FE518518BF8B8 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3CC531922CC2D398E283A845; projectDirPath = ""; projectRoot = ""; targets = (0039FE1A254FE518518BF8B8); };
+ 74EA481348A24104E6ACE009 = {isa = PBXProject; buildConfigurationList = F90407F24422C589DA251604; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { 0039FE1A254FE518518BF8B8 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3CC531922CC2D398E283A845; projectDirPath = ""; projectRoot = ""; targets = (0039FE1A254FE518518BF8B8); };
};
rootObject = 74EA481348A24104E6ACE009;
}
<Optimization>Disabled</Optimization>\r
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile>\r
<Optimization>Full</Optimization>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
#include <windows.h>\r
\r
VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION 5,3,1,0\r
+FILEVERSION 5,3,2,0\r
BEGIN\r
BLOCK "StringFileInfo"\r
BEGIN\r
VALUE "CompanyName", "ROLI Ltd.\0"\r
VALUE "LegalCopyright", "ROLI Ltd.\0"\r
VALUE "FileDescription", "Projucer\0"\r
- VALUE "FileVersion", "5.3.1\0"\r
+ VALUE "FileVersion", "5.3.2\0"\r
VALUE "ProductName", "Projucer\0"\r
- VALUE "ProductVersion", "5.3.1\0"\r
+ VALUE "ProductVersion", "5.3.2\0"\r
END\r
END\r
\r
<Optimization>Disabled</Optimization>\r
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile>\r
<Optimization>Full</Optimization>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
#include <windows.h>\r
\r
VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION 5,3,1,0\r
+FILEVERSION 5,3,2,0\r
BEGIN\r
BLOCK "StringFileInfo"\r
BEGIN\r
VALUE "CompanyName", "ROLI Ltd.\0"\r
VALUE "LegalCopyright", "ROLI Ltd.\0"\r
VALUE "FileDescription", "Projucer\0"\r
- VALUE "FileVersion", "5.3.1\0"\r
+ VALUE "FileVersion", "5.3.2\0"\r
VALUE "ProductName", "Projucer\0"\r
- VALUE "ProductVersion", "5.3.1\0"\r
+ VALUE "ProductVersion", "5.3.2\0"\r
END\r
END\r
\r
<Optimization>Disabled</Optimization>\r
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile>\r
<Optimization>Full</Optimization>\r
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.1;JUCE_APP_VERSION_HEX=0x50301;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.3.2;JUCE_APP_VERSION_HEX=0x50302;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
<RuntimeTypeInfo>true</RuntimeTypeInfo>\r
<PrecompiledHeader/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
#include <windows.h>\r
\r
VS_VERSION_INFO VERSIONINFO\r
-FILEVERSION 5,3,1,0\r
+FILEVERSION 5,3,2,0\r
BEGIN\r
BLOCK "StringFileInfo"\r
BEGIN\r
VALUE "CompanyName", "ROLI Ltd.\0"\r
VALUE "LegalCopyright", "ROLI Ltd.\0"\r
VALUE "FileDescription", "Projucer\0"\r
- VALUE "FileVersion", "5.3.1\0"\r
+ VALUE "FileVersion", "5.3.2\0"\r
VALUE "ProductName", "Projucer\0"\r
- VALUE "ProductVersion", "5.3.1\0"\r
+ VALUE "ProductVersion", "5.3.2\0"\r
END\r
END\r
\r
" {\r\n"\r
" // This method is where you should put your application's initialisation code..\r\n"\r
"\r\n"\r
-" mainWindow = new MainWindow (getApplicationName());\r\n"\r
+" mainWindow.reset (new MainWindow (getApplicationName()));\r\n"\r
" }\r\n"\r
"\r\n"\r
" void shutdown() override\r\n"\r
" };\r\n"\r
"\r\n"\r
"private:\r\n"\r
-" ScopedPointer<MainWindow> mainWindow;\r\n"\r
+" std::unique_ptr<MainWindow> mainWindow;\r\n"\r
"};\r\n"\r
"\r\n"\r
"//==============================================================================\r\n"\r
" {\r\n"\r
" // This method is where you should put your application's initialisation code..\r\n"\r
"\r\n"\r
-" mainWindow = new MainWindow (getApplicationName());\r\n"\r
+" mainWindow.reset (new MainWindow (getApplicationName()));\r\n"\r
" }\r\n"\r
"\r\n"\r
" void shutdown() override\r\n"\r
" };\r\n"\r
"\r\n"\r
"private:\r\n"\r
-" ScopedPointer<MainWindow> mainWindow;\r\n"\r
+" std::unique_ptr<MainWindow> mainWindow;\r\n"\r
"};\r\n"\r
"\r\n"\r
"//==============================================================================\r\n"\r
" //==============================================================================\r\n"\r
" JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)\r\n"\r
" };\r\n"\r
-" ScopedPointer<MainWindow> mainWindow;\r\n"\r
+"\r\n"\r
+" std::unique_ptr<MainWindow> mainWindow;\r\n"\r
"};\r\n"\r
"\r\n"\r
"//==============================================================================\r\n"\r
const char* RecentFilesMenuTemplate_nib = (const char*) temp_binary_data_60;\r
\r
\r
-const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept\r
+const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)\r
{\r
unsigned int hash = 0;\r
if (resourceNameUTF8 != 0)\r
case 0x28d496ad: numBytes = 1233; return jucer_InlineComponentTemplate_h;\r
case 0x8905395b: numBytes = 473; return jucer_MainConsoleAppTemplate_cpp;\r
case 0x5e5ea047: numBytes = 2021; return jucer_MainTemplate_NoWindow_cpp;\r
- case 0xda2391f8: numBytes = 4004; return jucer_MainTemplate_SimpleWindow_cpp;\r
- case 0x400bc026: numBytes = 3964; return jucer_MainTemplate_Window_cpp;\r
+ case 0xda2391f8: numBytes = 4012; return jucer_MainTemplate_SimpleWindow_cpp;\r
+ case 0x400bc026: numBytes = 3972; return jucer_MainTemplate_Window_cpp;\r
case 0xf4842835: numBytes = 1491; return jucer_NewComponentTemplate_cpp;\r
case 0xe7bf237a: numBytes = 646; return jucer_NewComponentTemplate_h;\r
case 0x02a2a077: numBytes = 278; return jucer_NewCppFileTemplate_cpp;\r
case 0x7fbac252: numBytes = 1665; return jucer_OpenGLComponentTemplate_cpp;\r
case 0x491fa0d7: numBytes = 1263; return jucer_OpenGLComponentTemplate_h;\r
case 0xbc050edc: numBytes = 4926; return jucer_PIPAudioProcessorTemplate_h;\r
- case 0xf4ca9e9a: numBytes = 2443; return jucer_PIPMain_cpp;\r
+ case 0xf4ca9e9a: numBytes = 2447; return jucer_PIPMain_cpp;\r
case 0x0b16e320: numBytes = 517; return jucer_PIPTemplate_h;\r
case 0x763d39dc: numBytes = 1050; return colourscheme_dark_xml;\r
case 0xe8b08520: numBytes = 1050; return colourscheme_light_xml;\r
"RecentFilesMenuTemplate.nib"\r
};\r
\r
-const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept\r
+const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)\r
{\r
for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)\r
{\r
const int jucer_MainTemplate_NoWindow_cppSize = 2021;\r
\r
extern const char* jucer_MainTemplate_SimpleWindow_cpp;\r
- const int jucer_MainTemplate_SimpleWindow_cppSize = 4004;\r
+ const int jucer_MainTemplate_SimpleWindow_cppSize = 4012;\r
\r
extern const char* jucer_MainTemplate_Window_cpp;\r
- const int jucer_MainTemplate_Window_cppSize = 3964;\r
+ const int jucer_MainTemplate_Window_cppSize = 3972;\r
\r
extern const char* jucer_NewComponentTemplate_cpp;\r
const int jucer_NewComponentTemplate_cppSize = 1491;\r
const int jucer_PIPAudioProcessorTemplate_hSize = 4926;\r
\r
extern const char* jucer_PIPMain_cpp;\r
- const int jucer_PIPMain_cppSize = 2443;\r
+ const int jucer_PIPMain_cppSize = 2447;\r
\r
extern const char* jucer_PIPTemplate_h;\r
const int jucer_PIPTemplate_hSize = 517;\r
\r
// If you provide the name of one of the binary resource variables above, this function will\r
// return the corresponding data and its size (or a null pointer if the name isn't found).\r
- const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept;\r
+ const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);\r
\r
// If you provide the name of one of the binary resource variables above, this function will\r
// return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).\r
- const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept;\r
+ const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);\r
}\r
namespace ProjectInfo\r
{\r
const char* const projectName = "Projucer";\r
- const char* const versionString = "5.3.1";\r
- const int versionNumber = 0x50301;\r
+ const char* const versionString = "5.3.2";\r
+ const int versionNumber = 0x50302;\r
}\r
#endif\r
<?xml version="1.0" encoding="UTF-8"?>\r
\r
<JUCERPROJECT id="M70qfTRRk" name="Projucer" projectType="guiapp" juceFolder="../../juce"\r
- jucerVersion="5.3.1" version="5.3.1" bundleIdentifier="com.juce.theprojucer"\r
+ jucerVersion="5.3.1" version="5.3.2" bundleIdentifier="com.juce.theprojucer"\r
defines="" splashScreenColour="Dark" displaySplashScreen="0"\r
reportAppUsage="0" companyName="ROLI Ltd." companyCopyright="ROLI Ltd."\r
cppLanguageStandard="11">\r
\r
Rectangle<float> huckleberryLogoBounds, juceLogoBounds;\r
\r
- ScopedPointer<Drawable> juceLogo { Drawable::createFromImageData (BinaryData::juce_icon_png,\r
- BinaryData::juce_icon_pngSize) };\r
+ std::unique_ptr<Drawable> juceLogo { Drawable::createFromImageData (BinaryData::juce_icon_png,\r
+ BinaryData::juce_icon_pngSize) };\r
\r
- ScopedPointer<Drawable> huckleberryLogo { Drawable::createFromImageData (BinaryData::huckleberry_icon_svg,\r
- BinaryData::huckleberry_icon_svgSize) };\r
+ std::unique_ptr<Drawable> huckleberryLogo { Drawable::createFromImageData (BinaryData::huckleberry_icon_svg,\r
+ BinaryData::huckleberry_icon_svgSize) };\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AboutWindowComponent)\r
};\r
\r
if (showCheckbox)\r
{\r
- addAndMakeVisible (shareApplicationUsageDataToggle = new ToggleButton());\r
+ shareApplicationUsageDataToggle.reset (new ToggleButton());\r
+ addAndMakeVisible (shareApplicationUsageDataToggle.get());\r
\r
auto* controller = ProjucerApplication::getApp().licenseController.get();\r
\r
Label headerLabel, bodyLabel;\r
HyperlinkButton juceEULALink, privacyPolicyLink;\r
Label shareApplicationUsageDataLabel { {}, "Help JUCE to improve its software and services by sharing my application usage data" };\r
- ScopedPointer<ToggleButton> shareApplicationUsageDataToggle;\r
+ std::unique_ptr<ToggleButton> shareApplicationUsageDataToggle;\r
TextButton okButton { "OK" }, upgradeLicenseButton { "Upgrade License" };\r
\r
void lookAndFeelChanged() override\r
}\r
\r
private:\r
- ScopedPointer<Component> content;\r
+ std::unique_ptr<Component> content;\r
\r
//==============================================================================\r
struct AppearanceEditor\r
FloatingToolWindow (const String& title,\r
const String& windowPosPropertyName,\r
Component* content,\r
- ScopedPointer<Component>& ownerPointer,\r
+ std::unique_ptr<Component>& ownerPointer,\r
bool shouldBeResizable,\r
int defaultW, int defaultH,\r
int minW, int minH,\r
\r
private:\r
String windowPosProperty;\r
- ScopedPointer<Component>& owner;\r
+ std::unique_ptr<Component>& owner;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FloatingToolWindow)\r
};\r
public:\r
PIPCreatorWindowComponent()\r
{\r
- setLookAndFeel (lf = new PIPCreatorLookAndFeel());\r
+ lf.reset (new PIPCreatorLookAndFeel());\r
+ setLookAndFeel (lf.get());\r
\r
addAndMakeVisible (propertyViewport);\r
propertyViewport.setViewedComponent (&propertyGroup, false);\r
}\r
\r
//==============================================================================\r
- ScopedPointer<LookAndFeel> lf;\r
+ std::unique_ptr<LookAndFeel> lf;\r
\r
Viewport propertyViewport;\r
PropertyGroupComponent propertyGroup { "PIP Creator", { getIcons().juceLogo, Colours::transparentBlack } };\r
dragOver = false;\r
repaint();\r
\r
- if (ScopedPointer<XmlElement> e = XmlDocument::parse (File (files[0])))\r
+ std::unique_ptr<XmlElement> element (XmlDocument::parse (File (files[0])));\r
+\r
+ if (element != nullptr)\r
{\r
- if (auto* ePath = e->getChildByName ("path"))\r
+ if (auto* ePath = element->getChildByName ("path"))\r
userText.setText (ePath->getStringAttribute ("d"), true);\r
- else if (auto* ePolygon = e->getChildByName ("polygon"))\r
+ else if (auto* ePolygon = element->getChildByName ("polygon"))\r
userText.setText (ePolygon->getStringAttribute ("points"), true);\r
}\r
}\r
\r
isRunningCommandLine = commandLine.isNotEmpty();\r
\r
- licenseController = new LicenseController;\r
+ licenseController.reset (new LicenseController);\r
licenseController->addLicenseStatusChangedCallback (this);\r
\r
if (isRunningCommandLine)\r
\r
openDocumentManager.registerType (new ProjucerAppClasses::LiveBuildCodeEditorDocument::Type(), 2);\r
\r
- childProcessCache = new ChildProcessCache();\r
+ childProcessCache.reset (new ChildProcessCache());\r
\r
initCommandManager();\r
- menuModel = new MainMenuModel();\r
+ menuModel.reset (new MainMenuModel());\r
\r
settings->appearance.refreshPresetSchemeList();\r
\r
{\r
LookAndFeel::setDefaultLookAndFeel (&lookAndFeel);\r
\r
- settings = new StoredSettings();\r
+ settings.reset (new StoredSettings());\r
ImageCache::setCacheTimeout (30 * 1000);\r
- icons = new Icons();\r
+ icons.reset (new Icons());\r
tooltipWindow.setMillisecondsBeforeTipAppears (1200);\r
}\r
\r
String folder = "com.juce.projucer";\r
#endif\r
\r
- logger = FileLogger::createDateStampedLogger (folder, filePrefix, ".txt",\r
- getApplicationName() + " " + getApplicationVersion()\r
- + " --- Build date: " __DATE__);\r
- Logger::setCurrentLogger (logger);\r
+ logger.reset (FileLogger::createDateStampedLogger (folder, filePrefix, ".txt",\r
+ getApplicationName() + " " + getApplicationVersion()\r
+ + " --- Build date: " __DATE__));\r
+ Logger::setCurrentLogger (logger.get());\r
}\r
\r
return logger != nullptr;\r
\r
// workaround broken "Open Recent" submenu: not passing the\r
// submenu's title here avoids the defect in JuceMainMenuHandler::addMenuItem\r
- MenuBarModel::setMacMainMenu (menuModel, &extraAppleMenuItems); //, "Open Recent");\r
+ MenuBarModel::setMacMainMenu (menuModel.get(), &extraAppleMenuItems); //, "Open Recent");\r
#endif\r
\r
- versionChecker = new LatestVersionChecker();\r
+ versionChecker.reset (new LatestVersionChecker());\r
\r
if (licenseController != nullptr)\r
{\r
\r
ApplicationCommandManager& ProjucerApplication::getCommandManager()\r
{\r
- ApplicationCommandManager* cm = ProjucerApplication::getApp().commandManager;\r
+ auto* cm = ProjucerApplication::getApp().commandManager.get();\r
jassert (cm != nullptr);\r
return *cm;\r
}\r
\r
void ProjucerApplication::createFileMenu (PopupMenu& menu)\r
{\r
- menu.addCommandItem (commandManager, CommandIDs::newProject);\r
- menu.addCommandItem (commandManager, CommandIDs::newProjectFromClipboard);\r
- menu.addCommandItem (commandManager, CommandIDs::newPIP);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::newProject);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::newProjectFromClipboard);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::newPIP);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::open);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::open);\r
\r
{\r
PopupMenu recentFiles;\r
if (recentFiles.getNumItems() > 0)\r
{\r
recentFiles.addSeparator();\r
- recentFiles.addCommandItem (commandManager, CommandIDs::clearRecentFiles);\r
+ recentFiles.addCommandItem (commandManager.get(), CommandIDs::clearRecentFiles);\r
}\r
\r
menu.addSubMenu ("Open Recent", recentFiles);\r
}\r
\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::closeDocument);\r
- menu.addCommandItem (commandManager, CommandIDs::saveDocument);\r
- menu.addCommandItem (commandManager, CommandIDs::saveDocumentAs);\r
- menu.addCommandItem (commandManager, CommandIDs::saveAll);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::closeDocument);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::saveDocument);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::saveDocumentAs);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::saveAll);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::closeProject);\r
- menu.addCommandItem (commandManager, CommandIDs::saveProject);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::closeProject);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::saveProject);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::openInIDE);\r
- menu.addCommandItem (commandManager, CommandIDs::saveAndOpenInIDE);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::openInIDE);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::saveAndOpenInIDE);\r
menu.addSeparator();\r
\r
#if ! JUCER_ENABLE_GPL_MODE\r
- menu.addCommandItem (commandManager, CommandIDs::loginLogout);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::loginLogout);\r
#endif\r
\r
#if ! JUCE_MAC\r
- menu.addCommandItem (commandManager, CommandIDs::showAboutWindow);\r
- menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow);\r
- menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showAboutWindow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showAppUsageWindow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showGlobalPathsWindow);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, StandardApplicationCommandIDs::quit);\r
+ menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::quit);\r
#endif\r
}\r
\r
void ProjucerApplication::createEditMenu (PopupMenu& menu)\r
{\r
- menu.addCommandItem (commandManager, StandardApplicationCommandIDs::undo);\r
- menu.addCommandItem (commandManager, StandardApplicationCommandIDs::redo);\r
+ menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::undo);\r
+ menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::redo);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, StandardApplicationCommandIDs::cut);\r
- menu.addCommandItem (commandManager, StandardApplicationCommandIDs::copy);\r
- menu.addCommandItem (commandManager, StandardApplicationCommandIDs::paste);\r
- menu.addCommandItem (commandManager, StandardApplicationCommandIDs::del);\r
- menu.addCommandItem (commandManager, StandardApplicationCommandIDs::selectAll);\r
- menu.addCommandItem (commandManager, StandardApplicationCommandIDs::deselectAll);\r
+ menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::cut);\r
+ menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::copy);\r
+ menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::paste);\r
+ menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::del);\r
+ menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::selectAll);\r
+ menu.addCommandItem (commandManager.get(), StandardApplicationCommandIDs::deselectAll);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::showFindPanel);\r
- menu.addCommandItem (commandManager, CommandIDs::findSelection);\r
- menu.addCommandItem (commandManager, CommandIDs::findNext);\r
- menu.addCommandItem (commandManager, CommandIDs::findPrevious);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showFindPanel);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::findSelection);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::findNext);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::findPrevious);\r
}\r
\r
void ProjucerApplication::createViewMenu (PopupMenu& menu)\r
{\r
- menu.addCommandItem (commandManager, CommandIDs::showProjectSettings);\r
- menu.addCommandItem (commandManager, CommandIDs::showProjectTab);\r
- menu.addCommandItem (commandManager, CommandIDs::showBuildTab);\r
- menu.addCommandItem (commandManager, CommandIDs::showFileExplorerPanel);\r
- menu.addCommandItem (commandManager, CommandIDs::showModulesPanel);\r
- menu.addCommandItem (commandManager, CommandIDs::showExportersPanel);\r
- menu.addCommandItem (commandManager, CommandIDs::showExporterSettings);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showProjectSettings);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showProjectTab);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showBuildTab);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showFileExplorerPanel);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showModulesPanel);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showExportersPanel);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showExporterSettings);\r
\r
menu.addSeparator();\r
createColourSchemeItems (menu);\r
\r
void ProjucerApplication::createBuildMenu (PopupMenu& menu)\r
{\r
- menu.addCommandItem (commandManager, CommandIDs::toggleBuildEnabled);\r
- menu.addCommandItem (commandManager, CommandIDs::buildNow);\r
- menu.addCommandItem (commandManager, CommandIDs::toggleContinuousBuild);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::toggleBuildEnabled);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::buildNow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::toggleContinuousBuild);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::launchApp);\r
- menu.addCommandItem (commandManager, CommandIDs::killApp);\r
- menu.addCommandItem (commandManager, CommandIDs::cleanAll);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::launchApp);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::killApp);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::cleanAll);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::reinstantiateComp);\r
- menu.addCommandItem (commandManager, CommandIDs::showWarnings);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::reinstantiateComp);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showWarnings);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::nextError);\r
- menu.addCommandItem (commandManager, CommandIDs::prevError);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::nextError);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::prevError);\r
}\r
\r
void ProjucerApplication::createColourSchemeItems (PopupMenu& menu)\r
\r
void ProjucerApplication::createWindowMenu (PopupMenu& menu)\r
{\r
- menu.addCommandItem (commandManager, CommandIDs::goToPreviousWindow);\r
- menu.addCommandItem (commandManager, CommandIDs::goToNextWindow);\r
- menu.addCommandItem (commandManager, CommandIDs::closeWindow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::goToPreviousWindow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::goToNextWindow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::closeWindow);\r
menu.addSeparator();\r
\r
int counter = 0;\r
}\r
\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::closeAllWindows);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::closeAllWindows);\r
}\r
\r
void ProjucerApplication::createDocumentMenu (PopupMenu& menu)\r
{\r
- menu.addCommandItem (commandManager, CommandIDs::goToPreviousDoc);\r
- menu.addCommandItem (commandManager, CommandIDs::goToNextDoc);\r
- menu.addCommandItem (commandManager, CommandIDs::goToCounterpart);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::goToPreviousDoc);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::goToNextDoc);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::goToCounterpart);\r
menu.addSeparator();\r
\r
auto numDocs = jmin (50, openDocumentManager.getNumOpenDocuments());\r
}\r
\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::closeAllDocuments);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::closeAllDocuments);\r
}\r
\r
void ProjucerApplication::createToolsMenu (PopupMenu& menu)\r
{\r
- menu.addCommandItem (commandManager, CommandIDs::showUTF8Tool);\r
- menu.addCommandItem (commandManager, CommandIDs::showSVGPathTool);\r
- menu.addCommandItem (commandManager, CommandIDs::showTranslationTool);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showUTF8Tool);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showSVGPathTool);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showTranslationTool);\r
}\r
\r
void ProjucerApplication::createHelpMenu (PopupMenu& menu)\r
{\r
- menu.addCommandItem (commandManager, CommandIDs::showForum);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showForum);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::showAPIModules);\r
- menu.addCommandItem (commandManager, CommandIDs::showAPIClasses);\r
- menu.addCommandItem (commandManager, CommandIDs::showTutorials);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showAPIModules);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showAPIClasses);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showTutorials);\r
}\r
\r
void ProjucerApplication::createExtraAppleMenuItems (PopupMenu& menu)\r
{\r
- menu.addCommandItem (commandManager, CommandIDs::showAboutWindow);\r
- menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showAboutWindow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showAppUsageWindow);\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::showGlobalPathsWindow);\r
}\r
\r
void ProjucerApplication::createExamplesPopupMenu (PopupMenu& menu) noexcept\r
else\r
{\r
menu.addSeparator();\r
- menu.addCommandItem (commandManager, CommandIDs::launchDemoRunner);\r
+ menu.addCommandItem (commandManager.get(), CommandIDs::launchDemoRunner);\r
}\r
}\r
\r
else if (findDemoRunnerProject() != File())\r
{\r
auto& lf = Desktop::getInstance().getDefaultLookAndFeel();\r
- demoRunnerAlert = lf.createAlertWindow ("Open Project",\r
- "Couldn't find a compiled version of the Demo Runner."\r
- #if JUCE_LINUX\r
- " Do you want to build it now?", "Build project", "Cancel",\r
- #else\r
- " Do you want to open the project?", "Open project", "Cancel",\r
- #endif\r
- {},\r
- AlertWindow::QuestionIcon, 2,\r
- mainWindowList.getFrontmostWindow (false));\r
+ demoRunnerAlert.reset (lf.createAlertWindow ("Open Project",\r
+ "Couldn't find a compiled version of the Demo Runner."\r
+ #if JUCE_LINUX\r
+ " Do you want to build it now?", "Build project", "Cancel",\r
+ #else\r
+ " Do you want to open the project?", "Open project", "Cancel",\r
+ #endif\r
+ {},\r
+ AlertWindow::QuestionIcon, 2,\r
+ mainWindowList.getFrontmostWindow (false)));\r
\r
demoRunnerAlert->enterModalState (true, ModalCallbackFunction::create ([this] (int retVal)\r
{\r
\r
void ProjucerApplication::initCommandManager()\r
{\r
- commandManager = new ApplicationCommandManager();\r
+ commandManager.reset (new ApplicationCommandManager());\r
commandManager->registerAllCommandsForTarget (this);\r
\r
{\r
void ProjucerApplication::showSetJUCEPathAlert()\r
{\r
auto& lf = Desktop::getInstance().getDefaultLookAndFeel();\r
- pathAlert = lf.createAlertWindow ("Set JUCE Path", "Your global JUCE path is invalid. This path is used to access the JUCE examples and demo project - "\r
- "would you like to set it now?",\r
- "Set path", "Cancel", "Don't ask again",\r
- AlertWindow::WarningIcon, 3,\r
- mainWindowList.getFrontmostWindow (false));\r
+ pathAlert.reset (lf.createAlertWindow ("Set JUCE Path", "Your global JUCE path is invalid. This path is used to access the JUCE examples and demo project - "\r
+ "would you like to set it now?",\r
+ "Set path", "Cancel", "Don't ask again",\r
+ AlertWindow::WarningIcon, 3,\r
+ mainWindowList.getFrontmostWindow (false)));\r
\r
pathAlert->enterModalState (true, ModalCallbackFunction::create ([this] (int retVal)\r
{\r
//==============================================================================\r
ProjucerLookAndFeel lookAndFeel;\r
\r
- ScopedPointer<StoredSettings> settings;\r
- ScopedPointer<Icons> icons;\r
+ std::unique_ptr<StoredSettings> settings;\r
+ std::unique_ptr<Icons> icons;\r
\r
struct MainMenuModel;\r
- ScopedPointer<MainMenuModel> menuModel;\r
+ std::unique_ptr<MainMenuModel> menuModel;\r
\r
MainWindowList mainWindowList;\r
OpenDocumentManager openDocumentManager;\r
- ScopedPointer<ApplicationCommandManager> commandManager;\r
+ std::unique_ptr<ApplicationCommandManager> commandManager;\r
\r
- ScopedPointer<Component> utf8Window, svgPathWindow, aboutWindow, applicationUsageDataWindow,\r
+ std::unique_ptr<Component> utf8Window, svgPathWindow, aboutWindow, applicationUsageDataWindow,\r
pathsWindow, editorColourSchemeWindow, pipCreatorWindow;\r
\r
- ScopedPointer<FileLogger> logger;\r
+ std::unique_ptr<FileLogger> logger;\r
\r
bool isRunningCommandLine;\r
- ScopedPointer<ChildProcessCache> childProcessCache;\r
- ScopedPointer<LicenseController> licenseController;\r
+ std::unique_ptr<ChildProcessCache> childProcessCache;\r
+ std::unique_ptr<LicenseController> licenseController;\r
\r
private:\r
void* server = nullptr;\r
\r
- ScopedPointer<LatestVersionChecker> versionChecker;\r
+ std::unique_ptr<LatestVersionChecker> versionChecker;\r
TooltipWindow tooltipWindow;\r
\r
void loginOrLogout();\r
void launchDemoRunner();\r
\r
int numExamples = 0;\r
- ScopedPointer<AlertWindow> demoRunnerAlert;\r
+ std::unique_ptr<AlertWindow> demoRunnerAlert;\r
\r
#if JUCE_LINUX\r
ChildProcess makeProcess;\r
void setupAnalytics();\r
\r
void showSetJUCEPathAlert();\r
- ScopedPointer<AlertWindow> pathAlert;\r
+ std::unique_ptr<AlertWindow> pathAlert;\r
\r
//==============================================================================\r
void setColourScheme (int index, bool saveSetting);\r
const int maxRedirects = 5;\r
\r
// we need to do the redirecting manually due to inconsistencies on the way headers are handled on redirects\r
- ScopedPointer<InputStream> in;\r
+ std::unique_ptr<InputStream> in;\r
\r
for (int redirect = 0; redirect < maxRedirects; ++redirect)\r
{\r
\r
total += written;\r
\r
- setStatusMessage (String (TRANS ("Downloading... (123)"))\r
+ setStatusMessage (String (TRANS("Downloading... (123)"))\r
.replace ("123", File::descriptionOfSizeInBytes (total)));\r
}\r
\r
const char* overwriteFolderPath)\r
: hasOverwriteButton (overwriteFolderPath != nullptr)\r
{\r
- addAndMakeVisible (titleLabel = new Label ("Title Label",\r
- TRANS ("Download \"123\" version 456?").replace ("123", productName)\r
- .replace ("456", version.toString())));\r
+ titleLabel.reset (new Label ("Title Label",\r
+ TRANS("Download \"123\" version 456?")\r
+ .replace ("123", productName)\r
+ .replace ("456", version.toString())));\r
+ addAndMakeVisible (titleLabel.get());\r
\r
titleLabel->setFont (Font (15.00f, Font::bold));\r
titleLabel->setJustificationType (Justification::centredLeft);\r
titleLabel->setEditable (false, false, false);\r
\r
- addAndMakeVisible (contentLabel = new Label ("Content Label",\r
- TRANS ("A new version of \"123\" is available - would you like to download it?")\r
- .replace ("123", productName)));\r
+ contentLabel.reset(new Label ("Content Label",\r
+ TRANS("A new version of \"123\" is available - would you like to download it?")\r
+ .replace ("123", productName)));\r
+ addAndMakeVisible (contentLabel.get());\r
contentLabel->setFont (Font (15.00f, Font::plain));\r
contentLabel->setJustificationType (Justification::topLeft);\r
contentLabel->setEditable (false, false, false);\r
\r
- addAndMakeVisible (okButton = new TextButton ("OK Button"));\r
+ okButton.reset (new TextButton ("OK Button"));\r
+ addAndMakeVisible (okButton.get());\r
okButton->setButtonText (TRANS(hasOverwriteButton ? "Choose Another Folder..." : "OK"));\r
okButton->onClick = [this] { exitParentDialog (2); };\r
\r
- addAndMakeVisible (cancelButton = new TextButton ("Cancel Button"));\r
+ cancelButton.reset (new TextButton ("Cancel Button"));\r
+ addAndMakeVisible (cancelButton.get());\r
cancelButton->setButtonText (TRANS("Cancel"));\r
cancelButton->onClick = [this] { exitParentDialog (-1); };\r
\r
- addAndMakeVisible (changeLogLabel = new Label ("Change Log Label",\r
- TRANS("Release Notes:")));\r
+ changeLogLabel.reset (new Label ("Change Log Label", TRANS("Release Notes:")));\r
+ addAndMakeVisible (changeLogLabel.get());\r
changeLogLabel->setFont (Font (15.00f, Font::plain));\r
changeLogLabel->setJustificationType (Justification::topLeft);\r
changeLogLabel->setEditable (false, false, false);\r
\r
- addAndMakeVisible (changeLog = new TextEditor ("Change Log"));\r
+ changeLog.reset (new TextEditor ("Change Log"));\r
+ addAndMakeVisible (changeLog.get());\r
changeLog->setMultiLine (true);\r
changeLog->setReturnKeyStartsNewLine (true);\r
changeLog->setReadOnly (true);\r
\r
if (hasOverwriteButton)\r
{\r
- addAndMakeVisible (overwriteLabel = new Label ("Overwrite Label",\r
- TRANS("Updating will overwrite everything in the following folder:")));\r
+ overwriteLabel.reset (new Label ("Overwrite Label",\r
+ TRANS("Updating will overwrite everything in the following folder:")));\r
+ addAndMakeVisible (overwriteLabel.get());\r
overwriteLabel->setFont (Font (15.00f, Font::plain));\r
overwriteLabel->setJustificationType (Justification::topLeft);\r
overwriteLabel->setEditable (false, false, false);\r
\r
- addAndMakeVisible (overwritePath = new Label ("Overwrite Path", overwriteFolderPath));\r
+ overwritePath.reset (new Label ("Overwrite Path", overwriteFolderPath));\r
+ addAndMakeVisible (overwritePath.get());\r
overwritePath->setFont (Font (15.00f, Font::bold));\r
overwritePath->setJustificationType (Justification::topLeft);\r
overwritePath->setEditable (false, false, false);\r
\r
- addAndMakeVisible (overwriteButton = new TextButton ("Overwrite Button"));\r
+ overwriteButton.reset (new TextButton ("Overwrite Button"));\r
+ addAndMakeVisible (overwriteButton.get());\r
overwriteButton->setButtonText (TRANS("Overwrite"));\r
overwriteButton->onClick = [this] { exitParentDialog (1); };\r
}\r
\r
- juceIcon = Drawable::createFromImageData (BinaryData::juce_icon_png,\r
- BinaryData::juce_icon_pngSize);\r
+ juceIcon.reset (Drawable::createFromImageData (BinaryData::juce_icon_png,\r
+ BinaryData::juce_icon_pngSize));\r
\r
setSize (518, overwritePath != nullptr ? 345 : 269);\r
\r
releaseNotes, overwritePath), true);\r
\r
DialogWindow::LaunchOptions lo;\r
- lo.dialogTitle = TRANS ("Download \"123\" version 456?").replace ("456", version.toString())\r
+ lo.dialogTitle = TRANS("Download \"123\" version 456?").replace ("456", version.toString())\r
.replace ("123", productName);\r
lo.dialogBackgroundColour = userDialog->findColour (backgroundColourId);\r
lo.content = userDialog;\r
\r
private:\r
bool hasOverwriteButton;\r
- ScopedPointer<Label> titleLabel, contentLabel, changeLogLabel, overwriteLabel, overwritePath;\r
- ScopedPointer<TextButton> okButton, cancelButton;\r
- ScopedPointer<TextEditor> changeLog;\r
- ScopedPointer<TextButton> overwriteButton;\r
- ScopedPointer<Drawable> juceIcon;\r
+ std::unique_ptr<Label> titleLabel, contentLabel, changeLogLabel, overwriteLabel, overwritePath;\r
+ std::unique_ptr<TextButton> okButton, cancelButton;\r
+ std::unique_ptr<TextEditor> changeLog;\r
+ std::unique_ptr<TextButton> overwriteButton;\r
+ std::unique_ptr<Drawable> juceIcon;\r
\r
void lookAndFeelChanged() override\r
{\r
\r
const int numRedirects = 0;\r
\r
- const ScopedPointer<InputStream> in (updateURL.createInputStream (false, nullptr, nullptr,\r
- extraHeaders, 0, &responseHeaders,\r
- &statusCode, numRedirects));\r
+ const std::unique_ptr<InputStream> in (updateURL.createInputStream (false, nullptr, nullptr,\r
+ extraHeaders, 0, &responseHeaders,\r
+ &statusCode, numRedirects));\r
\r
if (threadShouldExit())\r
return; // can't connect: fail silently.\r
if (targetFolder.getChildFile (".git").isDirectory())\r
{\r
AlertWindow::showMessageBox (AlertWindow::WarningIcon,\r
- TRANS ("Downloading new JUCE version"),\r
- TRANS ("This folder is a GIT repository!\n\n"\r
+ TRANS("Downloading new JUCE version"),\r
+ TRANS("This folder is a GIT repository!\n\n"\r
"You should use a \"git pull\" to update it to the latest version. "\r
"Or to use the Projucer to get an update, you should select an empty "\r
"folder into which you'd like to download the new code."));\r
\r
TemporaryFile temp (file);\r
\r
- if (! temp.getFile().replaceWithText (newText, false, false))\r
+ if (! temp.getFile().replaceWithText (newText, false, false, nullptr))\r
throw CommandLineError ("!!! ERROR Couldn't write to temp file!");\r
\r
if (! temp.overwriteTargetFileWithTemporary())\r
}\r
}\r
\r
- ScopedPointer<Project> project;\r
+ std::unique_ptr<Project> project;\r
};\r
\r
//==============================================================================\r
std::cout << "Writing: " << targetFile.getFullPathName() << std::endl;\r
\r
TemporaryFile temp (targetFile);\r
- ScopedPointer<FileOutputStream> out (temp.getFile().createOutputStream());\r
+ std::unique_ptr<FileOutputStream> out (temp.getFile().createOutputStream());\r
\r
bool ok = out != nullptr && zip.writeToStream (*out, nullptr);\r
out.reset();\r
\r
static void cleanWhitespace (const File& file, CleanupOptions options)\r
{\r
- const String content (file.loadFileAsString());\r
+ auto content = file.loadFileAsString();\r
\r
if (content.contains ("%""%") && content.contains ("//["))\r
return; // ignore projucer GUI template files\r
\r
if (options.fixDividerComments)\r
{\r
- String afterIndent (line.trim());\r
+ auto afterIndent = line.trim();\r
\r
if (afterIndent.startsWith ("//") && afterIndent.length() > 20)\r
{\r
\r
for (auto it = args.begin() + 1; it < args.end(); ++it)\r
{\r
- const File target (getFileCheckingForExistence (*it));\r
+ auto target = getFileCheckingForExistence (*it);\r
\r
Array<File> files;\r
\r
#endif\r
\r
auto settingsFile = userAppData.getChildFile ("Projucer").getChildFile ("Projucer.settings");\r
- ScopedPointer<XmlElement> xml (XmlDocument::parse (settingsFile));\r
+ std::unique_ptr<XmlElement> xml (XmlDocument::parse (settingsFile));\r
auto settingsTree = ValueTree::fromXml (*xml);\r
\r
if (! settingsTree.isValid())\r
{\r
commandManager.getKeyMappings()->resetToDefaultMappings();\r
\r
- ScopedPointer<XmlElement> keys (getGlobalProperties().getXmlValue ("keyMappings"));\r
+ std::unique_ptr<XmlElement> keys (getGlobalProperties().getXmlValue ("keyMappings"));\r
\r
if (keys != nullptr)\r
commandManager.getKeyMappings()->restoreFromXml (*keys);\r
\r
bool MainWindow::closeProject (Project* project, bool askUserToSave)\r
{\r
- jassert (project == currentProject && project != nullptr);\r
+ jassert (project == currentProject.get() && project != nullptr);\r
\r
if (project == nullptr)\r
return true;\r
{\r
auto openInIDE = currentProject->shouldOpenInIDEAfterSaving();\r
\r
- closeProject (currentProject, false);\r
+ closeProject (currentProject.get(), false);\r
openFile (newProjectFileToOpen);\r
\r
if (currentProject != nullptr)\r
\r
if (file.hasFileExtension (Project::projectFileExtension))\r
{\r
- ScopedPointer<Project> newDoc (new Project (file));\r
+ std::unique_ptr<Project> newDoc (new Project (file));\r
\r
auto result = newDoc->loadFrom (file, true);\r
\r
bool shouldDropFilesWhenDraggedExternally (const DragAndDropTarget::SourceDetails& sourceDetails,\r
StringArray& files, bool& canMoveFiles) override;\r
private:\r
- ScopedPointer<Project> currentProject;\r
+ std::unique_ptr<Project> currentProject;\r
Value projectNameValue;\r
\r
static const char* getProjectWindowPosName() { return "projectWindowPos"; }\r
{\r
// This method is where you should put your application's initialisation code..\r
\r
- mainWindow = new MainWindow (getApplicationName());\r
+ mainWindow.reset (new MainWindow (getApplicationName()));\r
}\r
\r
void shutdown() override\r
};\r
\r
private:\r
- ScopedPointer<MainWindow> mainWindow;\r
+ std::unique_ptr<MainWindow> mainWindow;\r
};\r
\r
//==============================================================================\r
{\r
// This method is where you should put your application's initialisation code..\r
\r
- mainWindow = new MainWindow (getApplicationName());\r
+ mainWindow.reset (new MainWindow (getApplicationName()));\r
}\r
\r
void shutdown() override\r
};\r
\r
private:\r
- ScopedPointer<MainWindow> mainWindow;\r
+ std::unique_ptr<MainWindow> mainWindow;\r
};\r
\r
//==============================================================================\r
//==============================================================================\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)\r
};\r
- ScopedPointer<MainWindow> mainWindow;\r
+\r
+ std::unique_ptr<MainWindow> mainWindow;\r
};\r
\r
//==============================================================================\r
private:\r
StringArray facts;\r
File file;\r
- ScopedPointer<Drawable> drawable;\r
+ std::unique_ptr<Drawable> drawable;\r
\r
void tryToLoadImage()\r
{\r
drawable.reset();\r
\r
{\r
- ScopedPointer<InputStream> input (file.createInputStream());\r
+ std::unique_ptr<InputStream> input (file.createInputStream());\r
\r
if (input != nullptr)\r
{\r
\r
if (drawable == nullptr)\r
{\r
- ScopedPointer<XmlElement> svg (XmlDocument::parse (file));\r
+ std::unique_ptr<XmlElement> svg (XmlDocument::parse (file));\r
\r
if (svg != nullptr)\r
drawable.reset (Drawable::createFromSVG (*svg));\r
String text = getTextInRange (selection).toLowerCase();\r
\r
if (isIntegerLiteral (text) || isFloatLiteral (text))\r
- overlay = new LiteralHighlightOverlay (*this, selection, mightBeColourValue (text));\r
+ overlay.reset (new LiteralHighlightOverlay (*this, selection, mightBeColourValue (text)));\r
}\r
}\r
\r
static Colour getBackgroundColour() { return Colour (0xcb5c7879); }\r
};\r
\r
- ScopedPointer<LiteralHighlightOverlay> overlay;\r
+ std::unique_ptr<LiteralHighlightOverlay> overlay;\r
};\r
\r
//==============================================================================\r
\r
protected:\r
FileModificationDetector modDetector;\r
- ScopedPointer<CodeDocument> codeDoc;\r
+ std::unique_ptr<CodeDocument> codeDoc;\r
Project* project;\r
\r
- ScopedPointer<CodeEditorComponent::State> lastState;\r
+ std::unique_ptr<CodeEditorComponent::State> lastState;\r
\r
void reloadInternal();\r
};\r
void scrollToKeepRangeOnScreen (Range<int> range);\r
void highlight (Range<int> range, bool cursorAtStart);\r
\r
- ScopedPointer<GenericCodeEditorComponent> editor;\r
+ std::unique_ptr<GenericCodeEditorComponent> editor;\r
\r
private:\r
void resized() override;\r
private:\r
File file;\r
class FindPanel;\r
- ScopedPointer<FindPanel> findPanel;\r
+ std::unique_ptr<FindPanel> findPanel;\r
ListenerList<Listener> listeners;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GenericCodeEditorComponent)\r
const String userCodeComment ("UserButtonCode_" + memberVariableName);\r
\r
callback\r
- << "if (buttonThatWasClicked == " << memberVariableName\r
- << ")\n{\n //[" << userCodeComment << "] -- add your button handler code here..\n //[/" << userCodeComment << "]\n}\n";\r
+ << "if (buttonThatWasClicked == " << memberVariableName << ".get())\n"\r
+ << "{\n //[" << userCodeComment << "] -- add your button handler code here..\n //[/" << userCodeComment << "]\n}\n";\r
}\r
}\r
\r
const String userCodeComment ("UserComboBoxCode_" + memberVariableName);\r
\r
callback\r
- << "if (comboBoxThatHasChanged == " << memberVariableName\r
- << ")\n{\n //[" << userCodeComment << "] -- add your combo box handling code here..\n //[/" << userCodeComment << "]\n}\n";\r
+ << "if (comboBoxThatHasChanged == " << memberVariableName << ".get())\n"\r
+ << "{\n //[" << userCodeComment << "] -- add your combo box handling code here..\n //[/" << userCodeComment << "]\n}\n";\r
}\r
}\r
\r
jassert (getHandlerFor (existing) == this);\r
\r
Component* const newOne = createNewComponent (document);\r
- ScopedPointer<XmlElement> xml (createXmlFor (&existing, document->getComponentLayout()));\r
+ std::unique_ptr<XmlElement> xml (createXmlFor (&existing, document->getComponentLayout()));\r
\r
if (xml != nullptr)\r
restoreFromXml (*xml, newOne, document->getComponentLayout());\r
clsName = getClassName (component);\r
\r
code.privateMemberDeclarations\r
- << "ScopedPointer<" << clsName << "> " << memberVariableName << ";\n";\r
+ << "std::unique_ptr<" << clsName << "> " << memberVariableName << ";\n";\r
}\r
\r
void ComponentTypeHandler::fillInResizeCode (GeneratedCode& code, Component* component, const String& memberVariableName)\r
const String virtualName (component->getProperties() ["virtualName"].toString());\r
\r
String s;\r
- s << "addAndMakeVisible (" << memberVariableName << " = new ";\r
+ s << memberVariableName << ".reset (new ";\r
\r
if (virtualName.isNotEmpty())\r
s << CodeHelpers::makeValidIdentifier (virtualName, false, false, true);\r
s << getClassName (component);\r
\r
if (params.isEmpty())\r
+ {\r
s << "());\n";\r
+ }\r
else\r
{\r
StringArray lines;\r
s << " (" << params << "));\n";\r
}\r
\r
+ s << "addAndMakeVisible (" << memberVariableName << ".get());\n";\r
+\r
+\r
if (SettableTooltipClient* ttc = dynamic_cast<SettableTooltipClient*> (component))\r
{\r
if (ttc->getTooltip().isNotEmpty())\r
const String userCodeComment ("UserSliderCode_" + memberVariableName);\r
\r
callback\r
- << "if (sliderThatWasMoved == " << memberVariableName\r
- << ")\n{\n //[" << userCodeComment << "] -- add your slider handling code here..\n //[/" << userCodeComment << "]\n}\n";\r
+ << "if (sliderThatWasMoved == " << memberVariableName << ".get())\n"\r
+ << "{\n //[" << userCodeComment << "] -- add your slider handling code here..\n //[/" << userCodeComment << "]\n}\n";\r
}\r
}\r
\r
{\r
File jucerCpp = code.document->getCppFile().getSiblingFile (getTabJucerFile (t, i));\r
\r
- ScopedPointer<JucerDocument> doc (JucerDocument::createForCppFile (nullptr, jucerCpp));\r
+ std::unique_ptr<JucerDocument> doc (JucerDocument::createForCppFile (nullptr, jucerCpp));\r
\r
if (doc != nullptr)\r
{\r
jucerComp->setFilename (jucerComponentFile);\r
jucerComp->setToInitialSize();\r
\r
- addAndMakeVisible (jucerComp);\r
+ addAndMakeVisible (jucerComp.get());\r
}\r
}\r
else\r
bool isUsingJucerComp;\r
String contentClassName, constructorParams;\r
String jucerComponentFile;\r
- ScopedPointer<TestComponent> jucerComp;\r
+ std::unique_ptr<TestComponent> jucerComp;\r
};\r
\r
//==============================================================================\r
: ComponentUndoableAction<TabbedComponent> (comp, l),\r
indexToRemove (indexToRemove_)\r
{\r
- previousState = getTabState (comp, indexToRemove);\r
+ previousState.reset (getTabState (comp, indexToRemove));\r
}\r
\r
bool perform()\r
\r
private:\r
int indexToRemove;\r
- ScopedPointer<XmlElement> previousState;\r
+ std::unique_ptr<XmlElement> previousState;\r
};\r
};\r
\r
{\r
showCorrectTab();\r
\r
- ScopedPointer<XmlElement> state (getTabState (getComponent(), from));\r
+ std::unique_ptr<XmlElement> state (getTabState (getComponent(), from));\r
\r
getComponent()->removeTab (from);\r
addNewTab (getComponent(), to);\r
if (filename.isNotEmpty())\r
file = code.document->getCppFile().getSiblingFile (filename);\r
\r
- ScopedPointer<JucerDocument> doc (JucerDocument::createForCppFile (nullptr, file));\r
+ std::unique_ptr<JucerDocument> doc (JucerDocument::createForCppFile (nullptr, file));\r
\r
if (doc != nullptr)\r
{\r
ButtonDocument* newOne = new ButtonDocument (cpp);\r
newOne->resources = resources;\r
\r
- ScopedPointer<XmlElement> xml (createXml());\r
+ std::unique_ptr<XmlElement> xml (createXml());\r
newOne->loadFromXml (*xml);\r
\r
return newOne;\r
StringArray& initialContents) const;\r
\r
//==============================================================================\r
- ScopedPointer<PaintRoutine> paintRoutines[7];\r
+ std::unique_ptr<PaintRoutine> paintRoutines[7];\r
bool paintStatesEnabled [7];\r
};\r
\r
newOne->resources = resources;\r
\r
- ScopedPointer<XmlElement> xml (createXml());\r
+ std::unique_ptr<XmlElement> xml (createXml());\r
newOne->loadFromXml (*xml);\r
\r
return newOne;\r
void applyCustomPaintSnippets (StringArray&);\r
\r
private:\r
- ScopedPointer<ComponentLayout> components;\r
- ScopedPointer<PaintRoutine> backgroundGraphics;\r
+ std::unique_ptr<ComponentLayout> components;\r
+ std::unique_ptr<PaintRoutine> backgroundGraphics;\r
};\r
newElement.setStrokeType (getStrokeType().stroke, false);\r
newElement.setStrokeFill (getStrokeType().fill, false);\r
\r
- ScopedPointer<XmlElement> xml (newElement.createXml());\r
+ std::unique_ptr<XmlElement> xml (newElement.createXml());\r
\r
PaintElement* e = getOwner()->addElementFromXml (*xml, getOwner()->indexOfElement (this), true);\r
\r
setMinimumOnscreenAmounts (0, 0, 0, 0);\r
setSizeLimits (borderThickness * 2 + 1, borderThickness * 2 + 1, 8192, 8192);\r
\r
- addChildComponent (border = new ResizableBorderComponent (this, this));\r
+ border.reset (new ResizableBorderComponent (this, this));\r
+ addChildComponent (border.get());\r
\r
border->setBorderThickness (BorderSize<int> (borderThickness));\r
\r
const bool isStretchingBottom,\r
const bool isStretchingRight)\r
{\r
- if (ModifierKeys::getCurrentModifiers().isShiftDown())\r
+ if (ModifierKeys::currentModifiers.isShiftDown())\r
setFixedAspectRatio (originalAspectRatio);\r
else\r
setFixedAspectRatio (0.0);\r
void updateSiblingComps();\r
\r
private:\r
- ScopedPointer<ResizableBorderComponent> border;\r
+ std::unique_ptr<ResizableBorderComponent> border;\r
String typeName;\r
bool selected, dragging, mouseDownSelectStatus;\r
double originalAspectRatio;\r
\r
for (int i = 0; i < subElements.size(); ++i)\r
{\r
- ScopedPointer<XmlElement> xml (subElements.getUnchecked(i)->createXml());\r
+ std::unique_ptr<XmlElement> xml (subElements.getUnchecked(i)->createXml());\r
\r
PaintElement* newOne = getOwner()->addElementFromXml (*xml, index, undoable);\r
getOwner()->getSelectedElements().addToSelection (newOne);\r
{\r
if (routine->getSelectedElements().isSelected (routine->getElement (i)))\r
{\r
- ScopedPointer<XmlElement> xml (routine->getElement(i)->createXml());\r
+ std::unique_ptr<XmlElement> xml (routine->getElement(i)->createXml());\r
\r
- if (auto* newOne = ObjectTypes::createElementForXml (xml, routine))\r
+ if (auto* newOne = ObjectTypes::createElementForXml (xml.get(), routine))\r
newGroup->subElements.add (newOne);\r
\r
if (i > frontIndex)\r
<< customPaintCode\r
<< " //[/UserPaintCustomArguments]\n";\r
\r
- if (dynamic_cast<const DrawableImage*> (getDrawable()) != 0)\r
+ if (dynamic_cast<const DrawableImage*> (getDrawable()))\r
{\r
const String imageVariable ("cachedImage_" + resourceName.replace ("::", "_") + "_" + String (code.getUniqueSuffix()));\r
\r
else\r
r << " g.setColour (Colours::black.withAlpha (" << CodeHelpers::floatLiteral (opacity, 3) << "));\n";\r
\r
-\r
if (mode == stretched)\r
{\r
r << " g.drawImage (" << imageVariable << ",\n"\r
const String imageVariable ("drawable" + String (code.getUniqueSuffix()));\r
\r
code.privateMemberDeclarations\r
- << "ScopedPointer<Drawable> " << imageVariable << ";\n";\r
+ << "std::unique_ptr<Drawable> " << imageVariable << ";\n";\r
\r
code.constructorCode\r
- << imageVariable << " = Drawable::createFromImageData ("\r
- << resourceName << ", " << resourceName << "Size);\n";\r
+ << imageVariable << ".reset (Drawable::createFromImageData ("\r
+ << resourceName << ", " << resourceName << "Size));\n";\r
\r
code.destructorCode\r
<< imageVariable << " = nullptr;\n";\r
\r
for (int i = 0; i < tokens.size(); ++i)\r
{\r
- ScopedPointer<PathPoint> p (new PathPoint (this));\r
+ std::unique_ptr<PathPoint> p (new PathPoint (this));\r
\r
if (tokens[i] == "s")\r
{\r
\r
while (i.next())\r
{\r
- ScopedPointer<PathPoint> p (new PathPoint (this));\r
+ std::unique_ptr<PathPoint> p (new PathPoint (this));\r
p->type = i.elementType;\r
\r
if (i.elementType == Path::Iterator::startNewSubPath)\r
: PropertyComponent (name)\r
{\r
colourPropEditor.reset (new ColourPropEditorComponent (this, canReset));\r
- addAndMakeVisible (colourPropEditor);\r
+ addAndMakeVisible (colourPropEditor.get());\r
}\r
\r
virtual void setColour (Colour newColour) = 0;\r
}\r
};\r
\r
- ScopedPointer<ColourPropEditorComponent> colourPropEditor;\r
+ std::unique_ptr<ColourPropEditorComponent> colourPropEditor;\r
};\r
refresh(); // (to clear the text editor if it's got focus)\r
};\r
\r
- addAndMakeVisible (textEditor = new PositionPropLabel (*this));\r
+ textEditor.reset (new PositionPropLabel (*this));\r
+ addAndMakeVisible (textEditor.get());\r
}\r
\r
String getText() const\r
};\r
\r
ComponentLayout* layout;\r
- ScopedPointer<PositionPropLabel> textEditor;\r
+ std::unique_ptr<PositionPropLabel> textEditor;\r
TextButton button;\r
\r
Component* component;\r
{\r
for (int i = getNumChildComponents(); --i >= 0;)\r
{\r
- ScopedPointer<ComponentOverlayComponent> overlay (dynamic_cast<ComponentOverlayComponent*> (getChildComponent (i)));\r
+ std::unique_ptr<ComponentOverlayComponent> overlay (dynamic_cast<ComponentOverlayComponent*> (getChildComponent (i)));\r
\r
if (overlay != nullptr && layout.containsComponent (overlay->target))\r
overlay.release();\r
bool ComponentLayoutEditor::isInterestedInFileDrag (const StringArray& filenames)\r
{\r
const File f (filenames [0]);\r
- return f.hasFileExtension (".cpp");\r
+ return f.hasFileExtension (cppFileExtensions);\r
}\r
\r
void ComponentLayoutEditor::filesDropped (const StringArray& filenames, int x, int y)\r
StringArray filenames;\r
\r
for (int i = 0; i < selectedNodes.size(); ++i)\r
- if (selectedNodes.getUnchecked(i)->getFile().hasFileExtension (".cpp"))\r
+ if (selectedNodes.getUnchecked(i)->getFile().hasFileExtension (cppFileExtensions))\r
filenames.add (selectedNodes.getUnchecked(i)->getFile().getFullPathName());\r
\r
filesDropped (filenames, dragSourceDetails.localPosition.x, dragSourceDetails.localPosition.y);\r
setMinimumOnscreenAmounts (0, 0, 0, 0);\r
setSizeLimits (borderThickness * 2 + 2, borderThickness * 2 + 2, 8192, 8192);\r
\r
- addChildComponent (border = new ResizableBorderComponent (this, this));\r
+ border.reset (new ResizableBorderComponent (this, this));\r
+ addChildComponent (border.get());\r
\r
border->setBorderThickness (BorderSize<int> (borderThickness));\r
\r
const bool isStretchingBottom,\r
const bool isStretchingRight)\r
{\r
- if (ModifierKeys::getCurrentModifiers().isShiftDown())\r
+ if (ModifierKeys::currentModifiers.isShiftDown())\r
setFixedAspectRatio (originalAspectRatio);\r
else\r
setFixedAspectRatio (0.0);\r
const int borderThickness;\r
\r
private:\r
- ScopedPointer<ResizableBorderComponent> border;\r
+ std::unique_ptr<ResizableBorderComponent> border;\r
\r
ComponentLayout& layout;\r
\r
\r
private:\r
double scaleFactor = 1.0;\r
- ScopedPointer<Component> content;\r
+ std::unique_ptr<Component> content;\r
};\r
\r
//==============================================================================\r
else\r
{\r
for (int i = getNumChildComponents(); --i >= 0;)\r
- ScopedPointer<DraggerOverlayComp> deleter (dynamic_cast<DraggerOverlayComp*> (getChildComponent (i)));\r
+ std::unique_ptr<DraggerOverlayComp> deleter (dynamic_cast<DraggerOverlayComp*> (getChildComponent (i)));\r
}\r
}\r
}\r
==============================================================================\r
*/\r
\r
+#pragma once\r
+\r
+\r
+//==============================================================================\r
/**\r
A namespace to hold all the possible command IDs.\r
*/\r
: PropertyComponent ("extra callbacks", 250),\r
document (doc)\r
{\r
- addAndMakeVisible (listBox = new ListBox (String(), this));\r
+ listBox.reset (new ListBox (String(), this));\r
+ addAndMakeVisible (listBox.get());\r
listBox->setRowHeight (22);\r
\r
document.addChangeListener (this);\r
\r
private:\r
JucerDocument& document;\r
- ScopedPointer<ListBox> listBox;\r
+ std::unique_ptr<ListBox> listBox;\r
\r
StringArray baseClasses, returnValues, methods, initialContents;\r
};\r
{\r
auto& projectProps = project->getStoredProperties();\r
\r
- ScopedPointer<XmlElement> root (projectProps.getXmlValue ("GUIComponentsLastTab"));\r
+ std::unique_ptr<XmlElement> root (projectProps.getXmlValue ("GUIComponentsLastTab"));\r
\r
if (root == nullptr)\r
- root = new XmlElement ("FILES");\r
+ root.reset (new XmlElement ("FILES"));\r
\r
auto fileName = document->getCppFile().getFileName();\r
\r
{\r
if (auto* project = document->getCppDocument().getProject())\r
{\r
- ScopedPointer<XmlElement> root (project->getStoredProperties().getXmlValue ("GUIComponentsLastTab"));\r
+ std::unique_ptr<XmlElement> root (project->getStoredProperties().getXmlValue ("GUIComponentsLastTab"));\r
\r
if (root != nullptr)\r
{\r
\r
bool canPaste = false;\r
\r
- ScopedPointer<XmlElement> doc (XmlDocument::parse (SystemClipboard::getTextFromClipboard()));\r
+ std::unique_ptr<XmlElement> doc (XmlDocument::parse (SystemClipboard::getTextFromClipboard()));\r
\r
if (doc != nullptr)\r
{\r
\r
case StandardApplicationCommandIDs::paste:\r
{\r
- if (ScopedPointer<XmlElement> doc = XmlDocument::parse (SystemClipboard::getTextFromClipboard()))\r
+ std::unique_ptr<XmlElement> doc (XmlDocument::parse (SystemClipboard::getTextFromClipboard()));\r
+\r
+ if (doc != nullptr)\r
{\r
if (doc->hasTagName (ComponentLayout::clipboardXmlTag))\r
{\r
static JucerDocumentEditor* getActiveDocumentHolder();\r
\r
private:\r
- ScopedPointer<JucerDocument> document;\r
+ std::unique_ptr<JucerDocument> document;\r
ComponentLayoutPanel* compLayoutPanel = nullptr;\r
\r
struct JucerDocumentTabs : public TabbedComponent\r
\r
if (f.existsAsFile())\r
{\r
- ScopedPointer<Drawable> d (Drawable::createFromImageFile (f));\r
+ std::unique_ptr<Drawable> d (Drawable::createFromImageFile (f));\r
\r
if (d != nullptr)\r
{\r
\r
void updateList()\r
{\r
- ScopedPointer<XmlElement> state (propsPanel->getOpennessState());\r
+ std::unique_ptr<XmlElement> state (propsPanel->getOpennessState());\r
\r
clear();\r
\r
delButton.setEnabled (false);\r
delButton.onClick = [this] { document.getResources().remove (listBox->getSelectedRow (0)); };\r
\r
- addAndMakeVisible (listBox = new TableListBox (String(), this));\r
+ listBox.reset (new TableListBox (String(), this));\r
+ addAndMakeVisible (listBox.get());\r
listBox->getHeader().addColumn ("name", 1, 150, 80, 400);\r
listBox->getHeader().addColumn ("original file", 2, 350, 80, 800);\r
listBox->getHeader().addColumn ("size", 3, 100, 40, 150);\r
void reloadAll();\r
\r
JucerDocument& document;\r
- ScopedPointer<TableListBox> listBox;\r
+ std::unique_ptr<TableListBox> listBox;\r
TextButton addButton, reloadAllButton, delButton;\r
};\r
filename = newName;\r
lastModificationTime = findFile().getLastModificationTime();\r
\r
- loadedDocument = JucerDocument::createForCppFile (nullptr, findFile());\r
+ loadedDocument.reset (JucerDocument::createForCppFile (nullptr, findFile()));\r
\r
updateContents();\r
repaint();\r
\r
private:\r
JucerDocument* ownerDocument;\r
- ScopedPointer<JucerDocument> loadedDocument;\r
+ std::unique_ptr<JucerDocument> loadedDocument;\r
String filename, constructorParams;\r
Time lastModificationTime;\r
const bool alwaysFillBackground;\r
String name;\r
String originalFilename;\r
MemoryBlock data;\r
- ScopedPointer<Drawable> drawable;\r
+ std::unique_ptr<Drawable> drawable;\r
};\r
\r
void clear();\r
}\r
else\r
{\r
- ScopedPointer<UndoableAction> deleter (action);\r
+ std::unique_ptr<UndoableAction> deleter (action);\r
action->perform();\r
}\r
}\r
int indexAdded;\r
\r
private:\r
- ScopedPointer<XmlElement> xml;\r
+ std::unique_ptr<XmlElement> xml;\r
ComponentLayout& layout;\r
\r
static void showCorrectTab()\r
oldIndex (-1)\r
{\r
if (ComponentTypeHandler* const h = ComponentTypeHandler::getHandlerFor (*comp))\r
- xml = h->createXmlFor (comp, &layout);\r
+ xml.reset (h->createXmlFor (comp, &layout));\r
else\r
jassertfalse;\r
\r
}\r
\r
private:\r
- ScopedPointer<XmlElement> xml;\r
+ std::unique_ptr<XmlElement> xml;\r
int oldIndex;\r
};\r
\r
void ComponentLayout::paste()\r
{\r
XmlDocument clip (SystemClipboard::getTextFromClipboard());\r
- ScopedPointer<XmlElement> doc (clip.getDocumentElement());\r
+ std::unique_ptr<XmlElement> doc (clip.getDocumentElement());\r
\r
if (doc != nullptr && doc->hasTagName (clipboardXmlTag))\r
{\r
\r
Component* ComponentLayout::addNewComponent (ComponentTypeHandler* const type, int x, int y)\r
{\r
- ScopedPointer<Component> c (type->createNewComponent (getDocument()));\r
+ std::unique_ptr<Component> c (type->createNewComponent (getDocument()));\r
jassert (c != nullptr);\r
\r
if (c != nullptr)\r
{\r
c->setSize (type->getDefaultWidth(), type->getDefaultHeight());\r
c->setCentrePosition (x, y);\r
- updateStoredComponentPosition (c, false);\r
+ updateStoredComponentPosition (c.get(), false);\r
\r
c->getProperties().set ("id", nextCompUID++);\r
\r
- ScopedPointer<XmlElement> xml (type->createXmlFor (c, this));\r
- c.reset();\r
- c = addComponentFromXml (*xml, true);\r
+ std::unique_ptr<XmlElement> xml (type->createXmlFor (c.get(), this));\r
+ c.reset (addComponentFromXml (*xml, true));\r
\r
- String memberName (CodeHelpers::makeValidIdentifier (type->getClassName (c), true, true, false));\r
- setComponentMemberVariableName (c, memberName);\r
+ String memberName (CodeHelpers::makeValidIdentifier (type->getClassName (c.get()), true, true, false));\r
+ setComponentMemberVariableName (c.get(), memberName);\r
\r
- selected.selectOnly (c);\r
+ selected.selectOnly (c.get());\r
}\r
\r
return c.release();\r
if (ComponentTypeHandler* const type\r
= ComponentTypeHandler::getHandlerForXmlTag (xml.getTagName()))\r
{\r
- ScopedPointer<Component> newComp (type->createNewComponent (getDocument()));\r
+ std::unique_ptr<Component> newComp (type->createNewComponent (getDocument()));\r
\r
- if (type->restoreFromXml (xml, newComp, this))\r
+ if (type->restoreFromXml (xml, newComp.get(), this))\r
{\r
// ensure that the new comp's name is unique\r
- setComponentMemberVariableName (newComp, getComponentMemberVariableName (newComp));\r
+ setComponentMemberVariableName (newComp.get(), getComponentMemberVariableName (newComp.get()));\r
\r
// check for duped IDs..\r
- while (findComponentWithId (ComponentTypeHandler::getComponentId (newComp)) != nullptr)\r
- ComponentTypeHandler::setComponentId (newComp, Random::getSystemRandom().nextInt64());\r
+ while (findComponentWithId (ComponentTypeHandler::getComponentId (newComp.get())) != nullptr)\r
+ ComponentTypeHandler::setComponentId (newComp.get(), Random::getSystemRandom().nextInt64());\r
\r
- components.add (newComp);\r
+ components.add (newComp.get());\r
changed();\r
return newComp.release();\r
}\r
void JucerDocument::userEditedCpp()\r
{\r
if (userDocChangeTimer == nullptr)\r
- userDocChangeTimer = new UserDocChangeTimer (*this);\r
+ userDocChangeTimer.reset (new UserDocChangeTimer (*this));\r
\r
userDocChangeTimer->startTimer (500);\r
}\r
//==============================================================================\r
bool JucerDocument::isSnapActive (const bool disableIfCtrlKeyDown) const noexcept\r
{\r
- return snapActive != (disableIfCtrlKeyDown && ModifierKeys::getCurrentModifiers().isCtrlDown());\r
+ return snapActive != (disableIfCtrlKeyDown && ModifierKeys::currentModifiers.isCtrlDown());\r
}\r
\r
int JucerDocument::snapPosition (int pos) const noexcept\r
\r
fillInPaintCode (code);\r
\r
- ScopedPointer<XmlElement> e (createXml());\r
+ std::unique_ptr<XmlElement> e (createXml());\r
jassert (e != nullptr);\r
code.jucerMetadata = e->createDocument ("", false, false);\r
\r
{\r
const String cppContent (cpp->getCodeDocument().getAllContent());\r
\r
- ScopedPointer<XmlElement> newXML (pullMetaDataFromCppFile (cppContent));\r
+ std::unique_ptr<XmlElement> newXML (pullMetaDataFromCppFile (cppContent));\r
\r
if (newXML == nullptr || ! newXML->hasTagName (jucerCompXmlTag))\r
return false;\r
\r
- if (currentXML != nullptr && currentXML->isEquivalentTo (newXML, true))\r
+ if (currentXML != nullptr && currentXML->isEquivalentTo (newXML.get(), true))\r
return true;\r
\r
- currentXML = newXML;\r
+ currentXML.reset (newXML.release());\r
stopTimer();\r
\r
resources.loadFromCpp (getCppFile(), cppContent);\r
\r
bool JucerDocument::isValidJucerCppFile (const File& f)\r
{\r
- if (f.hasFileExtension (".cpp"))\r
- if (ScopedPointer<XmlElement> xml = pullMetaDataFromCppFile (f.loadFileAsString()))\r
+ if (f.hasFileExtension (cppFileExtensions))\r
+ {\r
+ std::unique_ptr<XmlElement> xml (pullMetaDataFromCppFile (f.loadFileAsString()));\r
+\r
+ if (xml != nullptr)\r
return xml->hasTagName (jucerCompXmlTag);\r
+ }\r
\r
return false;\r
}\r
{\r
auto& codeDoc = cpp->getCodeDocument();\r
\r
- ScopedPointer<XmlElement> xml (JucerDocument::pullMetaDataFromCppFile (codeDoc.getAllContent()));\r
+ std::unique_ptr<XmlElement> xml (JucerDocument::pullMetaDataFromCppFile (codeDoc.getAllContent()));\r
\r
if (xml == nullptr || ! xml->hasTagName (JucerDocument::jucerCompXmlTag))\r
return nullptr;\r
\r
const String docType (xml->getStringAttribute ("documentType"));\r
\r
- ScopedPointer<JucerDocument> newDoc;\r
+ std::unique_ptr<JucerDocument> newDoc;\r
\r
if (docType.equalsIgnoreCase ("Button"))\r
- newDoc = new ButtonDocument (cpp);\r
+ newDoc.reset (new ButtonDocument (cpp));\r
\r
if (docType.equalsIgnoreCase ("Component") || docType.isEmpty())\r
- newDoc = new ComponentDocument (cpp);\r
+ newDoc.reset (new ComponentDocument (cpp));\r
\r
if (newDoc != nullptr && newDoc->reloadFromDocument())\r
return newDoc.release();\r
\r
Component* createEditor() override\r
{\r
- if (ScopedPointer<JucerDocument> jucerDoc = JucerDocument::createForCppFile (getProject(), getFile()))\r
+ std::unique_ptr<JucerDocument> jucerDoc (JucerDocument::createForCppFile (getProject(), getFile()));\r
+\r
+ if (jucerDoc != nullptr)\r
return new JucerDocumentEditor (jucerDoc.release());\r
\r
return SourceCodeDocument::createEditor();\r
{\r
if (auto* header = dynamic_cast<SourceCodeDocument*> (odm.openFile (nullptr, headerFile)))\r
{\r
- if (ScopedPointer<JucerDocument> jucerDoc = new ComponentDocument (cpp))\r
+ std::unique_ptr<JucerDocument> jucerDoc (new ComponentDocument (cpp));\r
+\r
+ if (jucerDoc != nullptr)\r
{\r
jucerDoc->setClassName (newFile.getFileNameWithoutExtension());\r
\r
bool snapActive = true, snapShown = true;\r
float componentOverlayOpacity = 0.33f;\r
StringArray activeExtraMethods;\r
- ScopedPointer<XmlElement> currentXML;\r
- ScopedPointer<Timer> userDocChangeTimer;\r
+ std::unique_ptr<XmlElement> currentXML;\r
+ std::unique_ptr<Timer> userDocChangeTimer;\r
\r
void timerCallback() override;\r
void codeDocumentTextInserted (const String& newText, int insertIndex) override;\r
{\r
jassert (e != nullptr);\r
\r
- ScopedPointer<PaintElement> pe;\r
-\r
- if (e->hasTagName (PaintElementRectangle::getTagName())) pe = new PaintElementRectangle (owner);\r
- else if (e->hasTagName (PaintElementRoundedRectangle::getTagName())) pe = new PaintElementRoundedRectangle (owner);\r
- else if (e->hasTagName (PaintElementEllipse::getTagName())) pe = new PaintElementEllipse (owner);\r
- else if (e->hasTagName (PaintElementImage::getTagName())) pe = new PaintElementImage (owner);\r
- else if (e->hasTagName (PaintElementPath::getTagName())) pe = new PaintElementPath (owner);\r
- else if (e->hasTagName (PaintElementText::getTagName())) pe = new PaintElementText (owner);\r
- else if (e->hasTagName (PaintElementGroup::getTagName())) pe = new PaintElementGroup (owner);\r
+ std::unique_ptr<PaintElement> pe;\r
+\r
+ if (e->hasTagName (PaintElementRectangle::getTagName())) pe.reset (new PaintElementRectangle (owner));\r
+ else if (e->hasTagName (PaintElementRoundedRectangle::getTagName())) pe.reset (new PaintElementRoundedRectangle (owner));\r
+ else if (e->hasTagName (PaintElementEllipse::getTagName())) pe.reset (new PaintElementEllipse (owner));\r
+ else if (e->hasTagName (PaintElementImage::getTagName())) pe.reset (new PaintElementImage (owner));\r
+ else if (e->hasTagName (PaintElementPath::getTagName())) pe.reset (new PaintElementPath (owner));\r
+ else if (e->hasTagName (PaintElementText::getTagName())) pe.reset (new PaintElementText (owner));\r
+ else if (e->hasTagName (PaintElementGroup::getTagName())) pe.reset (new PaintElementGroup (owner));\r
\r
if (pe != nullptr && pe->loadFromXml (*e))\r
return pe.release();\r
if (document != nullptr)\r
return document->getUndoManager().perform (action, actionName);\r
\r
- ScopedPointer<UndoableAction> deleter (action);\r
+ std::unique_ptr<UndoableAction> deleter (action);\r
action->perform();\r
return false;\r
}\r
\r
private:\r
PaintRoutine& routine;\r
- ScopedPointer<XmlElement> xml;\r
+ std::unique_ptr<XmlElement> xml;\r
\r
void showCorrectTab() const\r
{\r
{\r
if (e != nullptr)\r
{\r
- ScopedPointer<PaintElement> deleter (e);\r
- ScopedPointer<XmlElement> xml (e->createXml());\r
+ std::unique_ptr<PaintElement> deleter (e);\r
+ std::unique_ptr<XmlElement> xml (e->createXml());\r
\r
e = addElementFromXml (*xml, index, undoable);\r
}\r
: PaintElementUndoableAction <PaintElement> (element),\r
oldIndex (-1)\r
{\r
- xml = element->createXml();\r
+ xml.reset (element->createXml());\r
oldIndex = routine.indexOfElement (element);\r
}\r
\r
int getSizeInUnits() { return 10; }\r
\r
private:\r
- ScopedPointer<XmlElement> xml;\r
+ std::unique_ptr<XmlElement> xml;\r
int oldIndex;\r
};\r
\r
void PaintRoutine::paste()\r
{\r
XmlDocument clip (SystemClipboard::getTextFromClipboard());\r
- ScopedPointer<XmlElement> doc (clip.getDocumentElement());\r
+ std::unique_ptr<XmlElement> doc (clip.getDocumentElement());\r
\r
if (doc != nullptr && doc->hasTagName (clipboardXmlTag))\r
{\r
//==============================================================================\r
void PaintRoutine::dropImageAt (const File& f, int x, int y)\r
{\r
- ScopedPointer<Drawable> d (Drawable::createFromImageFile (f));\r
+ std::unique_ptr<Drawable> d (Drawable::createFromImageFile (f));\r
\r
if (d != nullptr)\r
{\r
\r
#if ! JUCER_ENABLE_GPL_MODE\r
if (thread == nullptr)\r
- thread = new LicenseThread (*this, false);\r
+ thread.reset (new LicenseThread (*this, false));\r
#endif\r
}\r
\r
WebBrowserComponent::clearCookies();\r
#endif\r
\r
- thread = new LicenseThread (*this, false);\r
+ thread.reset (new LicenseThread (*this, false));\r
#endif\r
}\r
\r
\r
#if ! JUCER_ENABLE_GPL_MODE\r
thread.reset();\r
- thread = new LicenseThread (*this, true);\r
+ thread.reset (new LicenseThread (*this, true));\r
#endif\r
}\r
\r
\r
LicenseState LicenseController::licenseStateFromSettings (PropertiesFile& props)\r
{\r
- ScopedPointer<XmlElement> licenseXml = props.getXmlValue ("license");\r
+ std::unique_ptr<XmlElement> licenseXml (props.getXmlValue ("license"));\r
\r
if (licenseXml != nullptr)\r
{\r
// this is here for backwards compatibility with old-style settings files using XML text elements\r
if (licenseXml->getChildElementAllSubText ("type", {}) != String())\r
{\r
- auto stateFromOldSettings = licenseStateFromOldSettings (licenseXml);\r
+ auto stateFromOldSettings = licenseStateFromOldSettings (licenseXml.get());\r
\r
licenseStateToSettings (stateFromOldSettings, props);\r
\r
void queryWebview (const String&, const String&, HashMap<String, String>&);\r
\r
//==============================================================================\r
- ScopedPointer<LicenseThread> thread;\r
+ std::unique_ptr<LicenseThread> thread;\r
LicenseWebview* licenseWebview = nullptr;\r
#endif\r
\r
jassert (stateToUpdate.authToken.isNotEmpty());\r
\r
auto accessTokenHeader = "x-access-token: " + stateToUpdate.authToken;\r
+ std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user"), false));\r
\r
- if (ScopedPointer<WebInputStream> shared\r
- = getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user"), false))\r
+ if (shared != nullptr)\r
{\r
const int statusCode = shared->withExtraHeaders (accessTokenHeader).getStatusCode();\r
\r
\r
if (! selectNewLicense)\r
{\r
- ScopedPointer<WebInputStream> shared = getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/licences?search_internal_id=com.roli.projucer&version=5"),\r
- false);\r
+ std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/licences?search_internal_id=com.roli.projucer&version=5"),\r
+ false));\r
if (shared == nullptr)\r
break;\r
\r
\r
String postData (JSON::toString (var (redeamObject.get())));\r
\r
- ScopedPointer<WebInputStream> shared = getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/products").withPOSTData (postData),\r
- true);\r
+ std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/products").withPOSTData (postData),\r
+ true));\r
if (shared == nullptr)\r
break;\r
\r
jsonLicenseRequest->setProperty (licenseTypeIdentifier, "software");\r
\r
String postData (JSON::toString (var (jsonLicenseRequest.get())));\r
- ScopedPointer<WebInputStream> shared\r
- = getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/products/redeem").withPOSTData (postData), true);\r
+ std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL ("https://api.roli.com/api/v1/user/products/redeem")\r
+ .withPOSTData (postData),\r
+ true));\r
\r
if (shared != nullptr)\r
{\r
\r
if (avatarURL.isNotEmpty())\r
{\r
- if (ScopedPointer<WebInputStream> shared = getSharedWebInputStream (URL (avatarURL), false))\r
+ std::unique_ptr<WebInputStream> shared (getSharedWebInputStream (URL (avatarURL), false));\r
+\r
+ if (shared != nullptr)\r
{\r
MemoryBlock mb;\r
shared->readIntoMemoryBlock (mb);\r
}\r
\r
const uint32 backgroundColour = 0xff414141;\r
- ScopedPointer<Drawable> juceLogo\r
- = Drawable::createFromImageData (BinaryData::jucelogowithtext_svg,\r
- BinaryData::jucelogowithtext_svgSize);\r
+ std::unique_ptr<Drawable> juceLogo { Drawable::createFromImageData (BinaryData::jucelogowithtext_svg,\r
+ BinaryData::jucelogowithtext_svgSize) };\r
IconButton avatarButton;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Header)\r
\r
//==============================================================================\r
LicenseWebview& parentWindow;\r
- ScopedPointer<ModalComponentManager::Callback> modalCallback;\r
+ std::unique_ptr<ModalComponentManager::Callback> modalCallback;\r
Header header;\r
RedirectWebBrowserComponent webview;\r
std::function<void (const String&, const HashMap<String, String>&)> pageCallback;\r
#include "jucer_ProjectBuildInfo.h"\r
#include "jucer_ClientServerMessages.h"\r
#include "jucer_CompileEngineClient.h"\r
-#include "../LiveBuildEngine/jucer_CompileEngineServer.h"\r
+#include "jucer_CompileEngineServer.h"\r
+#include "jucer_CompileEngineSettings.h"\r
\r
#ifndef RUN_CLANG_IN_CHILD_PROCESS\r
#error\r
\r
void restartServer()\r
{\r
- server.reset();\r
- server = new ClientIPC (owner);\r
+ server.reset (new ClientIPC (owner));\r
sendRebuild();\r
}\r
\r
return true;\r
}\r
\r
- ScopedPointer<ClientIPC> server;\r
+ std::unique_ptr<ClientIPC> server;\r
\r
bool openedOk = false;\r
bool isRunningApp = false;\r
{\r
auto liveModules = project.getProjectRoot().getChildWithName (Ids::MODULES);\r
\r
- ScopedPointer<XmlElement> xml (XmlDocument::parse (project.getFile()));\r
+ std::unique_ptr<XmlElement> xml (XmlDocument::parse (project.getFile()));\r
\r
if (xml == nullptr || ! xml->hasTagName (Ids::JUCERPROJECT.toString()))\r
return false;\r
void CompileEngineChildProcess::createProcess()\r
{\r
jassert (process == nullptr);\r
- process = new ChildProcess (*this, project);\r
+ process.reset (new ChildProcess (*this, project));\r
\r
if (! process->openedOk)\r
process.reset();\r
\r
void CompileEngineChildProcess::handleAppLaunched()\r
{\r
- runningAppProcess = process;\r
+ runningAppProcess.reset (process.release());\r
runningAppProcess->isRunningApp = true;\r
createProcess();\r
}\r
void handleRedoInEditor (const String& className);\r
void handleMissingSystemHeaders();\r
\r
- typedef ReferenceCountedObjectPtr<CompileEngineChildProcess> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<CompileEngineChildProcess>;\r
\r
private:\r
//==============================================================================\r
class ChildProcess;\r
- ScopedPointer<ChildProcess> process, runningAppProcess;\r
+ std::unique_ptr<ChildProcess> process, runningAppProcess;\r
ClassDatabase::ClassList lastComponentList;\r
\r
struct Editor;\r
setParentProcessID (info[3].getHexValue32());\r
#endif\r
\r
- zombieKiller = new ZombiePatrol (*this);\r
+ zombieKiller.reset (new ZombiePatrol (*this));\r
}\r
\r
~ServerIPC()\r
\r
CompileEngineDLL dll;\r
LiveCodeBuilder liveCodeBuilder;\r
- ScopedPointer<ZombiePatrol> zombieKiller;\r
+ std::unique_ptr<ZombiePatrol> zombieKiller;\r
};\r
\r
//==============================================================================\r
StringArray info;\r
info.addTokens (commandLine.fromFirstOccurrenceOf (commandPrefix, false, false), commandTokenSeparator, "");\r
\r
- ScopedPointer<ServerIPC> ipc = new ServerIPC (info);\r
+ std::unique_ptr<ServerIPC> ipc (new ServerIPC (info));\r
\r
if (ipc->dll.isLoaded())\r
{\r
return "WINDOWS";\r
#elif JUCE_LINUX\r
return "LINUX";\r
- #endif\r
-\r
+ #else\r
// unknown platform?!\r
jassertfalse;\r
-\r
return {};\r
+ #endif\r
}\r
\r
//==============================================================================\r
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CompileEngineSettings)\r
};\r
note = 2\r
};\r
\r
- ScopedPointer<DiagnosticMessage> associatedDiagnostic;\r
+ std::unique_ptr<DiagnosticMessage> associatedDiagnostic;\r
String message;\r
String mainFile;\r
SourceCodeRange range;\r
StringPairArray responseHeaders;\r
\r
URL url = getDownloadUrl();\r
- ScopedPointer<InputStream> in = url.createInputStream (false, nullptr, nullptr,\r
- String(), timeoutMs, &responseHeaders,\r
- &statusCode, 0);\r
+ std::unique_ptr<InputStream> in (url.createInputStream (false, nullptr, nullptr,\r
+ String(), timeoutMs, &responseHeaders,\r
+ &statusCode, 0));\r
\r
if (in == nullptr || statusCode != 200)\r
return Result::fail ("Download error: cannot establish connection");\r
\r
private:\r
Project& project;\r
- ScopedPointer<ProjectExporter> exporter;\r
+ std::unique_ptr<ProjectExporter> exporter;\r
ValueTree configListTree;\r
int exporterIndex;\r
\r
if (selectedNodes.size() > 0)\r
{\r
auto* tree = getOwnerView();\r
- ScopedPointer<XmlElement> oldOpenness (tree->getOpennessState (false));\r
+ std::unique_ptr<XmlElement> oldOpenness (tree->getOpennessState (false));\r
\r
moveSelectedItemsTo (selectedNodes, insertIndex);\r
\r
public:\r
LiveBuildTab (CompileEngineChildProcess* child, String lastErrorMessage)\r
{\r
- addAndMakeVisible (settingsButton = new IconButton ("Settings", &getIcons().settings));\r
+ settingsButton.reset (new IconButton ("Settings", &getIcons().settings));\r
+ addAndMakeVisible (settingsButton.get());\r
settingsButton->onClick = [this]\r
{\r
if (auto* pcc = findParentComponentOfClass<ProjectContentComponent>())\r
isEnabled = false;\r
\r
errorMessage = getErrorMessage();\r
- errorMessageLabel = new Label ("Error", errorMessage);\r
+ errorMessageLabel.reset (new Label ("Error", errorMessage));\r
errorMessageLabel->setJustificationType (Justification::centred);\r
errorMessageLabel->setFont (Font (12.0f));\r
errorMessageLabel->setMinimumHorizontalScale (1.0f);\r
\r
- addAndMakeVisible (errorMessageLabel);\r
+ addAndMakeVisible (errorMessageLabel.get());\r
\r
if (showDownloadButton)\r
{\r
- addAndMakeVisible (downloadButton = new TextButton ("Download"));\r
+ downloadButton.reset (new TextButton ("Download"));\r
+ addAndMakeVisible (downloadButton.get());\r
downloadButton->onClick = [this] { downloadDLL(); };\r
}\r
\r
buttonText = "Re-enable";\r
}\r
\r
- addAndMakeVisible (enableButton = new TextButton (buttonText));\r
+ enableButton.reset (new TextButton (buttonText));\r
+ addAndMakeVisible (enableButton.get());\r
enableButton->onClick = [this]\r
{\r
if (auto* pcc = findParentComponentOfClass<ProjectContentComponent>())\r
private:\r
OwnedArray<ConcertinaHeader> headers;\r
ConcertinaPanel concertinaPanel;\r
- ScopedPointer<IconButton> settingsButton;\r
+ std::unique_ptr<IconButton> settingsButton;\r
\r
- ScopedPointer<TextButton> downloadButton, enableButton;\r
- ScopedPointer<Label> errorMessageLabel;\r
+ std::unique_ptr<TextButton> downloadButton, enableButton;\r
+ std::unique_ptr<Label> errorMessageLabel;\r
bool showDownloadButton;\r
bool showEnableButton;\r
\r
{\r
content->setComponentID (getUniqueName());\r
\r
- ScopedPointer<Component> comp (content);\r
+ std::unique_ptr<Component> comp (content);\r
\r
if (ProjectContentComponent* pcc = getProjectContentComponent())\r
pcc->setEditorComponent (comp.release(), nullptr);\r
{\r
if (hasAddButton)\r
{\r
- addAndMakeVisible (addButton = new IconButton ("Add", &getIcons().plus));\r
+ addButton.reset (new IconButton ("Add", &getIcons().plus));\r
+ addAndMakeVisible (addButton.get());\r
addButton->onClick = [this] { showAddMenu(); };\r
}\r
\r
if (hasSettingsButton)\r
{\r
- addAndMakeVisible (settingsButton = new IconButton ("Settings", &getIcons().settings));\r
+ settingsButton.reset (new IconButton ("Settings", &getIcons().settings));\r
+ addAndMakeVisible (settingsButton.get());\r
settingsButton->onClick = [this] { showSettings(); };\r
}\r
\r
if (hasFindPanel)\r
{\r
- addAndMakeVisible (findPanel = new FindPanel ([this] (const String& filter) { treeToDisplay->rootItem->setSearchFilter (filter); }));\r
+ findPanel.reset (new FindPanel ([this] (const String& filter) { treeToDisplay->rootItem->setSearchFilter (filter); }));\r
+ addAndMakeVisible (findPanel.get());\r
}\r
\r
- addAndMakeVisible (treeToDisplay);\r
+ addAndMakeVisible (treeToDisplay.get());\r
}\r
\r
~ConcertinaTreeComponent()\r
TreePanelBase* getTree() const noexcept { return treeToDisplay.get(); }\r
\r
private:\r
- ScopedPointer<TreePanelBase> treeToDisplay;\r
- ScopedPointer<IconButton> addButton, settingsButton;\r
- ScopedPointer<FindPanel> findPanel;\r
+ std::unique_ptr<TreePanelBase> treeToDisplay;\r
+ std::unique_ptr<IconButton> addButton, settingsButton;\r
+ std::unique_ptr<FindPanel> findPanel;\r
\r
void showAddMenu()\r
{\r
\r
Component* refreshComponentForRow (int rowNumber, bool /*isRowSelected*/, Component* existingComponentToUpdate) override\r
{\r
- ScopedPointer<Component> existing (existingComponentToUpdate);\r
+ std::unique_ptr<Component> existing (existingComponentToUpdate);\r
\r
if (rowNumber < getNumRows())\r
{\r
\r
exporterBox.onChange = [this] { updateExporterButton(); };\r
\r
- addAndMakeVisible (juceIcon = new ImageComponent ("icon"));\r
+ juceIcon.reset (new ImageComponent ("icon"));\r
+ addAndMakeVisible (juceIcon.get());\r
juceIcon->setImage (ImageCache::getFromMemory (BinaryData::juce_icon_png, BinaryData::juce_icon_pngSize),\r
RectanglePlacement::centred);\r
\r
{\r
auto& icons = getIcons();\r
\r
- addAndMakeVisible (projectSettingsButton = new IconButton ("Project Settings", &icons.settings));\r
+ projectSettingsButton.reset (new IconButton ("Project Settings", &icons.settings));\r
+ addAndMakeVisible (projectSettingsButton.get());\r
projectSettingsButton->onClick = [this]\r
{\r
sendProjectButtonAnalyticsEvent ("Project Settings");\r
pcc->showProjectSettings();\r
};\r
\r
- addAndMakeVisible (saveAndOpenInIDEButton = new IconButton ("Save and Open in IDE", nullptr));\r
+ saveAndOpenInIDEButton.reset (new IconButton ("Save and Open in IDE", nullptr));\r
+ addAndMakeVisible (saveAndOpenInIDEButton.get());\r
saveAndOpenInIDEButton->isIDEButton = true;\r
saveAndOpenInIDEButton->onClick = [this]\r
{\r
pcc->openInSelectedIDE (true);\r
};\r
\r
- addAndMakeVisible (userSettingsButton = new IconButton ("User Settings", &icons.user));\r
+ userSettingsButton.reset (new IconButton ("User Settings", &icons.user));\r
+ addAndMakeVisible (userSettingsButton.get());\r
userSettingsButton->isUserButton = true;\r
userSettingsButton->onClick = [this]\r
{\r
showUserSettings();\r
};\r
\r
- addAndMakeVisible (runAppButton = new IconButton ("Run Application", &icons.play));\r
+ runAppButton.reset (new IconButton ("Run Application", &icons.play));\r
+ addAndMakeVisible (runAppButton.get());\r
runAppButton->onClick = [this]\r
{\r
sendProjectButtonAnalyticsEvent ("Run Application");\r
Label configLabel { "Config Label", "Selected exporter" },\r
projectNameLabel;\r
\r
- ScopedPointer<ImageComponent> juceIcon;\r
- ScopedPointer<IconButton> projectSettingsButton, saveAndOpenInIDEButton, userSettingsButton, runAppButton;\r
+ std::unique_ptr<ImageComponent> juceIcon;\r
+ std::unique_ptr<IconButton> projectSettingsButton, saveAndOpenInIDEButton, userSettingsButton, runAppButton;\r
\r
SafePointer<CallOutBox> userSettingsWindow;\r
\r
#include "../../Application/jucer_Headers.h"\r
#include "jucer_ProjectContentComponent.h"\r
#include "../../LiveBuildEngine/jucer_DownloadCompileEngineThread.h"\r
+#include "../../LiveBuildEngine/jucer_CompileEngineSettings.h"\r
\r
#include "jucer_HeaderComponent.h"\r
#include "Sidebar/jucer_TabComponents.h"\r
{\r
LogoComponent()\r
{\r
- ScopedPointer<XmlElement> svg (XmlDocument::parse (BinaryData::background_logo_svg));\r
- logo = Drawable::createFromSVG (*svg);\r
+ std::unique_ptr<XmlElement> svg (XmlDocument::parse (BinaryData::background_logo_svg));\r
+ logo.reset (Drawable::createFromSVG (*svg));\r
}\r
\r
void paint (Graphics& g) override\r
+ ProjucerApplication::getApp().getVersionDescription();\r
}\r
\r
- ScopedPointer<Drawable> logo;\r
+ std::unique_ptr<Drawable> logo;\r
};\r
\r
//==============================================================================\r
setOpaque (true);\r
setWantsKeyboardFocus (true);\r
\r
- addAndMakeVisible (logo = new LogoComponent());\r
- addAndMakeVisible (header = new HeaderComponent());\r
+ logo.reset (new LogoComponent());\r
+ addAndMakeVisible (logo.get());\r
\r
- addAndMakeVisible (fileNameLabel = new Label());\r
+ header.reset (new HeaderComponent());\r
+ addAndMakeVisible (header.get());\r
+\r
+ fileNameLabel.reset (new Label());\r
+ addAndMakeVisible (fileNameLabel.get());\r
fileNameLabel->setJustificationType (Justification::centred);\r
\r
sidebarSizeConstrainer.setMinimumWidth (200);\r
.getFloatValue());\r
\r
//======================================================================\r
- addAndMakeVisible (resizerBar = new ResizableEdgeComponent (&sidebarTabs, &sidebarSizeConstrainer,\r
- ResizableEdgeComponent::rightEdge));\r
+ resizerBar.reset (new ResizableEdgeComponent (&sidebarTabs, &sidebarSizeConstrainer,\r
+ ResizableEdgeComponent::rightEdge));\r
+ addAndMakeVisible (resizerBar.get());\r
resizerBar->setAlwaysOnTop (true);\r
\r
project->addChangeListener (this);\r
{\r
if (project != nullptr)\r
{\r
- ScopedPointer<XmlElement> xml (recentDocumentList.createXML());\r
+ std::unique_ptr<XmlElement> xml (recentDocumentList.createXML());\r
\r
if (xml != nullptr)\r
- project->getStoredProperties().setValue ("lastDocs", xml);\r
+ project->getStoredProperties().setValue ("lastDocs", xml.get());\r
}\r
}\r
\r
{\r
if (project != nullptr)\r
{\r
- ScopedPointer<XmlElement> xml (project->getStoredProperties().getXmlValue ("lastDocs"));\r
+ std::unique_ptr<XmlElement> xml (project->getStoredProperties().getXmlValue ("lastDocs"));\r
\r
if (xml != nullptr)\r
{\r
{\r
auto* viewport = new ContentViewport (editor);\r
\r
- contentView = viewport;\r
+ contentView.reset (viewport);\r
currentDocument = nullptr;\r
fileNameLabel->setVisible (false);\r
\r
}\r
else\r
{\r
- contentView = editor;\r
+ contentView.reset (editor);\r
currentDocument = doc;\r
fileNameLabel->setText (doc->getFile().getFileName(), dontSendNotification);\r
fileNameLabel->setVisible (true);\r
Project* project = nullptr;\r
OpenDocumentManager::Document* currentDocument = nullptr;\r
RecentDocumentList recentDocumentList;\r
- ScopedPointer<Component> logo, translationTool, contentView, header;\r
+ std::unique_ptr<Component> logo, translationTool, contentView, header;\r
\r
TabbedComponent sidebarTabs { TabbedButtonBar::TabsAtTop };\r
- ScopedPointer<ResizableEdgeComponent> resizerBar;\r
+ std::unique_ptr<ResizableEdgeComponent> resizerBar;\r
ComponentBoundsConstrainer sidebarSizeConstrainer;\r
\r
BubbleMessageComponent bubbleMessage;\r
ReferenceCountedObjectPtr<CompileEngineChildProcess> childProcess;\r
bool isForeground = false;\r
\r
- ScopedPointer<Label> fileNameLabel;\r
+ std::unique_ptr<Label> fileNameLabel;\r
\r
int lastViewedTab = 0;\r
\r
\r
if (line.startsWith ("/**") && line.containsIgnoreCase ("Config:"))\r
{\r
- ScopedPointer<Project::ConfigFlag> config (new Project::ConfigFlag());\r
+ std::unique_ptr<Project::ConfigFlag> config (new Project::ConfigFlag());\r
config->sourceModuleID = getID();\r
config->symbol = line.fromFirstOccurrenceOf (":", false, false).trim();\r
\r
#include "jucer_Project.h"\r
#include "../ProjectSaving/jucer_ProjectSaver.h"\r
#include "../Application/jucer_Application.h"\r
+#include "../LiveBuildEngine/jucer_CompileEngineSettings.h"\r
\r
namespace\r
{\r
\r
projectRoot.addListener (this);\r
\r
+ compileEngineSettings.reset (new CompileEngineSettings (projectRoot));\r
+\r
setChangedFlag (false);\r
modificationTime = getFile().getLastModificationTime();\r
}\r
{\r
projectNameValue.referTo (projectRoot, Ids::name, getUndoManager(), "JUCE Project");\r
projectUIDValue.referTo (projectRoot, Ids::ID, getUndoManager(), createAlphaNumericUID());\r
+\r
+ if (projectUIDValue.isUsingDefault())\r
+ projectUIDValue = projectUIDValue.getDefault();\r
+\r
projectTypeValue.referTo (projectRoot, Ids::projectType, getUndoManager(), ProjectType_GUIApp::getTypeName());\r
versionValue.referTo (projectRoot, Ids::version, getUndoManager(), "1.0.0");\r
bundleIdentifierValue.referTo (projectRoot, Ids::bundleIdentifier, getUndoManager(), getDefaultBundleIdentifierString());\r
\r
void Project::initialiseAudioPluginValues()\r
{\r
- pluginFormatsValue.referTo (projectRoot, Ids::pluginFormats, getUndoManager(), Array<var> (Ids::buildVST.toString(), Ids::buildAU.toString()), ",");\r
+ pluginFormatsValue.referTo (projectRoot, Ids::pluginFormats, getUndoManager(),\r
+ Array<var> (Ids::buildVST.toString(), Ids::buildAU.toString(), Ids::buildStandalone.toString()), ",");\r
pluginCharacteristicsValue.referTo (projectRoot, Ids::pluginCharacteristicsValue, getUndoManager(), Array<var> (), ",");\r
\r
pluginNameValue.referTo (projectRoot, Ids::pluginName, getUndoManager(), getProjectNameString());\r
pluginAAXCategoryValue = aaxCategory;\r
else if (getAllAAXCategoryStrings().contains (aaxCategory))\r
pluginAAXCategoryValue = Array<var> (getAllAAXCategoryVars()[getAllAAXCategoryStrings().indexOf (aaxCategory)]);\r
- else\r
- pluginAAXCategoryValue.resetToDefault();\r
}\r
\r
{\r
pluginRTASCategoryValue = rtasCategory;\r
else if (getAllRTASCategoryStrings().contains (rtasCategory))\r
pluginRTASCategoryValue = Array<var> (getAllRTASCategoryVars()[getAllRTASCategoryStrings().indexOf (rtasCategory)]);\r
- else\r
- pluginRTASCategoryValue.resetToDefault();\r
}\r
\r
{\r
//==============================================================================\r
Result Project::loadDocument (const File& file)\r
{\r
- ScopedPointer<XmlElement> xml (XmlDocument::parse (file));\r
+ std::unique_ptr<XmlElement> xml (XmlDocument::parse (file));\r
\r
if (xml == nullptr || ! xml->hasTagName (Ids::JUCERPROJECT.toString()))\r
return Result::fail ("Not a valid Jucer project!");\r
if (! ProjucerApplication::getApp().isRunningCommandLine)\r
warnAboutOldProjucerVersion();\r
\r
+ compileEngineSettings.reset (new CompileEngineSettings (projectRoot));\r
+\r
return Result::ok();\r
}\r
\r
\r
bool Project::saveProjectRootToFile()\r
{\r
- ScopedPointer<XmlElement> xml (projectRoot.createXml());\r
+ std::unique_ptr<XmlElement> xml (projectRoot.createXml());\r
\r
if (xml == nullptr)\r
{\r
for (auto& category : selected)\r
categories.add (category);\r
\r
+ // "Fx" and "Instrument" should come first and if both are present prioritise "Fx"\r
+ if (categories.contains ("Instrument"))\r
+ categories.move (categories.indexOf ("Instrument"), 0);\r
+\r
+ if (categories.contains ("Fx"))\r
+ categories.move (categories.indexOf ("Fx"), 0);\r
+\r
return categories.joinIntoString ("|");\r
}\r
\r
\r
StringArray Project::getAllVST3CategoryStrings() noexcept\r
{\r
- static StringArray vst3CategoryStrings { "Fx", "Instrument", "Spatial", "Analyzer", "Delay", "Distortion", "EQ", "Filter", "Generator", "Mastering",\r
- "Modulation", "Pitch Shift", "Restoration", "Reverb", "Surround", "Tools", "Network", "Drum", "Sampler",\r
- "Synth", "External", "OnlyRT", "OnlyOfflineProcess", "NoOfflineProcess", "Up-Downmix" };\r
+ static StringArray vst3CategoryStrings { "Fx", "Instrument", "Analyzer", "Delay", "Distortion", "Drum", "Dynamics", "EQ", "External", "Filter",\r
+ "Generator", "Mastering", "Modulation", "Mono", "Network", "NoOfflineProcess", "OnlyOfflineProcess", "OnlyRT",\r
+ "Pitch Shift", "Restoration", "Reverb", "Sampler", "Spatial", "Stereo", "Surround", "Synth", "Tools", "Up-Downmix" };\r
\r
return vst3CategoryStrings;\r
}\r
EnabledModuleList& Project::getModules()\r
{\r
if (enabledModulesList == nullptr)\r
- enabledModulesList = new EnabledModuleList (*this, projectRoot.getOrCreateChildWithName (Ids::MODULES, nullptr));\r
+ enabledModulesList.reset (new EnabledModuleList (*this, projectRoot.getOrCreateChildWithName (Ids::MODULES, nullptr)));\r
\r
return *enabledModulesList;\r
}\r
\r
void Project::addNewExporter (const String& exporterName)\r
{\r
- ScopedPointer<ProjectExporter> exp (ProjectExporter::createNewExporter (*this, exporterName));\r
+ std::unique_ptr<ProjectExporter> exp (ProjectExporter::createNewExporter (*this, exporterName));\r
\r
exp->getTargetLocationValue() = exp->getTargetLocationString()\r
+ getUniqueTargetFolderSuffixForExporter (exp->getName(), exp->getTargetLocationString());\r
if (++index >= project.getNumExporters())\r
return false;\r
\r
- exporter = project.createExporter (index);\r
+ exporter.reset (project.createExporter (index));\r
\r
if (exporter == nullptr)\r
{\r
#pragma once\r
\r
#include "jucer_ProjectType.h"\r
-#include "../LiveBuildEngine/jucer_CompileEngineSettings.h"\r
\r
class ProjectExporter;\r
class LibraryModule;\r
class EnabledModuleList;\r
class ProjectContentComponent;\r
+class CompileEngineSettings;\r
\r
//==============================================================================\r
class Project : public FileBasedDocument,\r
ProjectExporter& operator*() const { return *exporter; }\r
ProjectExporter* operator->() const { return exporter.get(); }\r
\r
- ScopedPointer<ProjectExporter> exporter;\r
+ std::unique_ptr<ProjectExporter> exporter;\r
int index;\r
\r
private:\r
bool shouldSendGUIBuilderAnalyticsEvent() noexcept;\r
\r
//==============================================================================\r
- CompileEngineSettings& getCompileEngineSettings() { return compileEngineSettings; }\r
+ CompileEngineSettings& getCompileEngineSettings() { return *compileEngineSettings; }\r
\r
private:\r
ValueTree projectRoot { Ids::JUCERPROJECT };\r
pluginAUMainTypeValue, pluginRTASCategoryValue, pluginVSTCategoryValue, pluginVST3CategoryValue, pluginAAXCategoryValue;\r
\r
//==============================================================================\r
- CompileEngineSettings compileEngineSettings { projectRoot };\r
+ std::unique_ptr<CompileEngineSettings> compileEngineSettings;\r
\r
//==============================================================================\r
bool shouldWriteLegacyPluginFormatSettings = false;\r
\r
//==============================================================================\r
friend class Item;\r
- ScopedPointer<EnabledModuleList> enabledModulesList;\r
+ std::unique_ptr<EnabledModuleList> enabledModulesList;\r
bool isSaving = false;\r
Time modificationTime;\r
StringPairArray parsedPreprocessorDefs;\r
ValueWithDefault androidJavaLibs, androidRepositories, androidDependencies, androidScreenOrientation, androidActivityClass,\r
androidActivitySubClassName, androidActivityBaseClassName, androidManifestCustomXmlElements, androidVersionCode,\r
androidMinimumSDK, androidTheme, androidSharedLibraries, androidStaticLibraries, androidExtraAssetsFolder,\r
- androidOboeRepositoryPath, androidInternetNeeded, androidMicNeeded, androidBluetoothNeeded, androidExternalReadPermission,\r
+ androidOboeRepositoryPath, androidInternetNeeded, androidMicNeeded, androidCameraNeeded, androidBluetoothNeeded, androidExternalReadPermission,\r
androidExternalWritePermission, androidInAppBillingPermission, androidVibratePermission,androidOtherPermissions,\r
androidEnableRemoteNotifications, androidRemoteNotificationsConfigFile, androidEnableContentSharing, androidKeyStore,\r
androidKeyStorePass, androidKeyAlias, androidKeyAliasPass, gradleVersion, gradleToolchain, androidPluginVersion, buildToolsVersion;\r
androidOboeRepositoryPath (settings, Ids::androidOboeRepositoryPath, getUndoManager()),\r
androidInternetNeeded (settings, Ids::androidInternetNeeded, getUndoManager(), true),\r
androidMicNeeded (settings, Ids::microphonePermissionNeeded, getUndoManager(), false),\r
+ androidCameraNeeded (settings, Ids::cameraPermissionNeeded, getUndoManager(), false),\r
androidBluetoothNeeded (settings, Ids::androidBluetoothNeeded, getUndoManager(), true),\r
androidExternalReadPermission (settings, Ids::androidExternalReadNeeded, getUndoManager(), true),\r
androidExternalWritePermission (settings, Ids::androidExternalWriteNeeded, getUndoManager(), true),\r
props.add (new ChoicePropertyComponent (androidMicNeeded, "Audio Input Required"),\r
"If enabled, this will set the android.permission.RECORD_AUDIO flag in the manifest.");\r
\r
+ props.add (new ChoicePropertyComponent (androidCameraNeeded, "Camera Required"),\r
+ "If enabled, this will set the android.permission.CAMERA flag in the manifest.");\r
+\r
props.add (new ChoicePropertyComponent (androidBluetoothNeeded, "Bluetooth permissions Required"),\r
"If enabled, this will set the android.permission.BLUETOOTH and android.permission.BLUETOOTH_ADMIN flag in the manifest. This is required for Bluetooth MIDI on Android.");\r
\r
\r
createDirectoryOrThrow (targetFolder);\r
\r
+ auto activityCode = getActivityCode (javaSourceFolder, className, package);\r
+\r
auto javaDestFile = targetFolder.getChildFile (className + ".java");\r
+ overwriteFileIfDifferentOrThrow (javaDestFile, activityCode);\r
+ }\r
+\r
+ String getActivityCode (const File& javaSourceFolder, const String& className, const String& package) const\r
+ {\r
+ auto runtimePermissionsCode = getRuntimePermissionsCode (javaSourceFolder, className);\r
+ auto midiCode = getMidiCode (javaSourceFolder, className);\r
+ auto webViewCode = getWebViewCode (javaSourceFolder);\r
+ auto cameraCode = getCameraCode (javaSourceFolder);\r
+\r
+ auto javaSourceFile = javaSourceFolder.getChildFile ("JuceAppActivity.java");\r
+ auto javaSourceLines = StringArray::fromLines (javaSourceFile.loadFileAsString());\r
+\r
+ {\r
+ MemoryOutputStream newFile;\r
+\r
+ for (auto& line : javaSourceLines)\r
+ {\r
+ if (line.contains ("$$JuceAndroidMidiImports$$"))\r
+ newFile << midiCode.imports;\r
+ else if (line.contains ("$$JuceAndroidMidiCode$$"))\r
+ newFile << midiCode.main;\r
+ else if (line.contains ("$$JuceAndroidRuntimePermissionsCode$$"))\r
+ newFile << runtimePermissionsCode;\r
+ else if (line.contains ("$$JuceAndroidWebViewImports$$"))\r
+ newFile << webViewCode.imports;\r
+ else if (line.contains ("$$JuceAndroidWebViewNativeCode$$"))\r
+ newFile << webViewCode.native;\r
+ else if (line.contains ("$$JuceAndroidWebViewCode$$"))\r
+ newFile << webViewCode.main;\r
+ else if (line.contains ("$$JuceAndroidCameraImports$$"))\r
+ newFile << cameraCode.imports;\r
+ else if (line.contains ("$$JuceAndroidCameraCode$$"))\r
+ newFile << cameraCode.main;\r
+ else\r
+ newFile << line.replace ("$$JuceAppActivityBaseClass$$", androidActivityBaseClassName.get().toString())\r
+ .replace ("JuceAppActivity", className)\r
+ .replace ("package com.juce;", "package " + package + ";") << newLine;\r
+ }\r
+\r
+ javaSourceLines = StringArray::fromLines (newFile.toString());\r
+ }\r
+\r
+ while (javaSourceLines.size() > 2\r
+ && javaSourceLines[javaSourceLines.size() - 1].trim().isEmpty()\r
+ && javaSourceLines[javaSourceLines.size() - 2].trim().isEmpty())\r
+ javaSourceLines.remove (javaSourceLines.size() - 1);\r
+\r
+ return javaSourceLines.joinIntoString (newLine);\r
+ }\r
+\r
+ String getRuntimePermissionsCode (const File& javaSourceFolder, const String& className) const\r
+ {\r
+ if (static_cast<int> (androidMinimumSDK.get()) >= 23)\r
+ {\r
+ auto javaRuntimePermissions = javaSourceFolder.getChildFile ("AndroidRuntimePermissions.java");\r
+ return javaRuntimePermissions.loadFileAsString().replace ("JuceAppActivity", className);\r
+ }\r
+\r
+ return {};\r
+ }\r
\r
+ struct MidiCode\r
+ {\r
+ String imports;\r
+ String main;\r
+ };\r
\r
- String juceMidiCode, juceMidiImports, juceRuntimePermissionsCode;\r
+ MidiCode getMidiCode (const File& javaSourceFolder, const String& className) const\r
+ {\r
+ String juceMidiCode, juceMidiImports;\r
\r
juceMidiImports << newLine;\r
\r
if (static_cast<int> (androidMinimumSDK.get()) >= 23)\r
{\r
auto javaAndroidMidi = javaSourceFolder.getChildFile ("AndroidMidi.java");\r
- auto javaRuntimePermissions = javaSourceFolder.getChildFile ("AndroidRuntimePermissions.java");\r
\r
juceMidiImports << "import android.media.midi.*;" << newLine\r
<< "import android.bluetooth.*;" << newLine\r
<< "import android.bluetooth.le.*;" << newLine;\r
\r
juceMidiCode = javaAndroidMidi.loadFileAsString().replace ("JuceAppActivity", className);\r
-\r
- juceRuntimePermissionsCode = javaRuntimePermissions.loadFileAsString().replace ("JuceAppActivity", className);\r
}\r
else\r
{\r
.replace ("JuceAppActivity", className);\r
}\r
\r
+ return { juceMidiImports, juceMidiCode };\r
+ }\r
+\r
+ struct WebViewCode\r
+ {\r
+ String imports;\r
+ String native;\r
+ String main;\r
+ };\r
+\r
+ WebViewCode getWebViewCode (const File& javaSourceFolder) const\r
+ {\r
String juceWebViewImports, juceWebViewCodeNative, juceWebViewCode;\r
\r
if (static_cast<int> (androidMinimumSDK.get()) >= 23)\r
}\r
}\r
\r
- auto javaSourceFile = javaSourceFolder.getChildFile ("JuceAppActivity.java");\r
- auto javaSourceLines = StringArray::fromLines (javaSourceFile.loadFileAsString());\r
+ return { juceWebViewImports, juceWebViewCodeNative, juceWebViewCode };\r
+ }\r
\r
- {\r
- MemoryOutputStream newFile;\r
+ struct CameraCode\r
+ {\r
+ String imports;\r
+ String main;\r
+ };\r
\r
- for (auto& line : javaSourceLines)\r
- {\r
- if (line.contains ("$$JuceAndroidMidiImports$$"))\r
- newFile << juceMidiImports;\r
- else if (line.contains ("$$JuceAndroidMidiCode$$"))\r
- newFile << juceMidiCode;\r
- else if (line.contains ("$$JuceAndroidRuntimePermissionsCode$$"))\r
- newFile << juceRuntimePermissionsCode;\r
- else if (line.contains ("$$JuceAndroidWebViewImports$$"))\r
- newFile << juceWebViewImports;\r
- else if (line.contains ("$$JuceAndroidWebViewNativeCode$$"))\r
- newFile << juceWebViewCodeNative;\r
- else if (line.contains ("$$JuceAndroidWebViewCode$$"))\r
- newFile << juceWebViewCode;\r
- else\r
- newFile << line.replace ("$$JuceAppActivityBaseClass$$", androidActivityBaseClassName.get().toString())\r
- .replace ("JuceAppActivity", className)\r
- .replace ("package com.juce;", "package " + package + ";") << newLine;\r
- }\r
+ CameraCode getCameraCode (const File& javaSourceFolder) const\r
+ {\r
+ String juceCameraImports, juceCameraCode;\r
\r
- javaSourceLines = StringArray::fromLines (newFile.toString());\r
- }\r
+ if (static_cast<int> (androidMinimumSDK.get()) >= 21)\r
+ juceCameraImports << "import android.hardware.camera2.*;" << newLine;\r
\r
- while (javaSourceLines.size() > 2\r
- && javaSourceLines[javaSourceLines.size() - 1].trim().isEmpty()\r
- && javaSourceLines[javaSourceLines.size() - 2].trim().isEmpty())\r
- javaSourceLines.remove (javaSourceLines.size() - 1);\r
+ auto javaCameraFile = javaSourceFolder.getChildFile ("AndroidCamera.java");\r
+ auto juceCameraCodeAll = javaCameraFile.loadFileAsString();\r
\r
- overwriteFileIfDifferentOrThrow (javaDestFile, javaSourceLines.joinIntoString (newLine));\r
+ if (static_cast<int> (androidMinimumSDK.get()) >= 21)\r
+ {\r
+ juceCameraCode << juceCameraCodeAll.fromFirstOccurrenceOf ("$$CameraApi21", false, false)\r
+ .upToFirstOccurrenceOf ("CameraApi21$$", false, false);\r
+ }\r
+\r
+ return { juceCameraImports, juceCameraCode };\r
}\r
\r
void copyAdditionalJavaFiles (const File& sourceFolder, const File& targetFolder) const\r
customStringsXmlContent << cfg.getCustomStringsXml();\r
customStringsXmlContent << "\n</resources>";\r
\r
- ScopedPointer<XmlElement> strings = XmlDocument::parse (customStringsXmlContent);\r
+ std::unique_ptr<XmlElement> strings (XmlDocument::parse (customStringsXmlContent));\r
\r
String dir = cfg.isDebug() ? "debug" : "release";\r
String subPath = "app/src/" + dir + "/res/values/string.xml";\r
\r
void writeAndroidManifest (const File& folder) const\r
{\r
- ScopedPointer<XmlElement> manifest (createManifestXML());\r
+ std::unique_ptr<XmlElement> manifest (createManifestXML());\r
\r
writeXmlOrThrow (*manifest, folder.getChildFile ("src/main/AndroidManifest.xml"), "utf-8", 100, true);\r
}\r
\r
void writeIcons (const File& folder) const\r
{\r
- ScopedPointer<Drawable> bigIcon (getBigIcon());\r
- ScopedPointer<Drawable> smallIcon (getSmallIcon());\r
+ std::unique_ptr<Drawable> bigIcon (getBigIcon());\r
+ std::unique_ptr<Drawable> smallIcon (getSmallIcon());\r
\r
if (bigIcon != nullptr && smallIcon != nullptr)\r
{\r
\r
if (! app->hasAttribute ("android:icon"))\r
{\r
- ScopedPointer<Drawable> bigIcon (getBigIcon()), smallIcon (getSmallIcon());\r
+ std::unique_ptr<Drawable> bigIcon (getBigIcon()), smallIcon (getSmallIcon());\r
\r
if (bigIcon != nullptr || smallIcon != nullptr)\r
app->setAttribute ("android:icon", "@drawable/icon");\r
if (androidMicNeeded.get())\r
s.add ("android.permission.RECORD_AUDIO");\r
\r
+ if (androidCameraNeeded.get())\r
+ s.add ("android.permission.CAMERA");\r
+\r
if (androidBluetoothNeeded.get())\r
{\r
s.add ("android.permission.BLUETOOTH");\r
==============================================================================\r
*/\r
\r
+#pragma once\r
+\r
#include "jucer_ProjectExport_CodeBlocks.h"\r
#include "jucer_ProjectExport_Make.h"\r
#include "jucer_ProjectExport_Xcode.h"\r
\r
+//==============================================================================\r
class CLionProjectExporter : public ProjectExporter\r
{\r
protected:\r
\r
for (auto& exporterName : getExporterNames())\r
{\r
- ScopedPointer<ProjectExporter> exporter = createNewExporter (getProject(), exporterName);\r
+ std::unique_ptr<ProjectExporter> exporter (createNewExporter (getProject(), exporterName));\r
\r
if (isExporterSupported (*exporter))\r
description << exporter->getName() << newLine;\r
{\r
auto plistFile = exporter.getTargetFolder().getChildFile (targetAttributes["INFOPLIST_FILE"]);\r
XmlDocument infoPlistData (plistFile);\r
- ScopedPointer<XmlElement> plist = infoPlistData.getDocumentElement();\r
+ std::unique_ptr<XmlElement> plist (infoPlistData.getDocumentElement());\r
\r
if (plist != nullptr)\r
{\r
}\r
\r
//==============================================================================\r
- class MSVCBuildConfiguration : public BuildConfiguration\r
+ class MSVCBuildConfiguration : public BuildConfiguration,\r
+ private Value::Listener\r
{\r
public:\r
MSVCBuildConfiguration (Project& p, const ValueTree& settings, const ProjectExporter& e)\r
architectureTypeValue (config, Ids::winArchitecture, getUndoManager(), get64BitArchName()),\r
fastMathValue (config, Ids::fastMath, getUndoManager()),\r
debugInformationFormatValue (config, Ids::debugInformationFormat, getUndoManager(), isDebug() ? "ProgramDatabase" : "None"),\r
- pluginBinaryCopyStepValue (config, Ids::enablePluginBinaryCopyStep, getUndoManager(), false)\r
+ pluginBinaryCopyStepValue (config, Ids::enablePluginBinaryCopyStep, getUndoManager(), false),\r
+ vstBinaryLocation (config, Ids::vstBinaryLocation, getUndoManager()),\r
+ vst3BinaryLocation (config, Ids::vst3BinaryLocation, getUndoManager()),\r
+ rtasBinaryLocation (config, Ids::rtasBinaryLocation, getUndoManager()),\r
+ aaxBinaryLocation (config, Ids::aaxBinaryLocation, getUndoManager())\r
{\r
if (! isDebug())\r
updateOldLTOSetting();\r
\r
- initialisePluginDefaultValues();\r
-\r
+ setPluginBinaryCopyLocationDefaults();\r
optimisationLevelValue.setDefault (isDebug() ? optimisationOff : optimiseFull);\r
+\r
+ architectureValueToListenTo = architectureTypeValue.getPropertyAsValue();\r
+ architectureValueToListenTo.addListener (this);\r
}\r
\r
//==============================================================================\r
\r
ValueWithDefault vstBinaryLocation, vst3BinaryLocation, rtasBinaryLocation, aaxBinaryLocation;\r
\r
+ Value architectureValueToListenTo;\r
+\r
//==============================================================================\r
void updateOldLTOSetting()\r
{\r
\r
}\r
\r
- void initialisePluginDefaultValues()\r
+ void setPluginBinaryCopyLocationDefaults()\r
{\r
- vstBinaryLocation.referTo (config, Ids::vstBinaryLocation, getUndoManager(), ((is64Bit() ? "%ProgramW6432%"\r
- : "%programfiles(x86)%") + String ("\\Steinberg\\Vstplugins")));\r
+ vstBinaryLocation.setDefault ((is64Bit() ? "%ProgramW6432%" : "%programfiles(x86)%") + String ("\\Steinberg\\Vstplugins"));\r
\r
auto prefix = is64Bit() ? "%CommonProgramW6432%"\r
: "%CommonProgramFiles(x86)%";\r
\r
- vst3BinaryLocation.referTo (config, Ids::vst3BinaryLocation, getUndoManager(), prefix + String ("\\VST3"));\r
- rtasBinaryLocation.referTo (config, Ids::rtasBinaryLocation, getUndoManager(), prefix + String ("\\Digidesign\\DAE\\Plug-Ins"));\r
- aaxBinaryLocation.referTo (config, Ids::aaxBinaryLocation, getUndoManager(), prefix + String ("\\Avid\\Audio\\Plug-Ins"));\r
+ vst3BinaryLocation.setDefault (prefix + String ("\\VST3"));\r
+ rtasBinaryLocation.setDefault (prefix + String ("\\Digidesign\\DAE\\Plug-Ins"));\r
+ aaxBinaryLocation.setDefault (prefix + String ("\\Avid\\Audio\\Plug-Ins"));\r
+ }\r
+\r
+ void valueChanged (Value&) override\r
+ {\r
+ setPluginBinaryCopyLocationDefaults();\r
}\r
};\r
\r
manifest->addTextElement (config.shouldGenerateManifest() ? "true" : "false");\r
}\r
\r
- auto librarySearchPaths = getLibrarySearchPaths (config);\r
- if (librarySearchPaths.size() > 0)\r
+ if (type != SharedCodeTarget)\r
{\r
- auto* libPath = props->createNewChildElement ("LibraryPath");\r
- setConditionAttribute (*libPath, config);\r
- libPath->addTextElement ("$(LibraryPath);" + librarySearchPaths.joinIntoString (";"));\r
+ auto librarySearchPaths = getLibrarySearchPaths (config);\r
+ if (librarySearchPaths.size() > 0)\r
+ {\r
+ auto* libPath = props->createNewChildElement ("LibraryPath");\r
+ setConditionAttribute (*libPath, config);\r
+ libPath->addTextElement ("$(LibraryPath);" + librarySearchPaths.joinIntoString (";"));\r
+ }\r
}\r
}\r
}\r
}\r
\r
auto externalLibraries = getExternalLibraries (config, getOwner().getExternalLibrariesString());\r
- auto additionalDependencies = externalLibraries.isNotEmpty() ? getOwner().replacePreprocessorTokens (config, externalLibraries).trim() + ";%(AdditionalDependencies)"\r
- : String();\r
+ auto additionalDependencies = type != SharedCodeTarget && externalLibraries.isNotEmpty()\r
+ ? getOwner().replacePreprocessorTokens (config, externalLibraries).trim() + ";%(AdditionalDependencies)"\r
+ : String();\r
+\r
auto librarySearchPaths = config.getLibrarySearchPaths();\r
- auto additionalLibraryDirs = librarySearchPaths.size() > 0 ? getOwner().replacePreprocessorTokens (config, librarySearchPaths.joinIntoString (";")) + ";%(AdditionalLibraryDirectories)"\r
- : String();\r
+ auto additionalLibraryDirs = type != SharedCodeTarget && librarySearchPaths.size() > 0\r
+ ? getOwner().replacePreprocessorTokens (config, librarySearchPaths.joinIntoString (";")) + ";%(AdditionalLibraryDirectories)"\r
+ : String();\r
\r
{\r
auto* link = group->createNewChildElement ("Link");\r
bsc->createNewChildElement ("OutputFile")->addTextElement (getOwner().getIntDirFile (config, config.getOutputFilename (".bsc", true)));\r
}\r
\r
+ if (type != SharedCodeTarget)\r
{\r
auto* lib = group->createNewChildElement ("Lib");\r
\r
->addTextElement (postBuild);\r
}\r
\r
- ScopedPointer<XmlElement> otherFilesGroup (new XmlElement ("ItemGroup"));\r
+ std::unique_ptr<XmlElement> otherFilesGroup (new XmlElement ("ItemGroup"));\r
\r
{\r
auto* cppFiles = projectXml.createNewChildElement ("ItemGroup");\r
if (otherFilesGroup->getFirstChildElement() != nullptr)\r
projectXml.addChildElement (otherFilesGroup.release());\r
\r
- if (getOwner().hasResourceFile())\r
+ if (type != SharedCodeTarget && getOwner().hasResourceFile())\r
{\r
auto* rcGroup = projectXml.createNewChildElement ("ItemGroup");\r
auto* e = rcGroup->createNewChildElement ("ResourceCompile");\r
auto* groupsXml = filterXml.createNewChildElement ("ItemGroup");\r
auto* cpps = filterXml.createNewChildElement ("ItemGroup");\r
auto* headers = filterXml.createNewChildElement ("ItemGroup");\r
- ScopedPointer<XmlElement> otherFilesGroup (new XmlElement ("ItemGroup"));\r
+ std::unique_ptr<XmlElement> otherFilesGroup (new XmlElement ("ItemGroup"));\r
\r
for (int i = 0; i < getOwner().getAllGroups().size(); ++i)\r
{\r
if (otherFilesGroup->getFirstChildElement() != nullptr)\r
filterXml.addChildElement (otherFilesGroup.release());\r
\r
- if (getOwner().hasResourceFile())\r
+ if (type != SharedCodeTarget && getOwner().hasResourceFile())\r
{\r
auto* rcGroup = filterXml.createNewChildElement ("ItemGroup");\r
auto* e = rcGroup->createNewChildElement ("ResourceCompile");\r
const char* const osxVersionDefault = "10.11";\r
const char* const iosVersionDefault = "9.3";\r
\r
- const int oldestSDKVersion = 5;\r
+ const int oldestSDKVersion = 7;\r
const int currentSDKVersion = 13;\r
const int minimumAUv3SDKVersion = 11;\r
\r
extraFrameworksValue (settings, Ids::extraFrameworks, getUndoManager()),\r
postbuildCommandValue (settings, Ids::postbuildCommand, getUndoManager()),\r
prebuildCommandValue (settings, Ids::prebuildCommand, getUndoManager()),\r
- iosAppExtensionDuplicateResourcesFolderValue (settings, Ids::iosAppExtensionDuplicateResourcesFolder, getUndoManager()),\r
+ duplicateAppExResourcesFolderValue (settings, Ids::duplicateAppExResourcesFolder, getUndoManager(), true),\r
iosDeviceFamilyValue (settings, Ids::iosDeviceFamily, getUndoManager(), "1,2"),\r
iPhoneScreenOrientationValue (settings, Ids::iPhoneScreenOrientation, getUndoManager(), "portraitlandscape"),\r
iPadScreenOrientationValue (settings, Ids::iPadScreenOrientation, getUndoManager(), "portraitlandscape"),\r
customXcodeResourceFoldersValue (settings, Ids::customXcodeResourceFolders, getUndoManager()),\r
customXcassetsFolderValue (settings, Ids::customXcassetsFolder, getUndoManager()),\r
microphonePermissionNeededValue (settings, Ids::microphonePermissionNeeded, getUndoManager()),\r
- microphonePermissionsTextValue (settings, Ids::microphonePermissionsText, getUndoManager(), "This is an audio app which requires audio input. If you do not have a USB audio interface connected it will use the microphone."),\r
+ microphonePermissionsTextValue (settings, Ids::microphonePermissionsText, getUndoManager(),\r
+ "This is an audio app which requires audio input. If you do not have a USB audio interface connected it will use the microphone."),\r
+ cameraPermissionNeededValue (settings, Ids::cameraPermissionNeeded, getUndoManager()),\r
+ cameraPermissionTextValue (settings, Ids::cameraPermissionText, getUndoManager(),\r
+ "This app requires camera usage to function properly."),\r
uiFileSharingEnabledValue (settings, Ids::UIFileSharingEnabled, getUndoManager()),\r
uiSupportsDocumentBrowserValue (settings, Ids::UISupportsDocumentBrowser, getUndoManager()),\r
uiStatusBarHiddenValue (settings, Ids::UIStatusBarHidden, getUndoManager()),\r
String getPostBuildScript() const { return postbuildCommandValue.get(); }\r
String getPreBuildScript() const { return prebuildCommandValue.get(); }\r
\r
- bool shouldDuplicateResourcesFolderForAppExtension() const { return iosAppExtensionDuplicateResourcesFolderValue.get(); }\r
+ bool shouldDuplicateAppExResourcesFolder() const { return duplicateAppExResourcesFolderValue.get(); }\r
\r
String getDeviceFamilyString() const { return iosDeviceFamilyValue.get(); }\r
\r
bool isMicrophonePermissionEnabled() const { return microphonePermissionNeededValue.get(); }\r
String getMicrophonePermissionsTextString() const { return microphonePermissionsTextValue.get(); }\r
\r
+ bool isCameraPermissionEnabled() const { return cameraPermissionNeededValue.get(); }\r
+ String getCameraPermissionTextString() const { return cameraPermissionTextValue.get(); }\r
+\r
bool isInAppPurchasesEnabled() const { return iosInAppPurchasesValue.get(); }\r
bool isBackgroundAudioEnabled() const { return iosBackgroundAudioValue.get(); }\r
bool isBackgroundBleEnabled() const { return iosBackgroundBleValue.get(); }\r
"This way you can specify them for OS X and iOS separately, and modify the content of the resource folders "\r
"without re-saving the Projucer project.");\r
\r
+ if (getProject().getProjectType().isAudioPlugin())\r
+ props.add (new ChoicePropertyComponent (duplicateAppExResourcesFolderValue, "Add Duplicate Resources Folder to App Extension"),\r
+ "Disable this to prevent the Projucer from creating a duplicate resources folder for AUv3 app extensions.");\r
+\r
if (iOS)\r
{\r
- if (getProject().getProjectType().isAudioPlugin())\r
- props.add (new ChoicePropertyComponent (iosAppExtensionDuplicateResourcesFolderValue,\r
- "Don't Add Resources Folder to App Extension"),\r
- "Enable this to prevent the Projucer from creating a resources folder for AUv3 app extensions.");\r
-\r
-\r
props.add (new ChoicePropertyComponent (iosDeviceFamilyValue, "Device Family",\r
{ "iPhone", "iPad", "Universal" },\r
{ "1", "2", "1,2" }),\r
props.add (new TextPropertyComponentWithEnablement (microphonePermissionsTextValue, microphonePermissionNeededValue,\r
"Microphone Access Text", 1024, false),\r
"A short description of why your app requires microphone access.");\r
+\r
+ props.add (new ChoicePropertyComponent (cameraPermissionNeededValue, "Camera Access"),\r
+ "Enable this to allow your app to use the camera. "\r
+ "The user of your app will be prompted to grant camera access permissions.");\r
+\r
+ props.add (new TextPropertyComponentWithEnablement (cameraPermissionTextValue, cameraPermissionNeededValue,\r
+ "Camera Access Text", 1024, false),\r
+ "A short description of why your app requires camera access.");\r
}\r
else if (projectType.isGUIApplication())\r
{\r
osxArchitecture (config, Ids::osxArchitecture, getUndoManager(), osxArch_Default),\r
customXcodeFlags (config, Ids::customXcodeFlags, getUndoManager()),\r
plistPreprocessorDefinitions (config, Ids::plistPreprocessorDefinitions, getUndoManager()),\r
- cppStandardLibrary (config, Ids::cppLibType, getUndoManager()),\r
codeSignIdentity (config, Ids::codeSigningIdentity, getUndoManager(), iOS ? "iPhone Developer" : "Mac Developer"),\r
fastMathEnabled (config, Ids::fastMath, getUndoManager()),\r
stripLocalSymbolsEnabled (config, Ids::stripLocalSymbols, getUndoManager()),\r
props.add (new TextPropertyComponent (plistPreprocessorDefinitions, "PList Preprocessor Definitions", 2048, true),\r
"Preprocessor definitions used during PList preprocessing (see PList Preprocess).");\r
\r
- props.add (new ChoicePropertyComponent (cppStandardLibrary, "C++ Library",\r
- { "LLVM libc++", "GNU libstdc++" },\r
- { "libc++", "libstdc++" }),\r
- "The type of C++ std lib that will be linked.");\r
-\r
props.add (new TextPropertyComponent (codeSignIdentity, "Code-Signing Identity", 1024, false),\r
"The name of a code-signing identity for Xcode to apply.");\r
\r
\r
bool isFastMathEnabled() const { return fastMathEnabled.get(); }\r
\r
- String getCPPStandardLibraryString() const { return cppStandardLibrary.get(); }\r
-\r
bool isStripLocalSymbolsEnabled() const { return stripLocalSymbolsEnabled.get(); }\r
\r
String getCustomXcodeFlagsString() const { return customXcodeFlags.get(); }\r
bool iOS;\r
\r
ValueWithDefault osxSDKVersion, osxDeploymentTarget, iosDeploymentTarget, osxArchitecture,\r
- customXcodeFlags, plistPreprocessorDefinitions, cppStandardLibrary, codeSignIdentity,\r
+ customXcodeFlags, plistPreprocessorDefinitions, codeSignIdentity,\r
fastMathEnabled, stripLocalSymbolsEnabled, pluginBinaryCopyStepEnabled,\r
vstBinaryLocation, vst3BinaryLocation, auBinaryLocation, rtasBinaryLocation, aaxBinaryLocation;\r
\r
: "c++") + cppStandard).quoted());\r
}\r
\r
- if (config.getCPPStandardLibraryString().isNotEmpty())\r
- s.set ("CLANG_CXX_LIBRARY", config.getCPPStandardLibraryString().quoted());\r
+ s.set ("CLANG_CXX_LIBRARY", "\"libc++\"");\r
\r
s.set ("COMBINE_HIDPI_IMAGES", "YES");\r
\r
if (! shouldCreatePList())\r
return;\r
\r
- ScopedPointer<XmlElement> plist (XmlDocument::parse (owner.getPListToMergeString()));\r
+ std::unique_ptr<XmlElement> plist (XmlDocument::parse (owner.getPListToMergeString()));\r
\r
if (plist == nullptr || ! plist->hasTagName ("plist"))\r
- plist = new XmlElement ("plist");\r
+ plist.reset (new XmlElement ("plist"));\r
\r
auto* dict = plist->getChildByName ("dict");\r
\r
if (owner.iOS)\r
{\r
addPlistDictionaryKeyBool (dict, "LSRequiresIPhoneOS", true);\r
+\r
if (owner.isMicrophonePermissionEnabled())\r
addPlistDictionaryKey (dict, "NSMicrophoneUsageDescription", owner.getMicrophonePermissionsTextString());\r
\r
+ if (owner.isCameraPermissionEnabled())\r
+ addPlistDictionaryKey (dict, "NSCameraUsageDescription", owner.getCameraPermissionTextString());\r
+\r
if (type != AudioUnitv3PlugIn)\r
addPlistDictionaryKeyBool (dict, "UIViewControllerBasedStatusBarAppearance", false);\r
}\r
= RelativePath (owner.getAAXPathValue().toString(), RelativePath::projectFolder)\r
.getChildFile ("Libs");\r
\r
- String libraryPath (config.isDebug() ? "Debug/libAAXLibrary" : "Release/libAAXLibrary");\r
- libraryPath += (isUsingClangCppLibrary (config) ? "_libcpp.a" : ".a");\r
+ String libraryPath (config.isDebug() ? "Debug" : "Release");\r
+ libraryPath += "/libAAXLibrary_libcpp.a";\r
\r
extraLibs.add (aaxLibsFolder.getChildFile (libraryPath));\r
}\r
return targetExtraSearchPaths;\r
}\r
\r
- bool isUsingClangCppLibrary (const BuildConfiguration& config) const\r
- {\r
- if (auto xcodeConfig = dynamic_cast<const XcodeBuildConfiguration*> (&config))\r
- {\r
- auto configValue = xcodeConfig->getCPPStandardLibraryString();\r
-\r
- if (configValue.isNotEmpty())\r
- return (configValue == "libc++");\r
-\r
- auto minorOSXDeploymentTarget = getOSXDeploymentTarget (*xcodeConfig)\r
- .fromLastOccurrenceOf (".", false, false)\r
- .getIntValue();\r
-\r
- return (minorOSXDeploymentTarget > 8);\r
- }\r
-\r
- return false;\r
- }\r
-\r
String getOSXDeploymentTarget (const XcodeBuildConfiguration& config, String* sdkRoot = nullptr) const\r
{\r
auto sdk = config.getOSXSDKVersionString();\r
const bool iOS;\r
\r
ValueWithDefault customPListValue, pListPrefixHeaderValue, pListPreprocessValue, extraFrameworksValue, postbuildCommandValue,\r
- prebuildCommandValue, iosAppExtensionDuplicateResourcesFolderValue, iosDeviceFamilyValue, iPhoneScreenOrientationValue,\r
- iPadScreenOrientationValue, customXcodeResourceFoldersValue, customXcassetsFolderValue, microphonePermissionNeededValue, microphonePermissionsTextValue,\r
+ prebuildCommandValue, duplicateAppExResourcesFolderValue, iosDeviceFamilyValue, iPhoneScreenOrientationValue,\r
+ iPadScreenOrientationValue, customXcodeResourceFoldersValue, customXcassetsFolderValue,\r
+ microphonePermissionNeededValue, microphonePermissionsTextValue, cameraPermissionNeededValue, cameraPermissionTextValue,\r
uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue,\r
iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue,\r
iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue;\r
\r
if (target->type != XcodeTarget::AggregateTarget)\r
{\r
- auto skipAUv3 = (target->type == XcodeTarget::AudioUnitv3PlugIn\r
- && ! shouldDuplicateResourcesFolderForAppExtension());\r
+ auto skipAUv3 = (target->type == XcodeTarget::AudioUnitv3PlugIn && ! shouldDuplicateAppExResourcesFolder());\r
\r
if (! projectType.isStaticLibrary() && target->type != XcodeTarget::SharedCodeTarget && ! skipAUv3)\r
target->addBuildPhase ("PBXResourcesBuildPhase", resourceIDs);\r
\r
void getIconImages (OwnedArray<Drawable>& images) const\r
{\r
- ScopedPointer<Drawable> bigIcon (getBigIcon());\r
+ std::unique_ptr<Drawable> bigIcon (getBigIcon());\r
+\r
if (bigIcon != nullptr)\r
images.add (bigIcon.release());\r
\r
- ScopedPointer<Drawable> smallIcon (getSmallIcon());\r
+ std::unique_ptr<Drawable> smallIcon (getSmallIcon());\r
+\r
if (smallIcon != nullptr)\r
images.add (smallIcon.release());\r
}\r
if (iOS && isPushNotificationsEnabled())\r
xcodeFrameworks.addIfNotAlreadyThere ("UserNotifications");\r
\r
+ if (isiOS() && project.getConfigFlag ("JUCE_USE_CAMERA").get())\r
+ xcodeFrameworks.addIfNotAlreadyThere ("ImageIO");\r
+\r
xcodeFrameworks.addTokens (getExtraFrameworksString(), ",;", "\"'");\r
xcodeFrameworks.trim();\r
\r
{\r
auto fileRefID = createFileRefID (pathString);\r
\r
- ScopedPointer<ValueTree> v (new ValueTree (fileRefID));\r
+ std::unique_ptr<ValueTree> v (new ValueTree (fileRefID));\r
v->setProperty ("isa", "PBXFileReference", nullptr);\r
v->setProperty ("lastKnownFileType", fileType, nullptr);\r
v->setProperty (Ids::name, pathString.fromLastOccurrenceOf ("/", false, false), nullptr);\r
v->setProperty ("path", pathString, nullptr);\r
v->setProperty ("sourceTree", sourceTree, nullptr);\r
\r
- auto existing = pbxFileReferences.indexOfSorted (*this, v);\r
+ auto existing = pbxFileReferences.indexOfSorted (*this, v.get());\r
\r
if (existing >= 0)\r
{\r
String addFramework (const String& frameworkName) const\r
{\r
auto path = frameworkName;\r
- if (! File::isAbsolutePath (path))\r
+ auto isRelativePath = path.startsWith ("../");\r
+\r
+ if (! File::isAbsolutePath (path) && ! isRelativePath)\r
path = "System/Library/Frameworks/" + path;\r
\r
if (! path.endsWithIgnoreCase (".framework"))\r
\r
auto fileRefID = createFileRefID (path);\r
\r
- addFileReference ((File::isAbsolutePath (frameworkName) ? "" : "${SDKROOT}/") + path);\r
+ addFileReference (((File::isAbsolutePath (frameworkName) || isRelativePath) ? "" : "${SDKROOT}/") + path);\r
frameworkFileIDs.add (fileRefID);\r
\r
return addBuildFile (path, fileRefID, false, false);\r
\r
bool xcschemeManagementPlistMatchesTargets (const File& plist) const\r
{\r
- ScopedPointer<XmlElement> xml (XmlDocument::parse (plist));\r
+ std::unique_ptr<XmlElement> xml (XmlDocument::parse (plist));\r
\r
if (xml != nullptr)\r
if (auto* dict = xml->getChildByName ("dict"))\r
{\r
String attributes;\r
\r
- attributes << "{ LastUpgradeCheck = 0830; "\r
+ attributes << "{ LastUpgradeCheck = 0930; "\r
<< "ORGANIZATIONNAME = " << getProject().getCompanyNameString().quoted()\r
<<"; ";\r
\r
{\r
Drawable* im = nullptr;\r
\r
- ScopedPointer<Drawable> im1 (getSmallIcon());\r
- ScopedPointer<Drawable> im2 (getBigIcon());\r
+ std::unique_ptr<Drawable> im1 (getSmallIcon());\r
+ std::unique_ptr<Drawable> im2 (getBigIcon());\r
\r
if (im1 != nullptr && im2 != nullptr)\r
{\r
if (im1->getWidth() >= size && im2->getWidth() >= size)\r
- im = im1->getWidth() < im2->getWidth() ? im1 : im2;\r
+ im = im1->getWidth() < im2->getWidth() ? im1.get() : im2.get();\r
else if (im1->getWidth() >= size)\r
- im = im1;\r
+ im = im1.get();\r
else if (im2->getWidth() >= size)\r
- im = im2;\r
+ im = im2.get();\r
}\r
else\r
{\r
- im = im1 != nullptr ? im1 : im2;\r
+ im = im1 != nullptr ? im1.get() : im2.get();\r
}\r
\r
if (im == nullptr)\r
props.add (new TextPropertyComponent (configNameValue, "Name", 96, false),\r
"The name of this configuration.");\r
\r
- props.add (new ChoicePropertyComponent (isDebugValue, "Debug mode"),\r
+ props.add (new ChoicePropertyComponent (isDebugValue, "Debug Mode"),\r
"If enabled, this means that the configuration should be built with debug symbols.");\r
\r
- props.add (new TextPropertyComponent (targetNameValue, "Binary name", 256, false),\r
+ props.add (new TextPropertyComponent (targetNameValue, "Binary Name", 256, false),\r
"The filename to use for the destination binary executable file. If you don't add a suffix to this name, "\r
"a suitable platform-specific suffix will be added automatically.");\r
\r
- props.add (new TextPropertyComponent (targetBinaryPathValue, "Binary location", 1024, false),\r
+ props.add (new TextPropertyComponent (targetBinaryPathValue, "Binary Location", 1024, false),\r
"The folder in which the finished binary should be placed. Leave this blank to cause the binary to be placed "\r
"in its default location in the build folder.");\r
\r
- props.addSearchPathProperty (headerSearchPathValue, "Header search paths", "Extra header search paths.");\r
- props.addSearchPathProperty (librarySearchPathValue, "Extra library search paths", "Extra library search paths.");\r
+ props.addSearchPathProperty (headerSearchPathValue, "Header Search Paths", "Extra header search paths.");\r
+ props.addSearchPathProperty (librarySearchPathValue, "Extra Library Search Paths", "Extra library search paths.");\r
\r
- props.add (new TextPropertyComponent (ppDefinesValue, "Preprocessor definitions", 32768, true),\r
+ props.add (new TextPropertyComponent (ppDefinesValue, "Preprocessor Definitions", 32768, true),\r
"Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace, commas, or "\r
"new-lines to separate the items - to include a space or comma in a definition, precede it with a backslash.");\r
\r
Image image (Image::ARGB, 200, 200, true);\r
Graphics g (image);\r
\r
- ScopedPointer<Drawable> svgDrawable (Drawable::createFromImageData (iconData, (size_t) iconDataSize));\r
+ std::unique_ptr<Drawable> svgDrawable (Drawable::createFromImageData (iconData, (size_t) iconDataSize));\r
\r
svgDrawable->drawWithin (g, image.getBounds().toFloat(), RectanglePlacement::fillDestination, 1.0f);\r
\r
BuildConfiguration (Project& project, const ValueTree& configNode, const ProjectExporter&);\r
~BuildConfiguration();\r
\r
- typedef ReferenceCountedObjectPtr<BuildConfiguration> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<BuildConfiguration>;\r
\r
//==============================================================================\r
virtual void createConfigProperties (PropertyListBuilder&) = 0;\r
for (auto& module: modules)\r
module->addSettingsForModuleToExporter (*exporter, *this);\r
\r
- if (project.getProjectType().isAudioPlugin())\r
- writePluginCharacteristicsFile();\r
-\r
generatedFilesGroup.sortAlphabetically (true, true);\r
exporter->getAllGroups().add (generatedFilesGroup);\r
}\r
\r
auto projectRootHash = project.getProjectRoot().toXmlString().hashCode();\r
\r
+ if (project.getProjectType().isAudioPlugin())\r
+ writePluginCharacteristicsFile();\r
+\r
writeAppConfigFile (modules, appConfigUserContent);\r
writeBinaryDataFiles();\r
writeAppHeader (modules);\r
writeModuleCppWrappers (modules);\r
writeProjects (modules, specifiedExporterToSave, ! showProgressBox);\r
- writeAppConfigFile (modules, appConfigUserContent); // (this is repeated in case the projects added anything to it)\r
\r
// if the project root has changed after writing the other files then re-save it\r
if (project.getProjectRoot().toXmlString().hashCode() != projectRootHash)\r
\r
if (errors.size() == 0)\r
{\r
+ if (project.getProjectType().isAudioPlugin())\r
+ writePluginCharacteristicsFile();\r
+\r
writeAppConfigFile (modules, loadUserContentFromAppConfig());\r
writeBinaryDataFiles();\r
writeAppHeader (modules);\r
writeModuleCppWrappers (modules);\r
\r
- if (project.getProjectType().isAudioPlugin())\r
- {\r
- writePluginCharacteristicsFile();\r
- writeAppConfigFile (modules, loadUserContentFromAppConfig());\r
- }\r
-\r
return Result::ok();\r
}\r
\r
\r
void writeMainProjectFile()\r
{\r
- ScopedPointer<XmlElement> xml (project.getProjectRoot().createXml());\r
+ std::unique_ptr<XmlElement> xml (project.getProjectRoot().createXml());\r
jassert (xml != nullptr);\r
\r
if (xml != nullptr)\r
\r
JobStatus runJob() override\r
{\r
- owner.saveExporter (exporter, modules);\r
+ owner.saveExporter (exporter.get(), modules);\r
return jobHasFinished;\r
}\r
\r
private:\r
ProjectSaver& owner;\r
- ScopedPointer<ProjectExporter> exporter;\r
+ std::unique_ptr<ProjectExporter> exporter;\r
const OwnedArray<LibraryModule>& modules;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ExporterJob)\r
<< newLine\r
<< " // If you provide the name of one of the binary resource variables above, this function will" << newLine\r
<< " // return the corresponding data and its size (or a null pointer if the name isn't found)." << newLine\r
- << " const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) noexcept;" << newLine\r
+ << " const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);" << newLine\r
<< newLine\r
<< " // If you provide the name of one of the binary resource variables above, this function will" << newLine\r
<< " // return the corresponding original, non-mangled filename (or a null pointer if the name isn't found)." << newLine\r
- << " const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept;" << newLine\r
+ << " const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);" << newLine\r
<< "}" << newLine;\r
\r
return Result::ok();\r
\r
cpp << newLine\r
<< newLine\r
- << "const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) noexcept" << newLine\r
+ << "const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)" << newLine\r
<< "{" << newLine;\r
\r
StringArray returnCodes;\r
\r
cpp << "};" << newLine << newLine;\r
\r
- cpp << "const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8) noexcept" << newLine\r
+ cpp << "const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)" << newLine\r
<< "{" << newLine\r
<< " for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)" << newLine\r
<< " {" << newLine\r
\r
AppearanceSettings settings (false);\r
\r
- ScopedPointer<XmlElement> xml (XmlDocument::parse (xmlString));\r
+ std::unique_ptr<XmlElement> xml (XmlDocument::parse (xmlString));\r
+\r
if (xml != nullptr)\r
settings.readFromXML (*xml);\r
\r
\r
bool AppearanceSettings::readFromFile (const File& file)\r
{\r
- const ScopedPointer<XmlElement> xml (XmlDocument::parse (file));\r
+ const std::unique_ptr<XmlElement> xml (XmlDocument::parse (file));\r
return xml != nullptr && readFromXML (*xml);\r
}\r
\r
bool AppearanceSettings::writeToFile (const File& file) const\r
{\r
- const ScopedPointer<XmlElement> xml (settings.createXml());\r
+ const std::unique_ptr<XmlElement> xml (settings.createXml());\r
return xml != nullptr && xml->writeToFile (file, String());\r
}\r
\r
\r
if (auto* commandManager = ProjucerApplication::getApp().commandManager.get())\r
{\r
- const ScopedPointer<XmlElement> keys (commandManager->getKeyMappings()->createXml (true));\r
+ const std::unique_ptr<XmlElement> keys (commandManager->getKeyMappings()->createXml (true));\r
\r
if (keys != nullptr)\r
- getGlobalProperties().setValue ("keyMappings", keys);\r
+ getGlobalProperties().setValue ("keyMappings", keys.get());\r
}\r
}\r
\r
propertyFiles.clear();\r
propertyFiles.add (createPropsFile ("Projucer", false));\r
\r
- ScopedPointer<XmlElement> projectDefaultsXml (propertyFiles.getFirst()->getXmlValue ("PROJECT_DEFAULT_SETTINGS"));\r
+ std::unique_ptr<XmlElement> projectDefaultsXml (propertyFiles.getFirst()->getXmlValue ("PROJECT_DEFAULT_SETTINGS"));\r
+\r
if (projectDefaultsXml != nullptr)\r
projectDefaults = ValueTree::fromXml (*projectDefaultsXml);\r
\r
- ScopedPointer<XmlElement> fallbackPathsXml (propertyFiles.getFirst()->getXmlValue ("FALLBACK_PATHS"));\r
+ std::unique_ptr<XmlElement> fallbackPathsXml (propertyFiles.getFirst()->getXmlValue ("FALLBACK_PATHS"));\r
+\r
if (fallbackPathsXml != nullptr)\r
fallbackPaths = ValueTree::fromXml (*fallbackPathsXml);\r
\r
\r
void changed (bool isProjectDefaults)\r
{\r
- ScopedPointer<XmlElement> data (isProjectDefaults ? projectDefaults.createXml()\r
- : fallbackPaths.createXml());\r
+ std::unique_ptr<XmlElement> data (isProjectDefaults ? projectDefaults.createXml()\r
+ : fallbackPaths.createXml());\r
\r
propertyFiles.getUnchecked (0)->setValue (isProjectDefaults ? "PROJECT_DEFAULT_SETTINGS"\r
: "FALLBACK_PATHS",\r
\r
int64 calculateFileHashCode (const File& file)\r
{\r
- ScopedPointer<FileInputStream> stream (file.createInputStream());\r
+ std::unique_ptr<FileInputStream> stream (file.createInputStream());\r
return stream != nullptr ? calculateStreamHashCode (*stream) : 0;\r
}\r
\r
\r
#include "../../Application/jucer_Headers.h"\r
\r
+#ifdef BUILDING_JUCE_COMPILEENGINE\r
+ const char* getPreferredLinefeed() { return "\r\n"; }\r
+#endif\r
+\r
//==============================================================================\r
String joinLinesIntoSourceFile (StringArray& lines)\r
{\r
DECLARE_ID (overwriteOnSave);\r
DECLARE_ID (microphonePermissionNeeded);\r
DECLARE_ID (microphonePermissionsText);\r
+ DECLARE_ID (cameraPermissionNeeded);\r
+ DECLARE_ID (cameraPermissionText);\r
DECLARE_ID (androidJavaLibs);\r
DECLARE_ID (androidRepositories);\r
DECLARE_ID (androidDependencies);\r
DECLARE_ID (iCloudPermissions);\r
DECLARE_ID (iosDevelopmentTeamID);\r
DECLARE_ID (iosAppGroupsId);\r
- DECLARE_ID (iosAppExtensionDuplicateResourcesFolder);\r
+ DECLARE_ID (duplicateAppExResourcesFolder);\r
DECLARE_ID (buildToolsVersion);\r
DECLARE_ID (gradleVersion);\r
const Identifier androidPluginVersion ("gradleWrapperVersion"); // old name is very confusing, but we need to remain backward compatible\r
isTemp = true;\r
}\r
\r
+ auto isClipboard = (pip.getParentDirectory().getFileName() == "Clipboard"\r
+ && pip.getParentDirectory().getParentDirectory().getFileName() == "PIPs");\r
+\r
outputDirectory = outputDirectory.getChildFile (metadata[Ids::name].toString());\r
- useLocalCopy = metadata[Ids::useLocalCopy].toString().isNotEmpty();\r
+ useLocalCopy = metadata[Ids::useLocalCopy].toString().isNotEmpty() || isClipboard;\r
}\r
\r
//==============================================================================\r
\r
auto outputFile = outputDirectory.getChildFile (metadata[Ids::name].toString() + ".jucer");\r
\r
- ScopedPointer<XmlElement> xml = root.createXml();\r
+ std::unique_ptr<XmlElement> xml (root.createXml());\r
\r
if (xml->writeToFile (outputFile, {}))\r
return Result::ok();\r
\r
exporter.setProperty (Ids::targetFolder, "Builds/" + ProjectExporter::getTargetFolderForExporter (exporterName), nullptr);\r
\r
- if (isMobileExporter (exporterName))\r
+ if (isMobileExporter (exporterName) || (metadata[Ids::name] == "AUv3SynthPlugin" && exporterName == "XCODE_MAC"))\r
{\r
auto juceDir = getAppSettings().getStoredPath (Ids::jucePath).toString();\r
\r
{\r
auto assetsDirectoryPath = File (juceDir).getChildFile ("examples").getChildFile ("Assets").getFullPathName();\r
\r
- exporter.setProperty (exporterName == "XCODE_IPHONE" ? Ids::customXcodeResourceFolders\r
- : Ids::androidExtraAssetsFolder,\r
+ exporter.setProperty (exporterName == "ANDROIDSTUDIO" ? Ids::androidExtraAssetsFolder\r
+ : Ids::customXcodeResourceFolders,\r
assetsDirectoryPath, nullptr);\r
}\r
else\r
jucerTree.setProperty (Ids::projectType, "audioplug", nullptr);\r
jucerTree.setProperty (Ids::pluginManufacturer, metadata[Ids::vendor], nullptr);\r
\r
- jucerTree.setProperty (Ids::buildVST, true, nullptr);\r
- jucerTree.setProperty (Ids::buildVST3, false, nullptr);\r
- jucerTree.setProperty (Ids::buildAU, true, nullptr);\r
- jucerTree.setProperty (Ids::buildAUv3, false, nullptr);\r
- jucerTree.setProperty (Ids::buildRTAS, false, nullptr);\r
- jucerTree.setProperty (Ids::buildAAX, false, nullptr);\r
- jucerTree.setProperty (Ids::buildStandalone, true, nullptr);\r
+ StringArray pluginFormatsToBuild (Ids::buildVST.toString(), Ids::buildAU.toString(), Ids::buildStandalone.toString());\r
+ pluginFormatsToBuild.addArray (getExtraPluginFormatsToBuild());\r
+\r
+ jucerTree.setProperty (Ids::pluginFormats, pluginFormatsToBuild.joinIntoString (","), nullptr);\r
+\r
+ if (! getPluginCharacteristics().isEmpty())\r
+ jucerTree.setProperty (Ids::pluginCharacteristicsValue, getPluginCharacteristics().joinIntoString (","), nullptr);\r
}\r
\r
return Result::ok();\r
mainTemplate = mainTemplate.replace ("%%project_name%%", metadata[Ids::name].toString());\r
mainTemplate = mainTemplate.replace ("%%project_version%%", metadata[Ids::version].toString());\r
\r
- return ensureCorrectWhitespace (mainTemplate.replace ("%%startup%%", "mainWindow = new MainWindow (" + metadata[Ids::name].toString().quoted()\r
- + ", new " + metadata[Ids::mainClass].toString() + "(), *this);")\r
+ return ensureCorrectWhitespace (mainTemplate.replace ("%%startup%%", "mainWindow.reset (new MainWindow (" + metadata[Ids::name].toString().quoted()\r
+ + ", new " + metadata[Ids::mainClass].toString() + "(), *this));")\r
.replace ("%%shutdown%%", "mainWindow = nullptr;"));\r
}\r
else if (type == "AudioProcessor")\r
return fileToCopy.copyFileTo (outputDirectory.getChildFile ("Source")\r
.getChildFile (fileToCopy.getFileName()));\r
}\r
+\r
+StringArray PIPGenerator::getExtraPluginFormatsToBuild() const\r
+{\r
+ auto name = metadata[Ids::name].toString();\r
+\r
+ if (name == "AUv3SynthPlugin" || name == "AudioPluginDemo")\r
+ return { Ids::buildAUv3.toString() };\r
+ else if (name == "InterAppAudioEffectPlugin")\r
+ return { Ids::enableIAA.toString() };\r
+\r
+ return {};\r
+}\r
+\r
+StringArray PIPGenerator::getPluginCharacteristics() const\r
+{\r
+ auto name = metadata[Ids::name].toString();\r
+\r
+ if (name == "AudioPluginDemo")\r
+ return { Ids::pluginWantsMidiIn.toString(),\r
+ Ids::pluginProducesMidiOut.toString(),\r
+ Ids::pluginEditorRequiresKeys.toString() };\r
+ else if (name == "AUv3SynthPlugin" || name == "MultiOutSynthPlugin")\r
+ return { Ids::pluginWantsMidiIn.toString(),\r
+ Ids::pluginIsSynth.toString() };\r
+ else if (name == "ArpeggiatorPlugin")\r
+ return { Ids::pluginIsMidiEffectPlugin.toString() };\r
+\r
+ return {};\r
+}\r
Array<File> replaceRelativeIncludesAndGetFilesToMove();\r
bool copyRelativeFileToLocalSourceDirectory (const File&) const noexcept;\r
\r
+ StringArray getExtraPluginFormatsToBuild() const;\r
+ StringArray getPluginCharacteristics() const;\r
+\r
//==============================================================================\r
File pipFile, outputDirectory;\r
var metadata;\r
XmlElement* path = svg.createNewChildElement ("path");\r
path->setAttribute ("d", pathString);\r
\r
- ScopedPointer<Drawable> d (Drawable::createFromSVG (svg));\r
+ std::unique_ptr<Drawable> d (Drawable::createFromSVG (svg));\r
DrawablePath* dp = dynamic_cast<DrawablePath*> (d->getChildComponent(0));\r
jassert (dp != nullptr);\r
Path p (dp->getPath());\r
//==============================================================================\r
void TreePanelBase::setRoot (JucerTreeViewBase* root)\r
{\r
- rootItem = root;\r
+ rootItem.reset (root);\r
tree.setRootItem (root);\r
tree.getRootItem()->setOpen (true);\r
\r
if (project != nullptr)\r
{\r
- const ScopedPointer<XmlElement> treeOpenness (project->getStoredProperties()\r
+ const std::unique_ptr<XmlElement> treeOpenness (project->getStoredProperties()\r
.getXmlValue (opennessStateKey));\r
if (treeOpenness != nullptr)\r
{\r
{\r
if (project != nullptr)\r
{\r
- ScopedPointer<XmlElement> opennessState (tree.getOpennessState (true));\r
+ std::unique_ptr<XmlElement> opennessState (tree.getOpennessState (true));\r
\r
if (opennessState != nullptr)\r
project->getStoredProperties().setValue (opennessStateKey, opennessState.get());\r
{\r
if (isNowSelected)\r
{\r
- delayedSelectionTimer = new ItemSelectionTimer (*this);\r
+ delayedSelectionTimer.reset (new ItemSelectionTimer (*this));\r
delayedSelectionTimer->startTimer (getMillisecsAllowedForDragGesture());\r
}\r
else\r
private:\r
class ItemSelectionTimer;\r
friend class ItemSelectionTimer;\r
- ScopedPointer<Timer> delayedSelectionTimer;\r
+ std::unique_ptr<Timer> delayedSelectionTimer;\r
\r
void invokeShowDocument();\r
\r
\r
const Project* project;\r
TreeView tree;\r
- ScopedPointer<JucerTreeViewBase> rootItem;\r
+ std::unique_ptr<JucerTreeViewBase> rootItem;\r
\r
private:\r
String opennessStateKey, emptyTreeMessage;\r
g.setOpacity (0.5f);\r
\r
bool isTextEmpty = button.getButtonText().isEmpty();\r
- bool isPropertyComponentChild = (dynamic_cast<BooleanPropertyComponent*> (button.getParentComponent()) != nullptr);\r
+ bool isPropertyComponentChild = (dynamic_cast<BooleanPropertyComponent*> (button.getParentComponent()) != nullptr\r
+ || dynamic_cast<MultiChoicePropertyComponent*> (button.getParentComponent()) != nullptr);\r
\r
auto bounds = button.getLocalBounds();\r
\r
PageInfo* page = new PageInfo();\r
pages.insert (insertIndex, page);\r
page->content = contentComponent;\r
- addAndMakeVisible (page->dotButton = new DotButton (*this, pages.indexOf (page)));\r
+ page->dotButton.reset (new DotButton (*this, pages.indexOf (page)));\r
+ addAndMakeVisible (page->dotButton.get());\r
page->name = tabName;\r
page->shouldDelete = deleteComponentWhenNotNeeded;\r
\r
~PageInfo();\r
\r
Component::SafePointer<Component> content;\r
- ScopedPointer<DotButton> dotButton;\r
+ std::unique_ptr<DotButton> dotButton;\r
String name;\r
bool shouldDelete;\r
};\r
\r
auto standardFont = Font (16.0f);\r
\r
- addAndMakeVisible (loggedInUsernameLabel = new Label ("Username Label"));\r
+ loggedInUsernameLabel.reset (new Label ("Username Label"));\r
+ addAndMakeVisible (loggedInUsernameLabel.get());\r
\r
loggedInUsernameLabel->setFont (standardFont);\r
loggedInUsernameLabel->setJustificationType (Justification::centred);\r
loggedInUsernameLabel->setText ("GPL Mode: Re-compile with JUCER_ENABLE_GPL_MODE=0 to enable login!",\r
NotificationType::dontSendNotification);\r
#else\r
- addAndMakeVisible (licenseTypeLabel = new Label ("License Type Label"));\r
+ licenseTypeLabel.reset (new Label ("License Type Label"));\r
+ addAndMakeVisible (licenseTypeLabel.get());\r
\r
licenseTypeLabel->setFont (standardFont);\r
licenseTypeLabel->setJustificationType (Justification::centred);\r
licenseTypeLabel->setMinimumHorizontalScale (1.0f);\r
\r
- addAndMakeVisible (logoutButton = new TextButton (isInsideWebview ? "Select different account..." : "Logout"));\r
+ logoutButton.reset (new TextButton (isInsideWebview ? "Select different account..." : "Logout"));\r
+ addAndMakeVisible (logoutButton.get());\r
logoutButton->setColour (TextButton::buttonColourId, findColour (secondaryButtonBackgroundColourId));\r
\r
logoutButton->onClick = [this]\r
\r
if (! isInsideWebview)\r
{\r
- addAndMakeVisible (switchLicenseButton = new TextButton ("Switch License"));\r
+ switchLicenseButton.reset (new TextButton ("Switch License"));\r
+ addAndMakeVisible (switchLicenseButton.get());\r
switchLicenseButton->onClick = [this]\r
{\r
dismissCalloutBox();\r
#endif\r
\r
//==============================================================================\r
- ScopedPointer<Label> loggedInUsernameLabel;\r
+ std::unique_ptr<Label> loggedInUsernameLabel;\r
\r
#if ! JUCER_ENABLE_GPL_MODE\r
- ScopedPointer<Label> licenseTypeLabel;\r
- ScopedPointer<TextButton> logoutButton, switchLicenseButton;\r
+ std::unique_ptr<Label> licenseTypeLabel;\r
+ std::unique_ptr<TextButton> logoutButton, switchLicenseButton;\r
bool hasLicenseType = false;\r
bool isInsideWebview;\r
#endif\r
projectFile = targetFolder.getChildFile (File::createLegalFileName (appTitle))\r
.withFileExtension (Project::projectFileExtension);\r
\r
- ScopedPointer<Project> project (new Project (projectFile));\r
+ std::unique_ptr<Project> project (new Project (projectFile));\r
\r
if (failedFiles.size() == 0)\r
{\r
return 9;\r
}\r
\r
- static ScopedPointer<NewProjectWizard> createWizardType (int index)\r
+ static std::unique_ptr<NewProjectWizard> createWizardType (int index)\r
{\r
switch (index)\r
{\r
- case 0: return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::GUIAppWizard());\r
- case 1: return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::AnimatedAppWizard());\r
- case 2: return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::OpenGLAppWizard());\r
- case 3: return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::ConsoleAppWizard());\r
- case 4: return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::AudioAppWizard());\r
- case 5: return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::AudioPluginAppWizard());\r
- case 6: return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::StaticLibraryWizard());\r
- case 7: return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::DynamicLibraryWizard());\r
- case 8: return ScopedPointer<NewProjectWizard> (new NewProjectWizardClasses::BlankAppWizard());\r
+ case 0: return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::GUIAppWizard());\r
+ case 1: return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::AnimatedAppWizard());\r
+ case 2: return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::OpenGLAppWizard());\r
+ case 3: return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::ConsoleAppWizard());\r
+ case 4: return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::AudioAppWizard());\r
+ case 5: return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::AudioPluginAppWizard());\r
+ case 6: return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::StaticLibraryWizard());\r
+ case 7: return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::DynamicLibraryWizard());\r
+ case 8: return std::unique_ptr<NewProjectWizard> (new NewProjectWizardClasses::BlankAppWizard());\r
default: jassertfalse; break;\r
}\r
\r
auto* mw = Component::findParentComponentOfClass<MainWindow>();\r
jassert (mw != nullptr);\r
\r
- if (ScopedPointer<NewProjectWizardClasses::NewProjectWizard> wizard = createWizard())\r
+ std::unique_ptr<NewProjectWizardClasses::NewProjectWizard> wizard = createWizard();\r
+\r
+ if (wizard != nullptr)\r
{\r
Result result (wizard->processResultsFromSetupItems (*this));\r
\r
}\r
\r
auto projectDir = fileBrowser.getSelectedFile (0);\r
+ std::unique_ptr<Project> project (wizard->runWizard (*this, projectName.getText(),\r
+ projectDir,\r
+ modulesPathBox.isUsingGlobalPaths));\r
\r
- if (ScopedPointer<Project> project = wizard->runWizard (*this, projectName.getText(),\r
- projectDir,\r
- modulesPathBox.isUsingGlobalPaths))\r
+ if (project != nullptr)\r
{\r
mw->setProject (project.release());\r
getAppSettings().lastWizardFolder = projectDir.getParentDirectory();\r
{\r
StringArray items;\r
\r
- if (ScopedPointer<NewProjectWizardClasses::NewProjectWizard> wizard = createWizard())\r
+ std::unique_ptr<NewProjectWizardClasses::NewProjectWizard> wizard = createWizard();\r
+\r
+ if (wizard != nullptr)\r
items = wizard->getFileCreationOptions();\r
\r
filesToCreate.clear();\r
TextButton cancelButton { TRANS("Cancel") };\r
ModulesFolderPathBox modulesPathBox;\r
\r
- ScopedPointer<NewProjectWizardClasses::NewProjectWizard> createWizard()\r
+ std::unique_ptr<NewProjectWizardClasses::NewProjectWizard> createWizard()\r
{\r
return createWizardType (projectType.getSelectedItemIndex());\r
}\r
File editorHFile = editorCppFile.withFileExtension (".h");\r
\r
project.setProjectType (ProjectType_AudioPlugin::getTypeName());\r
- project.getProjectValue (Ids::buildStandalone) = true;\r
\r
setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle));\r
\r
: DrawableButton (buttonName, buttonStyle)\r
{\r
// svg for thumbnail icon\r
- ScopedPointer<XmlElement> svg (XmlDocument::parse (thumbSvg));\r
+ std::unique_ptr<XmlElement> svg (XmlDocument::parse (thumbSvg));\r
jassert (svg != nullptr);\r
\r
- thumb = Drawable::createFromSVG (*svg);\r
+ thumb.reset (Drawable::createFromSVG (*svg));\r
\r
// svg for thumbnail background highlight\r
- ScopedPointer<XmlElement> backSvg (XmlDocument::parse (BinaryData::wizard_Highlight_svg));\r
+ std::unique_ptr<XmlElement> backSvg (XmlDocument::parse (BinaryData::wizard_Highlight_svg));\r
jassert (backSvg != nullptr);\r
\r
- hoverBackground = Drawable::createFromSVG (*backSvg);\r
+ hoverBackground.reset (Drawable::createFromSVG (*backSvg));\r
\r
name = buttonName;\r
\r
Analytics::getInstance()->logEvent ("Start Page Button", data, ProjucerAnalyticsEvent::startPageEvent);\r
}\r
\r
- ScopedPointer<Drawable> thumb, hoverBackground;\r
+ std::unique_ptr<Drawable> thumb, hoverBackground;\r
String name, description;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TemplateOptionButton)\r
6D697538ADDCFBB6C79AC6C6, ); name = Source; sourceTree = "<group>"; };
A81C9C5D3696F83D5E8CFE11 = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
USE_HEADERMAP = NO; }; name = Debug; };
962CC7E0A536C3F56DBE1F8F = {isa = XCBuildConfiguration; buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
DD4C62A6EA1FD3497B42CDB0,
E8585DDC9F9A0EE2FB82FA52,
136E27FD16209F9868093A6C, ); buildRules = ( ); dependencies = ( ); name = "UnitTestRunner - ConsoleApp"; productName = UnitTestRunner; productReference = 080EAB9CF5AB2BD6B2BBB173; productType = "com.apple.product-type.tool"; };
- E1E93F2B4B2D17E011395520 = {isa = PBXProject; buildConfigurationList = 18FC121B1014F7999CD135D3; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 99F3717D3FEAFDCA3C22E868; projectDirPath = ""; projectRoot = ""; targets = (B0D62ED1051EE9DFD49F6321); };
+ E1E93F2B4B2D17E011395520 = {isa = PBXProject; buildConfigurationList = 18FC121B1014F7999CD135D3; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "ROLI Ltd."; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 99F3717D3FEAFDCA3C22E868; projectDirPath = ""; projectRoot = ""; targets = (B0D62ED1051EE9DFD49F6321); };
};
rootObject = E1E93F2B4B2D17E011395520;
}
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_product_unlocking\juce_product_unlocking.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">\r
<Filter>JUCE Modules\juce_dsp\containers</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h">\r
+ <Filter>JUCE Modules\juce_dsp\containers</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h">\r
<Filter>JUCE Modules\juce_dsp\filter_design</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+ <Filter>JUCE Modules\juce_video\native</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
//#define JUCE_PLUGINHOST_AU 0\r
#endif\r
\r
+#ifndef JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
//==============================================================================\r
// juce_audio_utils flags:\r
\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <ExcludedFromBuild>true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<ExcludedFromBuild>true</ExcludedFromBuild>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_opengl\juce_opengl.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\capture\juce_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h"/>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.cpp">\r
+ <Filter>JUCE Modules\juce_core\containers</Filter>\r
+ </ClCompile>\r
<ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">\r
<Filter>JUCE Modules\juce_core\containers</Filter>\r
</ClCompile>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_android_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_ios_CameraDevice.h">\r
+ <Filter>JUCE Modules\juce_video\native</Filter>\r
+ </ClInclude>\r
<ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h">\r
<Filter>JUCE Modules\juce_video\native</Filter>\r
</ClInclude>\r
//#define JUCE_PLUGINHOST_AU 0\r
#endif\r
\r
+#ifndef JUCE_PLUGINHOST_LADSPA\r
+ //#define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
//==============================================================================\r
// juce_audio_utils flags:\r
\r
<MODULES id="juce_video" showAllCode="1" useLocalCopy="0"/>\r
</MODULES>\r
<JUCEOPTIONS/>\r
+ <LIVE_SETTINGS>\r
+ <OSX/>\r
+ </LIVE_SETTINGS>\r
</JUCERPROJECT>\r
\r
while (! threadShouldExit())\r
{\r
- auto eventsToSendCapacity = maxBatchSize - eventsToSend.size();\r
-\r
- if (eventsToSendCapacity > 0)\r
{\r
- const ScopedLock lock (queueAccess);\r
-\r
- const auto numEventsInQueue = (int) eventQueue.size();\r
+ const auto numEventsInBatch = eventsToSend.size();\r
+ const auto freeBatchCapacity = maxBatchSize - numEventsInBatch;\r
\r
- if (numEventsInQueue > 0)\r
+ if (freeBatchCapacity > 0)\r
{\r
- const auto numEventsToAdd = jmin (eventsToSendCapacity, numEventsInQueue);\r
+ const auto numNewEvents = (int) eventQueue.size() - numEventsInBatch;\r
+\r
+ if (numNewEvents > 0)\r
+ {\r
+ const ScopedLock lock (queueAccess);\r
+\r
+ const auto numEventsToAdd = jmin (numNewEvents, freeBatchCapacity);\r
+ const auto newBatchSize = numEventsInBatch + numEventsToAdd;\r
\r
- for (size_t i = 0; i < (size_t) numEventsToAdd; ++i)\r
- eventsToSend.add (eventQueue[i]);\r
+ for (auto i = numEventsInBatch; i < newBatchSize; ++i)\r
+ eventsToSend.add (eventQueue[(size_t) i]);\r
+ }\r
}\r
}\r
\r
\r
ID: juce_analytics\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE analytics classes\r
description: Classes to collect analytics and send to destinations\r
website: http://www.juce.com/juce\r
}\r
\r
// convert data from the source to dest format..\r
- ScopedPointer<AudioData::Converter> conv (new AudioData::ConverterInstance <AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::Const>,\r
- AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::NonConst>>());\r
+ std::unique_ptr<AudioData::Converter> conv (new AudioData::ConverterInstance <AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::Const>,\r
+ AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::NonConst>>());\r
conv->convertSamples (inPlace ? reversed : converted, original, numSamples);\r
\r
// ..and back again..\r
class NonConst\r
{\r
public:\r
- typedef void VoidType;\r
+ using VoidType = void;\r
static inline void* toVoidPtr (VoidType* v) noexcept { return v; }\r
enum { isConst = 0 };\r
};\r
class Const\r
{\r
public:\r
- typedef const void VoidType;\r
+ using VoidType = const void;\r
static inline void* toVoidPtr (VoidType* v) noexcept { return const_cast<void*> (v); }\r
enum { isConst = 1 };\r
};\r
\r
//==============================================================================\r
/** This allows templated code that takes an AudioBuffer to access its sample type. */\r
- typedef Type SampleType;\r
+ using SampleType = Type;\r
\r
private:\r
//==============================================================================\r
/**\r
A multi-channel buffer of 32-bit floating point audio samples.\r
\r
- This typedef is here for backwards compatibility with the older AudioSampleBuffer\r
+ This type is here for backwards compatibility with the older AudioSampleBuffer\r
class, which was fixed for 32-bit data, but is otherwise the same as the new\r
templated AudioBuffer class.\r
\r
@see AudioBuffer\r
*/\r
-typedef AudioBuffer<float> AudioSampleBuffer;\r
+using AudioSampleBuffer = AudioBuffer<float>;\r
\r
} // namespace juce\r
\r
struct BasicOps32\r
{\r
- typedef float Type;\r
- typedef __m128 ParallelType;\r
- typedef __m128 IntegerType;\r
+ using Type = float;\r
+ using ParallelType = __m128;\r
+ using IntegerType = __m128;\r
enum { numParallel = 4 };\r
\r
// Integer and parallel types are the same for SSE. On neon they have different types\r
\r
struct BasicOps64\r
{\r
- typedef double Type;\r
- typedef __m128d ParallelType;\r
- typedef __m128d IntegerType;\r
+ using Type = double;\r
+ using ParallelType = __m128d;\r
+ using IntegerType = __m128d;\r
enum { numParallel = 2 };\r
\r
// Integer and parallel types are the same for SSE. On neon they have different types\r
\r
\r
#define JUCE_BEGIN_VEC_OP \\r
- typedef FloatVectorHelpers::ModeType<sizeof(*dest)>::Mode Mode; \\r
+ using Mode = FloatVectorHelpers::ModeType<sizeof(*dest)>::Mode; \\r
{ \\r
const int numLongOps = num / Mode::numParallel;\r
\r
\r
struct BasicOps32\r
{\r
- typedef float Type;\r
- typedef float32x4_t ParallelType;\r
- typedef uint32x4_t IntegerType;\r
+ using Type = float;\r
+ using ParallelType = float32x4_t;\r
+ using IntegerType = uint32x4_t;\r
union signMaskUnion { ParallelType f; IntegerType i; };\r
enum { numParallel = 4 };\r
\r
\r
struct BasicOps64\r
{\r
- typedef double Type;\r
- typedef double ParallelType;\r
- typedef uint64 IntegerType;\r
+ using Type = double;\r
+ using ParallelType = double;\r
+ using IntegerType = uint64;\r
union signMaskUnion { ParallelType f; IntegerType i; };\r
enum { numParallel = 1 };\r
\r
};\r
\r
#define JUCE_BEGIN_VEC_OP \\r
- typedef FloatVectorHelpers::ModeType<sizeof(*dest)>::Mode Mode; \\r
+ using Mode = FloatVectorHelpers::ModeType<sizeof(*dest)>::Mode; \\r
if (Mode::numParallel > 1) \\r
{ \\r
const int numLongOps = num / Mode::numParallel;\r
union signMask64 { double d; uint64 i; };\r
\r
#if JUCE_USE_SSE_INTRINSICS || JUCE_USE_ARM_NEON\r
- template<int typeSize> struct ModeType { typedef BasicOps32 Mode; };\r
- template<> struct ModeType<8> { typedef BasicOps64 Mode; };\r
+ template<int typeSize> struct ModeType { using Mode = BasicOps32; };\r
+ template<> struct ModeType<8> { using Mode = BasicOps64; };\r
\r
template <typename Mode>\r
struct MinMax\r
{\r
- typedef typename Mode::Type Type;\r
- typedef typename Mode::ParallelType ParallelType;\r
+ using Type = typename Mode::Type;\r
+ using ParallelType = typename Mode::ParallelType;\r
\r
static Type findMinOrMax (const Type* src, int num, const bool isMinimum) noexcept\r
{\r
\r
ID: juce_audio_basics\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE audio and MIDI data classes\r
description: Classes for audio buffer manipulation, midi message handling, synthesis, etc.\r
website: http://www.juce.com/juce\r
class UnitTestInstrument : public MPEInstrument,\r
private MPEInstrument::Listener\r
{\r
- typedef MPEInstrument Base;\r
+ using Base = MPEInstrument;\r
+\r
public:\r
UnitTestInstrument()\r
: noteOnCallCounter (0), noteOffCallCounter (0), pitchbendCallCounter (0),\r
\r
bool lastSustainPedalValueReceived, lastSostenutoPedalValueReceived;\r
MPEValue lastMPEValueReceived;\r
- ScopedPointer<MPENote> lastNoteFinished;\r
+ std::unique_ptr<MPENote> lastNoteFinished;\r
\r
private:\r
//==============================================================================\r
void setLegacyModePitchbendRange (int pitchbendRange);\r
\r
//==============================================================================\r
- typedef MPEInstrument::TrackingMode TrackingMode;\r
+ using TrackingMode = MPEInstrument::TrackingMode;\r
\r
/** Set the MPE tracking mode for the pressure dimension. */\r
void setPressureTrackingMode (TrackingMode modeToUse);\r
protected:\r
//==============================================================================\r
/** @internal */\r
- ScopedPointer<MPEInstrument> instrument;\r
+ std::unique_ptr<MPEInstrument> instrument;\r
\r
private:\r
//==============================================================================\r
\r
private:\r
bool isLegacy = false;\r
- ScopedPointer<MPEZoneLayout::Zone> zone;\r
+ std::unique_ptr<MPEZoneLayout::Zone> zone;\r
int channelIncrement, numChannels, firstChannel, lastChannel, midiChannelLastAssigned;\r
\r
//==============================================================================\r
\r
BufferingAudioSource::BufferingAudioSource (PositionableAudioSource* s,\r
TimeSliceThread& thread,\r
- const bool deleteSourceWhenDeleted,\r
- const int bufferSizeSamples,\r
- const int numChannels,\r
+ bool deleteSourceWhenDeleted,\r
+ int bufferSizeSamples,\r
+ int numChannels,\r
bool prefillBufferOnPrepareToPlay)\r
: source (s, deleteSourceWhenDeleted),\r
backgroundThread (thread),\r
numberOfSamplesToBuffer (jmax (1024, bufferSizeSamples)),\r
numberOfChannels (numChannels),\r
- bufferValidStart (0),\r
- bufferValidEnd (0),\r
- nextPlayPos (0),\r
- sampleRate (0),\r
- wasSourceLooping (false),\r
- isPrepared (false),\r
prefillBuffer (prefillBufferOnPrepareToPlay)\r
{\r
jassert (source != nullptr);\r
//==============================================================================\r
void BufferingAudioSource::prepareToPlay (int samplesPerBlockExpected, double newSampleRate)\r
{\r
- const int bufferSizeNeeded = jmax (samplesPerBlockExpected * 2, numberOfSamplesToBuffer);\r
+ auto bufferSizeNeeded = jmax (samplesPerBlockExpected * 2, numberOfSamplesToBuffer);\r
\r
if (newSampleRate != sampleRate\r
|| bufferSizeNeeded != buffer.getNumSamples()\r
{\r
const ScopedLock sl (bufferStartPosLock);\r
\r
- const int validStart = (int) (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos) - nextPlayPos);\r
- const int validEnd = (int) (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos + info.numSamples) - nextPlayPos);\r
+ auto start = bufferValidStart.load();\r
+ auto end = bufferValidEnd.load();\r
+ auto pos = nextPlayPos.load();\r
+\r
+ auto validStart = (int) (jlimit (start, end, pos) - pos);\r
+ auto validEnd = (int) (jlimit (start, end, pos + info.numSamples) - pos);\r
\r
if (validStart == validEnd)\r
{\r
for (int chan = jmin (numberOfChannels, info.buffer->getNumChannels()); --chan >= 0;)\r
{\r
jassert (buffer.getNumSamples() > 0);\r
- const int startBufferIndex = (int) ((validStart + nextPlayPos) % buffer.getNumSamples());\r
- const int endBufferIndex = (int) ((validEnd + nextPlayPos) % buffer.getNumSamples());\r
+ auto startBufferIndex = (int) ((validStart + nextPlayPos) % buffer.getNumSamples());\r
+ auto endBufferIndex = (int) ((validEnd + nextPlayPos) % buffer.getNumSamples());\r
\r
if (startBufferIndex < endBufferIndex)\r
{\r
}\r
else\r
{\r
- const int initialSize = buffer.getNumSamples() - startBufferIndex;\r
+ auto initialSize = buffer.getNumSamples() - startBufferIndex;\r
\r
info.buffer->copyFrom (chan, info.startSample + validStart,\r
buffer,\r
}\r
}\r
\r
-bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelInfo& info, const uint32 timeout)\r
+bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelInfo& info, uint32 timeout)\r
{\r
if (!source || source->getTotalLength() <= 0)\r
return false;\r
if (! isLooping() && nextPlayPos > getTotalLength())\r
return true;\r
\r
- uint32 now = Time::getMillisecondCounter();\r
- const uint32 startTime = now;\r
+ auto now = Time::getMillisecondCounter();\r
+ auto startTime = now;\r
\r
- uint32 elapsed = (now >= startTime ? now - startTime\r
- : (std::numeric_limits<uint32>::max() - startTime) + now);\r
+ auto elapsed = (now >= startTime ? now - startTime\r
+ : (std::numeric_limits<uint32>::max() - startTime) + now);\r
\r
while (elapsed <= timeout)\r
{\r
{\r
const ScopedLock sl (bufferStartPosLock);\r
\r
- const int validStart = static_cast<int> (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos) - nextPlayPos);\r
- const int validEnd = static_cast<int> (jlimit (bufferValidStart, bufferValidEnd, nextPlayPos + info.numSamples) - nextPlayPos);\r
+ auto start = bufferValidStart.load();\r
+ auto end = bufferValidEnd.load();\r
+ auto pos = nextPlayPos.load();\r
+\r
+ auto validStart = static_cast<int> (jlimit (start, end, pos) - pos);\r
+ auto validEnd = static_cast<int> (jlimit (start, end, pos + info.numSamples) - pos);\r
\r
if (validStart <= 0 && validStart < validEnd && validEnd >= info.numSamples)\r
return true;\r
}\r
\r
-\r
-\r
if (elapsed < timeout && (! bufferReadyEvent.wait (static_cast<int> (timeout - elapsed))))\r
return false;\r
\r
int64 BufferingAudioSource::getNextReadPosition() const\r
{\r
jassert (source->getTotalLength() > 0);\r
+ auto pos = nextPlayPos.load();\r
+\r
return (source->isLooping() && nextPlayPos > 0)\r
- ? nextPlayPos % source->getTotalLength()\r
- : nextPlayPos;\r
+ ? pos % source->getTotalLength()\r
+ : pos;\r
}\r
\r
void BufferingAudioSource::setNextReadPosition (int64 newPosition)\r
bufferValidEnd = 0;\r
}\r
\r
- newBVS = jmax ((int64) 0, nextPlayPos);\r
+ newBVS = jmax ((int64) 0, nextPlayPos.load());\r
newBVE = newBVS + buffer.getNumSamples() - 4;\r
sectionToReadStart = 0;\r
sectionToReadEnd = 0;\r
sectionToReadEnd = newBVE;\r
\r
bufferValidStart = newBVS;\r
- bufferValidEnd = jmin (bufferValidEnd, newBVE);\r
+ bufferValidEnd = jmin (bufferValidEnd.load(), newBVE);\r
}\r
}\r
\r
return false;\r
\r
jassert (buffer.getNumSamples() > 0);\r
- const int bufferIndexStart = (int) (sectionToReadStart % buffer.getNumSamples());\r
- const int bufferIndexEnd = (int) (sectionToReadEnd % buffer.getNumSamples());\r
+ auto bufferIndexStart = (int) (sectionToReadStart % buffer.getNumSamples());\r
+ auto bufferIndexEnd = (int) (sectionToReadEnd % buffer.getNumSamples());\r
\r
if (bufferIndexStart < bufferIndexEnd)\r
{\r
}\r
else\r
{\r
- const int initialSize = buffer.getNumSamples() - bufferIndexStart;\r
+ auto initialSize = buffer.getNumSamples() - bufferIndexStart;\r
\r
readBufferSection (sectionToReadStart,\r
initialSize,\r
}\r
\r
bufferReadyEvent.signal();\r
-\r
return true;\r
}\r
\r
-void BufferingAudioSource::readBufferSection (const int64 start, const int length, const int bufferOffset)\r
+void BufferingAudioSource::readBufferSection (int64 start, int length, int bufferOffset)\r
{\r
if (source->getNextReadPosition() != start)\r
source->setNextReadPosition (start);\r
AudioBuffer<float> buffer;\r
CriticalSection bufferStartPosLock;\r
WaitableEvent bufferReadyEvent;\r
- int64 volatile bufferValidStart, bufferValidEnd, nextPlayPos;\r
- double volatile sampleRate;\r
- bool wasSourceLooping, isPrepared, prefillBuffer;\r
+ std::atomic<int64> bufferValidStart { 0 }, bufferValidEnd { 0 }, nextPlayPos { 0 };\r
+ double sampleRate = 0;\r
+ bool wasSourceLooping = false, isPrepared = false, prefillBuffer;\r
\r
bool readNextBufferChunk();\r
void readBufferSection (int64 start, int length, int bufferOffset);\r
{\r
if (input != nullptr)\r
{\r
- ScopedPointer<AudioSource> toDelete;\r
+ std::unique_ptr<AudioSource> toDelete;\r
\r
{\r
const ScopedLock sl (lock);\r
CriticalSection lock;\r
OptionalScopedPointer<AudioSource> input;\r
Reverb reverb;\r
- volatile bool bypass;\r
+ std::atomic<bool> bypass;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ReverbAudioSource)\r
};\r
virtual bool appliesToChannel (int midiChannel) = 0;\r
\r
/** The class is reference-counted, so this is a handy pointer class for it. */\r
- typedef ReferenceCountedObjectPtr<SynthesiserSound> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<SynthesiserSound>;\r
\r
\r
private:\r
cpuUsageMs += filterAmount * (msTaken - cpuUsageMs);\r
\r
if (msTaken > msPerBlock)\r
- xruns++;\r
+ ++xruns;\r
}\r
else\r
{\r
void AudioDeviceManager::playTestSound()\r
{\r
{ // cunningly nested to swap, unlock and delete in that order.\r
- ScopedPointer<AudioBuffer<float>> oldSound;\r
+ std::unique_ptr<AudioBuffer<float>> oldSound;\r
\r
{\r
const ScopedLock sl (audioCallbackLock);\r
int AudioDeviceManager::getXRunCount() const noexcept\r
{\r
auto deviceXRuns = (currentAudioDevice != nullptr ? currentAudioDevice->getXRunCount() : -1);\r
- return (deviceXRuns >= 0 ? deviceXRuns : xruns);\r
+ return jmax (0, deviceXRuns) + xruns;\r
}\r
\r
} // namespace juce\r
*/\r
struct LevelMeter : public ReferenceCountedObject\r
{\r
- typedef ReferenceCountedObjectPtr<LevelMeter> Ptr;\r
-\r
LevelMeter() noexcept;\r
-\r
double getCurrentLevel() const noexcept;\r
\r
+ using Ptr = ReferenceCountedObjectPtr<LevelMeter>;\r
+\r
private:\r
friend class AudioDeviceManager;\r
\r
OwnedArray<AudioDeviceSetup> lastDeviceTypeConfigs;\r
\r
AudioDeviceSetup currentSetup;\r
- ScopedPointer<AudioIODevice> currentAudioDevice;\r
+ std::unique_ptr<AudioIODevice> currentAudioDevice;\r
Array<AudioIODeviceCallback*> callbacks;\r
int numInputChansNeeded = 0, numOutputChansNeeded = 2;\r
String currentDeviceType;\r
BigInteger inputChannels, outputChannels;\r
- ScopedPointer<XmlElement> lastExplicitSettings;\r
+ std::unique_ptr<XmlElement> lastExplicitSettings;\r
mutable bool listNeedsScanning = true;\r
AudioBuffer<float> tempBuffer;\r
\r
Array<MidiCallbackInfo> midiCallbacks;\r
\r
String defaultMidiOutputName;\r
- ScopedPointer<MidiOutput> defaultMidiOutput;\r
+ std::unique_ptr<MidiOutput> defaultMidiOutput;\r
CriticalSection audioCallbackLock, midiCallbackLock;\r
\r
- ScopedPointer<AudioBuffer<float>> testSound;\r
+ std::unique_ptr<AudioBuffer<float>> testSound;\r
int testSoundPosition = 0;\r
\r
double cpuUsageMs = 0, timeToCpuScale = 0, msPerBlock = 0;\r
class CallbackHandler;\r
friend class CallbackHandler;\r
friend struct ContainerDeletePolicy<CallbackHandler>;\r
- ScopedPointer<CallbackHandler> callbackHandler;\r
+ std::unique_ptr<CallbackHandler> callbackHandler;\r
\r
void audioDeviceIOCallbackInt (const float** inputChannelData, int totalNumInputChannels,\r
float** outputChannelData, int totalNumOutputChannels, int numSamples);\r
\r
ID: juce_audio_devices\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE audio and MIDI I/O device classes\r
description: Classes to play and record from audio and MIDI I/O devices\r
website: http://www.juce.com/juce\r
\r
struct MidiOutput::PendingMessage\r
{\r
- PendingMessage (const void* const data, const int len, const double timeStamp)\r
+ PendingMessage (const void* data, int len, double timeStamp)\r
: message (data, len, timeStamp)\r
{}\r
\r
PendingMessage* next;\r
};\r
\r
-MidiOutput::MidiOutput (const String& midiName)\r
- : Thread ("midi out"),\r
- internal (nullptr),\r
- firstMessage (nullptr),\r
- name (midiName)\r
+MidiOutput::MidiOutput (const String& deviceName)\r
+ : Thread ("midi out"), name (deviceName)\r
{\r
}\r
\r
}\r
\r
void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer,\r
- const double millisecondCounterToStartAt,\r
+ double millisecondCounterToStartAt,\r
double samplesPerSecondForBuffer)\r
{\r
// You've got to call startBackgroundThread() for this to actually work..\r
// this needs to be a value in the future - RTFM for this method!\r
jassert (millisecondCounterToStartAt > 0);\r
\r
- const double timeScaleFactor = 1000.0 / samplesPerSecondForBuffer;\r
-\r
- MidiBuffer::Iterator i (buffer);\r
+ auto timeScaleFactor = 1000.0 / samplesPerSecondForBuffer;\r
\r
const uint8* data;\r
int len, time;\r
\r
- while (i.getNextEvent (data, len, time))\r
+ for (MidiBuffer::Iterator i (buffer); i.getNextEvent (data, len, time);)\r
{\r
- const double eventTime = millisecondCounterToStartAt + timeScaleFactor * time;\r
-\r
- PendingMessage* const m = new PendingMessage (data, len, eventTime);\r
+ auto eventTime = millisecondCounterToStartAt + timeScaleFactor * time;\r
+ auto* m = new PendingMessage (data, len, eventTime);\r
\r
const ScopedLock sl (lock);\r
\r
}\r
else\r
{\r
- PendingMessage* mm = firstMessage;\r
+ auto* mm = firstMessage;\r
\r
while (mm->next != nullptr && mm->next->message.getTimeStamp() <= eventTime)\r
mm = mm->next;\r
\r
while (firstMessage != nullptr)\r
{\r
- PendingMessage* const m = firstMessage;\r
+ auto* m = firstMessage;\r
firstMessage = firstMessage->next;\r
delete m;\r
}\r
\r
if (message != nullptr)\r
{\r
- const ScopedPointer<PendingMessage> messageDeleter (message);\r
+ std::unique_ptr<PendingMessage> messageDeleter (message);\r
\r
if (eventTime > now)\r
{\r
void* internal = nullptr;\r
CriticalSection lock;\r
struct PendingMessage;\r
- PendingMessage* firstMessage;\r
+ PendingMessage* firstMessage = nullptr;\r
String name;\r
\r
MidiOutput (const String& midiName); // These objects are created with the openDevice() method.\r
AudioIODevice* createDevice (const String& outputDeviceName,\r
const String& inputDeviceName)\r
{\r
- ScopedPointer<AndroidAudioIODevice> dev;\r
+ std::unique_ptr<AndroidAudioIODevice> dev;\r
\r
if (outputDeviceName.isNotEmpty() || inputDeviceName.isNotEmpty())\r
{\r
- dev = new AndroidAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
- : inputDeviceName);\r
+ dev.reset (new AndroidAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
+ : inputDeviceName));\r
\r
if (dev->getCurrentSampleRate() <= 0 || dev->getDefaultBufferSize() <= 0)\r
dev = nullptr;\r
{\r
if (jobject dm = deviceManager.get())\r
{\r
- ScopedPointer<AndroidMidiInput> androidMidiInput (new AndroidMidiInput (juceMidiInput, idx, callback, dm));\r
+ std::unique_ptr<AndroidMidiInput> androidMidiInput (new AndroidMidiInput (juceMidiInput, idx, callback, dm));\r
\r
if (androidMidiInput->isOpen())\r
return androidMidiInput.release();\r
}\r
\r
private:\r
- static StringArray javaStringArrayToJuce (jobjectArray jStrings)\r
- {\r
- StringArray retval;\r
-\r
- JNIEnv* env = getEnv();\r
- const int count = env->GetArrayLength (jStrings);\r
-\r
- for (int i = 0; i < count; ++i)\r
- {\r
- LocalRef<jstring> string ((jstring) env->GetObjectArrayElement (jStrings, i));\r
- retval.add (juceString (string));\r
- }\r
-\r
- return retval;\r
- }\r
-\r
GlobalRef deviceManager;\r
};\r
\r
\r
AndroidMidiDeviceManager manager;\r
\r
- String midiInputName = manager.getInputPortNameForJuceIndex (index);\r
+ String midiInputName (manager.getInputPortNameForJuceIndex (index));\r
\r
if (midiInputName.isEmpty())\r
{\r
return nullptr;\r
}\r
\r
- ScopedPointer<MidiInput> midiInput (new MidiInput (midiInputName));\r
+ std::unique_ptr<MidiInput> midiInput (new MidiInput (midiInputName));\r
\r
- midiInput->internal = manager.openMidiInputPortWithIndex (index, midiInput, callback);\r
+ midiInput->internal = manager.openMidiInputPortWithIndex (index, midiInput.get(), callback);\r
\r
return midiInput->internal != nullptr ? midiInput.release()\r
: nullptr;\r
{\r
for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
{\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DstSampleType;\r
- typedef AudioData::Pointer<AudioData::Int16, AudioData::NativeEndian, AudioData::Interleaved, AudioData::Const> SrcSampleType;\r
+ using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+ using SrcSampleType = AudioData::Pointer<AudioData::Int16, AudioData::NativeEndian, AudioData::Interleaved, AudioData::Const>;\r
\r
DstSampleType dstData (audioBuffer.getWritePointer (i));\r
SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels());\r
{\r
for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
{\r
- typedef AudioData::Pointer<AudioData::Int16, AudioData::NativeEndian, AudioData::Interleaved, AudioData::NonConst> DstSampleType;\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SrcSampleType;\r
+ using DstSampleType = AudioData::Pointer<AudioData::Int16, AudioData::NativeEndian, AudioData::Interleaved, AudioData::NonConst>;\r
+ using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
\r
DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels());\r
SrcSampleType srcData (audioBuffer.getReadPointer (i));\r
\r
for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
{\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DstSampleType;\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::Interleaved, AudioData::Const> SrcSampleType;\r
+ using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+ using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::Interleaved, AudioData::Const>;\r
\r
DstSampleType dstData (audioBuffer.getWritePointer (i));\r
SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels());\r
\r
for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
{\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::Interleaved, AudioData::NonConst> DstSampleType;\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SrcSampleType;\r
+ using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::Interleaved, AudioData::NonConst>;\r
+ using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
\r
DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels());\r
SrcSampleType srcData (audioBuffer.getReadPointer (i));\r
private:\r
\r
//==============================================================================\r
- struct ControlBlock : ReferenceCountedObject { ScopedPointer<const SLObjectItf_* const> ptr; ControlBlock() {} ControlBlock (SLObjectItf o) : ptr (o) {} };\r
+ struct ControlBlock : ReferenceCountedObject { std::unique_ptr<const SLObjectItf_* const> ptr; ControlBlock() {} ControlBlock (SLObjectItf o) : ptr (o) {} };\r
ReferenceCountedObjectPtr<ControlBlock> cb;\r
};\r
\r
{\r
for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
{\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DstSampleType;\r
- typedef AudioData::Pointer<AudioData::Int16, AudioData::LittleEndian, AudioData::Interleaved, AudioData::Const> SrcSampleType;\r
+ using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+ using SrcSampleType = AudioData::Pointer<AudioData::Int16, AudioData::LittleEndian, AudioData::Interleaved, AudioData::Const>;\r
\r
DstSampleType dstData (audioBuffer.getWritePointer (i));\r
SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels());\r
{\r
for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
{\r
- typedef AudioData::Pointer<AudioData::Int16, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst> DstSampleType;\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SrcSampleType;\r
+ using DstSampleType = AudioData::Pointer<AudioData::Int16, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst>;\r
+ using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
\r
DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels());\r
SrcSampleType srcData (audioBuffer.getReadPointer (i));\r
\r
for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
{\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DstSampleType;\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::LittleEndian, AudioData::Interleaved, AudioData::Const> SrcSampleType;\r
+ using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+ using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::LittleEndian, AudioData::Interleaved, AudioData::Const>;\r
\r
DstSampleType dstData (audioBuffer.getWritePointer (i));\r
SrcSampleType srcData (srcInterleaved + i, audioBuffer.getNumChannels());\r
\r
for (int i = 0; i < audioBuffer.getNumChannels(); ++i)\r
{\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst> DstSampleType;\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SrcSampleType;\r
+ using DstSampleType = AudioData::Pointer<AudioData::Float32, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst>;\r
+ using SrcSampleType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
\r
DstSampleType dstData (dstInterleaved + i, audioBuffer.getNumChannels());\r
SrcSampleType srcData (audioBuffer.getReadPointer (i));\r
template <typename T>\r
struct OpenSLQueueRunnerPlayer : OpenSLQueueRunner<T, OpenSLQueueRunnerPlayer<T>, SLPlayItf_>\r
{\r
- typedef OpenSLQueueRunner<T, OpenSLQueueRunnerPlayer<T>, SLPlayItf_> Base;\r
+ using Base = OpenSLQueueRunner<T, OpenSLQueueRunnerPlayer<T>, SLPlayItf_>;\r
\r
enum { isPlayer = 1 };\r
\r
template <typename T>\r
struct OpenSLQueueRunnerRecorder : OpenSLQueueRunner<T, OpenSLQueueRunnerRecorder<T>, SLRecordItf_>\r
{\r
- typedef OpenSLQueueRunner<T, OpenSLQueueRunnerRecorder<T>, SLRecordItf_> Base;\r
+ using Base = OpenSLQueueRunner<T, OpenSLQueueRunnerRecorder<T>, SLRecordItf_>;\r
\r
enum { isPlayer = 0 };\r
\r
int numBuffersToUse);\r
\r
//==============================================================================\r
- typedef SLresult (*CreateEngineFunc)(SLObjectItf*,SLuint32,const SLEngineOption*,SLuint32,const SLInterfaceID*,const SLboolean*);\r
+ typedef SLresult (*CreateEngineFunc)(SLObjectItf*, SLuint32, const SLEngineOption*, SLuint32, const SLInterfaceID*, const SLboolean*);\r
\r
//==============================================================================\r
int inputChannels, outputChannels;\r
{\r
if (inputChannels > 0)\r
{\r
- recorder = new OpenSLQueueRunnerRecorder<T>(*this, inputChannels);\r
+ recorder.reset (new OpenSLQueueRunnerRecorder<T> (*this, inputChannels));\r
\r
if (! recorder->init())\r
{\r
\r
if (outputChannels > 0)\r
{\r
- player = new OpenSLQueueRunnerPlayer<T>(*this, outputChannels);\r
+ player.reset (new OpenSLQueueRunnerPlayer<T> (*this, outputChannels));\r
\r
if (! player->init())\r
{\r
}\r
\r
//==============================================================================\r
- ScopedPointer<OpenSLQueueRunnerPlayer<T>> player;\r
- ScopedPointer<OpenSLQueueRunnerRecorder<T>> recorder;\r
+ std::unique_ptr<OpenSLQueueRunnerPlayer<T>> player;\r
+ std::unique_ptr<OpenSLQueueRunnerRecorder<T>> recorder;\r
Atomic<int> guard;\r
jmethodID getUnderrunCount = 0;\r
};\r
lastError = "Error opening OpenSL input device: the app was not granted android.permission.RECORD_AUDIO";\r
}\r
\r
- session = OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels,\r
- sampleRate, actualBufferSize, audioBuffersToEnqueue);\r
+ session.reset (OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels,\r
+ sampleRate, actualBufferSize, audioBuffersToEnqueue));\r
if (session != nullptr)\r
session->setAudioPreprocessingEnabled (audioProcessingEnabled);\r
else\r
activeInputChans = BigInteger(0);\r
numInputChannels = 0;\r
\r
- session = OpenSLSession::create(slLibrary, numInputChannels, numOutputChannels,\r
- sampleRate, actualBufferSize, audioBuffersToEnqueue);\r
+ session.reset (OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels,\r
+ sampleRate, actualBufferSize, audioBuffersToEnqueue));\r
}\r
}\r
\r
BigInteger activeOutputChans, activeInputChans;\r
AudioIODeviceCallback* callback;\r
\r
- ScopedPointer<OpenSLSession> session;\r
+ std::unique_ptr<OpenSLSession> session;\r
\r
enum\r
{\r
double samleRateToUse, int bufferSizeToUse,\r
int numBuffersToUse)\r
{\r
- ScopedPointer<OpenSLSession> retval;\r
+ std::unique_ptr<OpenSLSession> retval;\r
auto sdkVersion = getEnv()->GetStaticIntField (AndroidBuildVersion, AndroidBuildVersion.SDK_INT);\r
\r
// SDK versions 21 and higher should natively support floating point...\r
if (sdkVersion >= 21)\r
{\r
- retval = new OpenSLSessionT<float> (slLibrary, numInputChannels, numOutputChannels, samleRateToUse,\r
- bufferSizeToUse, numBuffersToUse);\r
+ retval.reset (new OpenSLSessionT<float> (slLibrary, numInputChannels, numOutputChannels, samleRateToUse,\r
+ bufferSizeToUse, numBuffersToUse));\r
\r
// ...however, some devices lie so re-try without floating point\r
if (retval != nullptr && (! retval->openedOK()))\r
\r
if (retval == nullptr)\r
{\r
- retval = new OpenSLSessionT<int16> (slLibrary, numInputChannels, numOutputChannels, samleRateToUse,\r
- bufferSizeToUse, numBuffersToUse);\r
+ retval.reset (new OpenSLSessionT<int16> (slLibrary, numInputChannels, numOutputChannels, samleRateToUse,\r
+ bufferSizeToUse, numBuffersToUse));\r
\r
if (retval != nullptr && (! retval->openedOK()))\r
retval = nullptr;\r
AudioIODevice* createDevice (const String& outputDeviceName,\r
const String& inputDeviceName) override\r
{\r
- ScopedPointer<OpenSLAudioIODevice> dev;\r
+ std::unique_ptr<OpenSLAudioIODevice> dev;\r
\r
if (outputDeviceName.isNotEmpty() || inputDeviceName.isNotEmpty())\r
- dev = new OpenSLAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
- : inputDeviceName);\r
+ dev.reset (new OpenSLAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
+ : inputDeviceName));\r
\r
return dev.release();\r
}\r
\r
pthread_t juce_createRealtimeAudioThread (void* (*entry) (void*), void* userPtr)\r
{\r
- ScopedPointer<SLRealtimeThread> thread (new SLRealtimeThread);\r
+ std::unique_ptr<SLRealtimeThread> thread (new SLRealtimeThread);\r
\r
if (! thread->isOK())\r
return 0;\r
dispatchAudioUnitPropertyChange,\r
this);\r
jassert (err == noErr);\r
+\r
+ AudioOutputUnitMIDICallbacks midiCallbacks;\r
+ midiCallbacks.userData = this;\r
+ midiCallbacks.MIDIEventProc = midiEventCallback;\r
+ midiCallbacks.MIDISysExProc = midiSysExCallback;\r
+ err = AudioUnitSetProperty (audioUnit,\r
+ kAudioOutputUnitProperty_MIDICallbacks,\r
+ kAudioUnitScope_Global,\r
+ 0,\r
+ &midiCallbacks,\r
+ sizeof (midiCallbacks));\r
+ jassert (err == noErr);\r
#endif\r
\r
if (channelData.areInputChannelsAvailable())\r
static_cast<Pimpl*> (data)->handleAudioUnitPropertyChange (unit, propertyID, scope, element);\r
}\r
\r
- void handleMidiMessage (MidiMessage msg)\r
+ static double getTimestampForMIDI()\r
{\r
- if (messageCollector != nullptr)\r
- messageCollector->addMessageToQueue (msg);\r
+ return Time::getMillisecondCounter() / 1000.0;\r
}\r
\r
static void midiEventCallback (void *client, UInt32 status, UInt32 data1, UInt32 data2, UInt32)\r
return static_cast<Pimpl*> (client)->handleMidiMessage (MidiMessage ((int) status,\r
(int) data1,\r
(int) data2,\r
- Time::getMillisecondCounter() / 1000.0));\r
+ getTimestampForMIDI()));\r
+ }\r
+\r
+ static void midiSysExCallback (void *client, const UInt8 *data, UInt32 length)\r
+ {\r
+ return static_cast<Pimpl*> (client)->handleMidiMessage (MidiMessage (data, (int) length, getTimestampForMIDI()));\r
+ }\r
+\r
+ void handleMidiMessage (MidiMessage msg)\r
+ {\r
+ if (messageCollector != nullptr)\r
+ messageCollector->addMessageToQueue (msg);\r
}\r
\r
struct IOChannelData\r
void reconfigure (const BigInteger requiredInputChannels,\r
const BigInteger requiredOutputChannels)\r
{\r
- inputs = new IOChannelConfig (true, requiredInputChannels);\r
- outputs = new IOChannelConfig (false, requiredOutputChannels);\r
+ inputs .reset (new IOChannelConfig (true, requiredInputChannels));\r
+ outputs.reset (new IOChannelConfig (false, requiredOutputChannels));\r
\r
audioData.setSize (inputs->numActiveChannels + outputs->numActiveChannels,\r
audioData.getNumSamples());\r
return inputs->areChannelsAccessible && inputs->numActiveChannels > 0;\r
}\r
\r
- ScopedPointer<IOChannelConfig> inputs;\r
- ScopedPointer<IOChannelConfig> outputs;\r
+ std::unique_ptr<IOChannelConfig> inputs;\r
+ std::unique_ptr<IOChannelConfig> outputs;\r
\r
AudioBuffer<float> audioData { 0, 0 };\r
};\r
int iOSAudioIODevice::getXRunCount() const noexcept { return pimpl->xrun; }\r
\r
void iOSAudioIODevice::setMidiMessageCollector (MidiMessageCollector* collector) { pimpl->messageCollector = collector; }\r
-AudioPlayHead* iOSAudioIODevice::getAudioPlayHead() const { return pimpl; }\r
+AudioPlayHead* iOSAudioIODevice::getAudioPlayHead() const { return pimpl.get(); }\r
\r
bool iOSAudioIODevice::isInterAppAudioConnected() const { return pimpl->interAppAudioConnected; }\r
#if JUCE_MODULE_AVAILABLE_juce_graphics\r
\r
struct Pimpl;\r
friend struct Pimpl;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE (iOSAudioIODevice)\r
};\r
for (int i = 0; ratesToTry[i] != 0; ++i)\r
{\r
if (snd_pcm_hw_params_any (handle, hwParams) >= 0\r
- && snd_pcm_hw_params_test_rate (handle, hwParams, (unsigned int) ratesToTry[i], 0) == 0)\r
+ && snd_pcm_hw_params_test_rate (handle, hwParams, (unsigned int) ratesToTry[i], 0) == 0)\r
{\r
rates.addIfNotAlreadyThere ((double) ratesToTry[i]);\r
}\r
const int type = formatsToTry [i + 1];\r
bitDepth = type & 255;\r
\r
- converter = createConverter (isInput, bitDepth,\r
- (type & isFloatBit) != 0,\r
- (type & isLittleEndianBit) != 0,\r
- (type & onlyUseLower24Bits) != 0,\r
- numChannels,\r
- isInterleaved);\r
+ converter.reset (createConverter (isInput, bitDepth,\r
+ (type & isFloatBit) != 0,\r
+ (type & isLittleEndianBit) != 0,\r
+ (type & onlyUseLower24Bits) != 0,\r
+ numChannels,\r
+ isInterleaved));\r
break;\r
}\r
}\r
scratch.ensureSize ((size_t) ((int) sizeof (float) * numSamples * numChannelsRunning), false);\r
scratch.fillWith (0); // (not clearing this data causes warnings in valgrind)\r
\r
- snd_pcm_sframes_t num = snd_pcm_readi (handle, scratch.getData(), (snd_pcm_uframes_t) numSamples);\r
+ auto num = snd_pcm_readi (handle, scratch.getData(), (snd_pcm_uframes_t) numSamples);\r
\r
if (num < 0)\r
{\r
}\r
else\r
{\r
- snd_pcm_sframes_t num = snd_pcm_readn (handle, (void**) data, (snd_pcm_uframes_t) numSamples);\r
+ auto num = snd_pcm_readn (handle, (void**) data, (snd_pcm_uframes_t) numSamples);\r
\r
if (num < 0)\r
{\r
const bool isInput;\r
bool isInterleaved;\r
MemoryBlock scratch;\r
- ScopedPointer<AudioData::Converter> converter;\r
+ std::unique_ptr<AudioData::Converter> converter;\r
\r
//==============================================================================\r
template <class SampleType>\r
{\r
if (forInput)\r
{\r
- typedef AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DestType;\r
+ using DestType = AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
\r
if (isLittleEndian)\r
return new AudioData::ConverterInstance <AudioData::Pointer <SampleType, AudioData::LittleEndian, InterleavedType, AudioData::Const>, DestType> (numInterleavedChannels, 1);\r
return new AudioData::ConverterInstance <AudioData::Pointer <SampleType, AudioData::BigEndian, InterleavedType, AudioData::Const>, DestType> (numInterleavedChannels, 1);\r
}\r
\r
- typedef AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SourceType;\r
+ using SourceType = AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
\r
if (isLittleEndian)\r
return new AudioData::ConverterInstance <SourceType, AudioData::Pointer <SampleType, AudioData::LittleEndian, InterleavedType, AudioData::NonConst>> (1, numInterleavedChannels);\r
public:\r
ALSAThread (const String& inputDeviceID, const String& outputDeviceID)\r
: Thread ("JUCE ALSA"),\r
- sampleRate (0),\r
- bufferSize (0),\r
- outputLatency (0),\r
- inputLatency (0),\r
- callback (0),\r
inputId (inputDeviceID),\r
- outputId (outputDeviceID),\r
- numCallbacks (0),\r
- audioIoInProgress (false),\r
- inputChannelBuffer (1, 1),\r
- outputChannelBuffer (1, 1)\r
+ outputId (outputDeviceID)\r
{\r
initialiseRatesAndChannels();\r
}\r
\r
void open (BigInteger inputChannels,\r
BigInteger outputChannels,\r
- const double newSampleRate,\r
- const int newBufferSize)\r
+ double newSampleRate,\r
+ int newBufferSize)\r
{\r
close();\r
\r
outputChannelDataForCallback.clear();\r
currentOutputChans.clear();\r
\r
+ // Note that the input device is opened before an output, because we've heard\r
+ // of drivers where doing it in the reverse order mysteriously fails.. If this\r
+ // order also causes problems, let us know and we'll see if we can find a compromise!\r
+\r
+ if (inputChannelDataForCallback.size() > 0 && inputId.isNotEmpty())\r
+ {\r
+ inputDevice.reset (new ALSADevice (inputId, true));\r
+\r
+ if (inputDevice->error.isNotEmpty())\r
+ {\r
+ error = inputDevice->error;\r
+ inputDevice.reset();\r
+ return;\r
+ }\r
+\r
+ ensureMinimumNumBitsSet (currentInputChans, (int) minChansIn);\r
+\r
+ if (! inputDevice->setParameters ((unsigned int) sampleRate,\r
+ jlimit ((int) minChansIn, (int) maxChansIn, currentInputChans.getHighestBit() + 1),\r
+ bufferSize))\r
+ {\r
+ error = inputDevice->error;\r
+ inputDevice.reset();\r
+ return;\r
+ }\r
+\r
+ inputLatency = inputDevice->latency;\r
+ }\r
+\r
if (outputChannels.getHighestBit() >= 0)\r
{\r
for (int i = 0; i < maxOutputsRequested; ++i)\r
\r
if (outputChannelDataForCallback.size() > 0 && outputId.isNotEmpty())\r
{\r
- outputDevice = new ALSADevice (outputId, false);\r
+ outputDevice.reset (new ALSADevice (outputId, false));\r
\r
if (outputDevice->error.isNotEmpty())\r
{\r
error = outputDevice->error;\r
- outputDevice = nullptr;\r
+ outputDevice.reset();\r
return;\r
}\r
\r
bufferSize))\r
{\r
error = outputDevice->error;\r
- outputDevice = nullptr;\r
+ outputDevice.reset();\r
return;\r
}\r
\r
outputLatency = outputDevice->latency;\r
}\r
\r
- if (inputChannelDataForCallback.size() > 0 && inputId.isNotEmpty())\r
- {\r
- inputDevice = new ALSADevice (inputId, true);\r
-\r
- if (inputDevice->error.isNotEmpty())\r
- {\r
- error = inputDevice->error;\r
- inputDevice = nullptr;\r
- return;\r
- }\r
-\r
- ensureMinimumNumBitsSet (currentInputChans, (int) minChansIn);\r
-\r
- if (! inputDevice->setParameters ((unsigned int) sampleRate,\r
- jlimit ((int) minChansIn, (int) maxChansIn, currentInputChans.getHighestBit() + 1),\r
- bufferSize))\r
- {\r
- error = inputDevice->error;\r
- inputDevice = nullptr;\r
- return;\r
- }\r
-\r
- inputLatency = inputDevice->latency;\r
- }\r
-\r
if (outputDevice == nullptr && inputDevice == nullptr)\r
{\r
error = "no channels";\r
\r
stopThread (6000);\r
\r
- inputDevice = nullptr;\r
- outputDevice = nullptr;\r
+ inputDevice.reset();\r
+ outputDevice.reset();\r
\r
inputChannelBuffer.setSize (1, 1);\r
outputChannelBuffer.setSize (1, 1);\r
if (threadShouldExit())\r
break;\r
\r
- snd_pcm_sframes_t avail = snd_pcm_avail_update (inputDevice->handle);\r
+ auto avail = snd_pcm_avail_update (inputDevice->handle);\r
\r
if (avail < 0)\r
JUCE_ALSA_FAILED (snd_pcm_recover (inputDevice->handle, (int) avail, 0));\r
if (threadShouldExit())\r
break;\r
\r
- snd_pcm_sframes_t avail = snd_pcm_avail_update (outputDevice->handle);\r
+ auto avail = snd_pcm_avail_update (outputDevice->handle);\r
\r
if (avail < 0)\r
JUCE_ALSA_FAILED (snd_pcm_recover (outputDevice->handle, (int) avail, 0));\r
\r
//==============================================================================\r
String error;\r
- double sampleRate;\r
- int bufferSize, outputLatency, inputLatency;\r
+ double sampleRate = 0;\r
+ int bufferSize = 0, outputLatency = 0, inputLatency = 0;\r
BigInteger currentInputChans, currentOutputChans;\r
\r
Array<double> sampleRates;\r
StringArray channelNamesOut, channelNamesIn;\r
- AudioIODeviceCallback* callback;\r
+ AudioIODeviceCallback* callback = nullptr;\r
\r
private:\r
//==============================================================================\r
const String inputId, outputId;\r
- ScopedPointer<ALSADevice> outputDevice, inputDevice;\r
- int numCallbacks;\r
- bool audioIoInProgress;\r
+ std::unique_ptr<ALSADevice> outputDevice, inputDevice;\r
+ int numCallbacks = 0;\r
+ bool audioIoInProgress = false;\r
\r
CriticalSection callbackLock;\r
\r
Array<const float*> inputChannelDataForCallback;\r
Array<float*> outputChannelDataForCallback;\r
\r
- unsigned int minChansOut, maxChansOut;\r
- unsigned int minChansIn, maxChansIn;\r
+ unsigned int minChansOut = 0, maxChansOut = 0;\r
+ unsigned int minChansIn = 0, maxChansIn = 0;\r
\r
bool failed (const int errorNum)\r
{\r
: AudioIODevice (deviceName, deviceTypeName),\r
inputId (inputDeviceID),\r
outputId (outputDeviceID),\r
- isOpen_ (false),\r
- isStarted (false),\r
internal (inputDeviceID, outputDeviceID)\r
{\r
}\r
\r
void stop() override\r
{\r
- AudioIODeviceCallback* const oldCallback = internal.callback;\r
+ auto oldCallback = internal.callback;\r
\r
start (nullptr);\r
\r
String inputId, outputId;\r
\r
private:\r
- bool isOpen_, isStarted;\r
+ bool isOpen_ = false, isStarted = false;\r
ALSAThread internal;\r
};\r
\r
{\r
jassert (hasScanned); // need to call scanForDevices() before doing this\r
\r
- const int idx = (forInput ? inputIds : outputIds).indexOf ("default");\r
+ auto idx = (forInput ? inputIds : outputIds).indexOf ("default");\r
return idx >= 0 ? idx : 0;\r
}\r
\r
{\r
jassert (hasScanned); // need to call scanForDevices() before doing this\r
\r
- const int inputIndex = inputNames.indexOf (inputDeviceName);\r
- const int outputIndex = outputNames.indexOf (outputDeviceName);\r
+ auto inputIndex = inputNames.indexOf (inputDeviceName);\r
+ auto outputIndex = outputNames.indexOf (outputDeviceName);\r
\r
String deviceName (outputIndex >= 0 ? outputDeviceName\r
: inputDeviceName);\r
private:\r
//==============================================================================\r
StringArray inputNames, outputNames, inputIds, outputIds;\r
- bool hasScanned = false, listOnlySoundcards;\r
+ bool hasScanned = false;\r
+ const bool listOnlySoundcards;\r
\r
bool testDevice (const String& id, const String& outputName, const String& inputName)\r
{\r
testDevice ("pulse", "Pulseaudio output", "Pulseaudio input");\r
\r
// make sure the default device is listed first, and followed by the pulse device (if present)\r
- int idx = outputIds.indexOf ("pulse");\r
+ auto idx = outputIds.indexOf ("pulse");\r
outputIds.move (idx, 0);\r
outputNames.move (idx, 0);\r
\r
\r
static String hintToString (const void* hints, const char* type)\r
{\r
- char* const hint = snd_device_name_get_hint (hints, type);\r
- const String s (String::fromUTF8 (hint));\r
+ char* hint = snd_device_name_get_hint (hints, type);\r
+ auto s = String::fromUTF8 (hint);\r
::free (hint);\r
return s;\r
}\r
{\r
\r
//==============================================================================\r
-class AlsaClient : public ReferenceCountedObject\r
+class AlsaClient : public ReferenceCountedObject\r
{\r
public:\r
- typedef ReferenceCountedObjectPtr<AlsaClient> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<AlsaClient>;\r
\r
//==============================================================================\r
// represents an input or output port of the supplied AlsaClient\r
- class Port\r
+ struct Port\r
{\r
- public:\r
Port (AlsaClient& c, bool forInput) noexcept\r
- : portId (-1),\r
- callbackEnabled (false),\r
- client (c),\r
- isInput (forInput),\r
- callback (nullptr),\r
- maxEventSize (4 * 1024),\r
- midiInput (nullptr)\r
+ : client (c), isInput (forInput)\r
{}\r
\r
~Port()\r
return client.get() != nullptr && portId >= 0;\r
}\r
\r
- void setupInput(MidiInput* input, MidiInputCallback* cb)\r
+ void setupInput (MidiInput* input, MidiInputCallback* cb)\r
{\r
- jassert (cb && input);\r
-\r
+ jassert (cb != nullptr && input != nullptr);\r
callback = cb;\r
midiInput = input;\r
}\r
void setupOutput()\r
{\r
jassert (! isInput);\r
-\r
snd_midi_event_new ((size_t) maxEventSize, &midiParser);\r
}\r
\r
snd_seq_event_t event;\r
snd_seq_ev_clear (&event);\r
\r
- long numBytes = (long) message.getRawDataSize();\r
+ auto numBytes = (long) message.getRawDataSize();\r
const uint8* data = message.getRawData();\r
\r
- snd_seq_t* seqHandle = client.get();\r
+ auto* seqHandle = client.get();\r
bool success = true;\r
\r
while (numBytes > 0)\r
{\r
- const long numSent = snd_midi_event_encode (midiParser, data, numBytes, &event);\r
+ auto numSent = snd_midi_event_encode (midiParser, data, numBytes, &event);\r
\r
if (numSent <= 0)\r
{\r
return portId != -1 && portId == lhs.portId;\r
}\r
\r
- int portId;\r
- bool callbackEnabled;\r
-\r
- private:\r
- friend class AlsaClient;\r
-\r
- AlsaClient& client;\r
- bool isInput;\r
- MidiInputCallback* callback;\r
- snd_midi_event_t* midiParser;\r
- int maxEventSize;\r
- MidiInput* midiInput;\r
-\r
void createPort (const String& name, bool enableSubscription)\r
{\r
- if (snd_seq_t* seqHandle = client.get())\r
+ if (auto* seqHandle = client.get())\r
{\r
const unsigned int caps =\r
isInput\r
{\r
callback->handlePartialSysexMessage (midiInput, messageData, numBytesSoFar, timeStamp);\r
}\r
+\r
+ AlsaClient& client;\r
+ MidiInputCallback* callback = nullptr;\r
+ snd_midi_event_t* midiParser = nullptr;\r
+ MidiInput* midiInput = nullptr;\r
+ int maxEventSize = 4096;\r
+ int portId = -1;\r
+ bool callbackEnabled = false;\r
+ bool isInput = false;\r
};\r
\r
static Ptr getInstance()\r
void registerCallback()\r
{\r
if (inputThread == nullptr)\r
- inputThread = new MidiInputThread (*this);\r
+ inputThread.reset (new MidiInputThread (*this));\r
\r
- if (++activeCallbacks - 1 == 0)\r
+ if (++activeCallbacks == 1)\r
inputThread->startThread();\r
}\r
\r
void unregisterCallback()\r
{\r
jassert (activeCallbacks.get() > 0);\r
+\r
if (--activeCallbacks == 0 && inputThread->isThreadRunning())\r
inputThread->signalThreadShouldExit();\r
}\r
\r
void handleIncomingMidiMessage (snd_seq_event* event, const MidiMessage& message)\r
{\r
- if (event->dest.port < ports.size()\r
- && ports[event->dest.port]->callbackEnabled)\r
+ if (event->dest.port < ports.size() && ports[event->dest.port]->callbackEnabled)\r
ports[event->dest.port]->handleIncomingMidiMessage (message);\r
}\r
\r
\r
Port* createPort (const String& name, bool forInput, bool enableSubscription)\r
{\r
- Port* port = new Port (*this, forInput);\r
+ auto port = new Port (*this, forInput);\r
port->createPort (name, enableSubscription);\r
ports.set (port->portId, port);\r
incReferenceCount();\r
}\r
\r
private:\r
- snd_seq_t* handle;\r
- int clientId;\r
+ snd_seq_t* handle = nullptr;\r
+ int clientId = 0;\r
OwnedArray<Port> ports;\r
Atomic<int> activeCallbacks;\r
CriticalSection callbackLock;\r
friend struct ContainerDeletePolicy<AlsaClient>;\r
\r
AlsaClient()\r
- : handle (nullptr),\r
- inputThread (nullptr)\r
{\r
jassert (instance == nullptr);\r
\r
{\r
public:\r
MidiInputThread (AlsaClient& c)\r
- : Thread ("JUCE MIDI Input"), client (c), concatenator (2048)\r
+ : Thread ("JUCE MIDI Input"), client (c)\r
{\r
jassert (client.get() != nullptr);\r
}\r
\r
private:\r
AlsaClient& client;\r
- MidiDataConcatenator concatenator;\r
+ MidiDataConcatenator concatenator { 2048 };\r
};\r
\r
- ScopedPointer<MidiInputThread> inputThread;\r
+ std::unique_ptr<MidiInputThread> inputThread;\r
};\r
\r
AlsaClient* AlsaClient::instance = nullptr;\r
//==============================================================================\r
static AlsaClient::Port* iterateMidiClient (const AlsaClient::Ptr& client,\r
snd_seq_client_info_t* clientInfo,\r
- const bool forInput,\r
+ bool forInput,\r
StringArray& deviceNamesFound,\r
- const int deviceIndexToOpen)\r
+ int deviceIndexToOpen)\r
{\r
AlsaClient::Port* port = nullptr;\r
\r
\r
snd_seq_port_info_alloca (&portInfo);\r
jassert (portInfo);\r
- int numPorts = snd_seq_client_info_get_num_ports (clientInfo);\r
- const int sourceClient = snd_seq_client_info_get_client (clientInfo);\r
+ auto numPorts = snd_seq_client_info_get_num_ports (clientInfo);\r
+ auto sourceClient = snd_seq_client_info_get_client (clientInfo);\r
\r
snd_seq_port_info_set_client (portInfo, sourceClient);\r
snd_seq_port_info_set_port (portInfo, -1);\r
&& (snd_seq_port_info_get_capability (portInfo)\r
& (forInput ? SND_SEQ_PORT_CAP_SUBS_READ : SND_SEQ_PORT_CAP_SUBS_WRITE)) != 0)\r
{\r
- const String portName = snd_seq_port_info_get_name(portInfo);\r
+ String portName = snd_seq_port_info_get_name(portInfo);\r
\r
deviceNamesFound.add (portName);\r
\r
if (deviceNamesFound.size() == deviceIndexToOpen + 1)\r
{\r
- const int sourcePort = snd_seq_port_info_get_port (portInfo);\r
+ auto sourcePort = snd_seq_port_info_get_port (portInfo);\r
+\r
if (sourcePort != -1)\r
{\r
port = client->createPort (portName, forInput, false);\r
return port;\r
}\r
\r
-static AlsaClient::Port* iterateMidiDevices (const bool forInput,\r
+static AlsaClient::Port* iterateMidiDevices (bool forInput,\r
StringArray& deviceNamesFound,\r
- const int deviceIndexToOpen)\r
+ int deviceIndexToOpen)\r
{\r
AlsaClient::Port* port = nullptr;\r
- const AlsaClient::Ptr client (AlsaClient::getInstance());\r
+ auto client = AlsaClient::getInstance();\r
\r
- if (snd_seq_t* const seqHandle = client->get())\r
+ if (auto* seqHandle = client->get())\r
{\r
snd_seq_system_info_t* systemInfo = nullptr;\r
snd_seq_client_info_t* clientInfo = nullptr;\r
\r
snd_seq_system_info_alloca (&systemInfo);\r
- jassert(systemInfo);\r
+ jassert (systemInfo != nullptr);\r
+\r
if (snd_seq_system_info (seqHandle, systemInfo) == 0)\r
{\r
snd_seq_client_info_alloca (&clientInfo);\r
- jassert(clientInfo);\r
- int numClients = snd_seq_system_info_get_cur_clients (systemInfo);\r
+ jassert (clientInfo != nullptr);\r
+\r
+ auto numClients = snd_seq_system_info_get_cur_clients (systemInfo);\r
\r
while (--numClients >= 0)\r
{\r
if (snd_seq_query_next_client (seqHandle, clientInfo) == 0)\r
{\r
- const int sourceClient = snd_seq_client_info_get_client (clientInfo);\r
- if (sourceClient != client->getId()\r
- && sourceClient != SND_SEQ_CLIENT_SYSTEM)\r
+ auto sourceClient = snd_seq_client_info_get_client (clientInfo);\r
+\r
+ if (sourceClient != client->getId() && sourceClient != SND_SEQ_CLIENT_SYSTEM)\r
{\r
port = iterateMidiClient (client, clientInfo, forInput,\r
deviceNamesFound, deviceIndexToOpen);\r
- if (port)\r
+ if (port != nullptr)\r
break;\r
}\r
}\r
MidiOutput* newDevice = nullptr;\r
\r
StringArray devices;\r
- AlsaClient::Port* port = iterateMidiDevices (false, devices, deviceIndex);\r
+ auto* port = iterateMidiDevices (false, devices, deviceIndex);\r
\r
if (port == nullptr)\r
return nullptr;\r
MidiOutput* MidiOutput::createNewDevice (const String& deviceName)\r
{\r
MidiOutput* newDevice = nullptr;\r
-\r
- const AlsaClient::Ptr client (AlsaClient::getInstance());\r
-\r
- AlsaClient::Port* port = client->createPort (deviceName, false, true);\r
-\r
- jassert (port->isValid());\r
+ auto client = AlsaClient::getInstance();\r
+ auto* port = client->createPort (deviceName, false, true);\r
+ jassert (port != nullptr && port->isValid());\r
\r
newDevice = new MidiOutput (deviceName);\r
port->setupOutput();\r
MidiOutput::~MidiOutput()\r
{\r
stopBackgroundThread();\r
-\r
- AlsaClient::Ptr client (AlsaClient::getInstance());\r
- client->deletePort (static_cast<AlsaClient::Port*> (internal));\r
+ AlsaClient::getInstance()->deletePort (static_cast<AlsaClient::Port*> (internal));\r
}\r
\r
void MidiOutput::sendMessageNow (const MidiMessage& message)\r
MidiInput::~MidiInput()\r
{\r
stop();\r
- AlsaClient::Ptr client (AlsaClient::getInstance());\r
- client->deletePort (static_cast<AlsaClient::Port*> (internal));\r
+ AlsaClient::getInstance()->deletePort (static_cast<AlsaClient::Port*> (internal));\r
}\r
\r
void MidiInput::start()\r
MidiInput* newDevice = nullptr;\r
\r
StringArray devices;\r
- AlsaClient::Port* port = iterateMidiDevices (true, devices, deviceIndex);\r
+ auto* port = iterateMidiDevices (true, devices, deviceIndex);\r
\r
if (port == nullptr)\r
return nullptr;\r
{\r
MidiInput* newDevice = nullptr;\r
\r
- AlsaClient::Ptr client (AlsaClient::getInstance());\r
-\r
- AlsaClient::Port* port = client->createPort (deviceName, true, true);\r
+ auto client = AlsaClient::getInstance();\r
+ auto* port = client->createPort (deviceName, true, true);\r
\r
jassert (port->isValid());\r
\r
int inputIndex, outputIndex;\r
\r
private:\r
- ScopedPointer<CoreAudioInternal> internal;\r
+ std::unique_ptr<CoreAudioInternal> internal;\r
bool isOpen_, isStarted;\r
String lastError;\r
AudioIODeviceCallback* previousCallback = nullptr;\r
void audioDeviceError (const String& errorMessage) override { owner.handleAudioDeviceError (errorMessage); }\r
\r
AudioIODeviceCombiner& owner;\r
- ScopedPointer<CoreAudioIODevice> device;\r
+ std::unique_ptr<CoreAudioIODevice> device;\r
int inputIndex = 0, numInputChans = 0, outputIndex = 0, numOutputChans = 0;\r
bool useInputs = false, useOutputs = false;\r
AbstractFifo inputFifo { 32 }, outputFifo { 32 };\r
if (inputDeviceID == outputDeviceID)\r
return new CoreAudioIODevice (*this, combinedName, inputDeviceID, inputIndex, outputDeviceID, outputIndex);\r
\r
- ScopedPointer<CoreAudioIODevice> in, out;\r
+ std::unique_ptr<CoreAudioIODevice> in, out;\r
\r
if (inputDeviceID != 0)\r
in.reset (new CoreAudioIODevice (*this, inputDeviceName, inputDeviceID, inputIndex, 0, -1));\r
if (in == nullptr) return out.release();\r
if (out == nullptr) return in.release();\r
\r
- ScopedPointer<AudioIODeviceCombiner> combo (new AudioIODeviceCombiner (combinedName, *this));\r
+ std::unique_ptr<AudioIODeviceCombiner> combo (new AudioIODeviceCombiner (combinedName, *this));\r
combo->addDevice (in.release(), true, false);\r
combo->addDevice (out.release(), false, true);\r
return combo.release();\r
\r
namespace CoreMidiHelpers\r
{\r
- static bool checkError (const OSStatus err, const int lineNum)\r
+ static bool checkError (OSStatus err, int lineNum)\r
{\r
if (err == noErr)\r
return true;\r
//==============================================================================\r
struct ScopedCFString\r
{\r
- ScopedCFString() noexcept : cfString (nullptr) {}\r
+ ScopedCFString() noexcept {}\r
~ScopedCFString() noexcept { if (cfString != nullptr) CFRelease (cfString); }\r
\r
- CFStringRef cfString;\r
+ CFStringRef cfString = {};\r
};\r
\r
static String getMidiObjectName (MIDIObjectRef entity)\r
\r
static String getEndpointName (MIDIEndpointRef endpoint, bool isExternal)\r
{\r
- String result (getMidiObjectName (endpoint));\r
+ auto result = getMidiObjectName (endpoint);\r
\r
MIDIEntityRef entity = 0; // NB: don't attempt to use nullptr for refs - it fails in some types of build.\r
MIDIEndpointGetEntity (endpoint, &entity);\r
\r
if (device != 0)\r
{\r
- const String deviceName (getMidiObjectName (device));\r
+ auto deviceName = getMidiObjectName (device);\r
\r
if (deviceName.isNotEmpty())\r
{\r
\r
if (numConnections > 0)\r
{\r
- const SInt32* pid = reinterpret_cast<const SInt32*> (CFDataGetBytePtr (connections));\r
+ auto pid = reinterpret_cast<const SInt32*> (CFDataGetBytePtr (connections));\r
\r
for (int i = 0; i < numConnections; ++i, ++pid)\r
{\r
- MIDIUniqueID uid = (MIDIUniqueID) ByteOrder::swapIfLittleEndian ((uint32) *pid);\r
+ auto uid = (MIDIUniqueID) ByteOrder::swapIfLittleEndian ((uint32) *pid);\r
MIDIObjectRef connObject;\r
MIDIObjectType connObjectType;\r
- OSStatus err = MIDIObjectFindByUniqueID (uid, &connObject, &connObjectType);\r
+ auto err = MIDIObjectFindByUniqueID (uid, &connObject, &connObjectType);\r
\r
if (err == noErr)\r
{\r
#if defined (JucePlugin_CFBundleIdentifier)\r
portUniqueId = JUCE_STRINGIFY (JucePlugin_CFBundleIdentifier);\r
#else\r
- File appBundle (File::getSpecialLocation (File::currentApplicationFile));\r
- CFURLRef bundleURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, appBundle.getFullPathName().toCFString(), kCFURLPOSIXPathStyle, true);\r
- if (bundleURL != nullptr)\r
+ auto appBundle = File::getSpecialLocation (File::currentApplicationFile);\r
+\r
+ if (auto bundleURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, appBundle.getFullPathName().toCFString(),\r
+ kCFURLPOSIXPathStyle, true))\r
{\r
- CFBundleRef bundleRef = CFBundleCreate (kCFAllocatorDefault, bundleURL);\r
+ auto bundleRef = CFBundleCreate (kCFAllocatorDefault, bundleURL);\r
CFRelease (bundleURL);\r
\r
if (bundleRef != nullptr)\r
\r
if (portUniqueId.isNotEmpty())\r
{\r
- portUniqueId += (String ("." + portName + String (isInput ? ".input" : ".output")));\r
+ portUniqueId += "." + portName + (isInput ? ".input" : ".output");\r
\r
CHECK_ERROR (MIDIObjectSetStringProperty (device, kMIDIPropertyUniqueID, portUniqueId.toCFString()));\r
}\r
}\r
\r
- static StringArray findDevices (const bool forInput)\r
+ static StringArray findDevices (bool forInput)\r
{\r
// It seems that OSX can be a bit picky about the thread that's first used to\r
// search for devices. It's safest to use the message thread for calling this.\r
jassert (MessageManager::getInstance()->isThisTheMessageThread());\r
\r
+ StringArray s;\r
enableSimulatorMidiSession();\r
\r
- const ItemCount num = forInput ? MIDIGetNumberOfSources()\r
- : MIDIGetNumberOfDestinations();\r
- StringArray s;\r
+ auto num = forInput ? MIDIGetNumberOfSources()\r
+ : MIDIGetNumberOfDestinations();\r
\r
for (ItemCount i = 0; i < num; ++i)\r
{\r
- MIDIEndpointRef dest = forInput ? MIDIGetSource (i)\r
- : MIDIGetDestination (i);\r
String name;\r
\r
- if (dest != 0)\r
+ if (auto dest = forInput ? MIDIGetSource (i)\r
+ : MIDIGetDestination (i))\r
name = getConnectedEndpointName (dest);\r
\r
if (name.isEmpty())\r
MIDIEndpointDispose (endPoint);\r
}\r
\r
- void send (const MIDIPacketList* const packets) noexcept\r
+ void send (const MIDIPacketList* packets) noexcept\r
{\r
if (port != 0)\r
MIDISend (port, endPoint, packets);\r
};\r
\r
//==============================================================================\r
- class MidiPortAndCallback;\r
+ struct MidiPortAndCallback;\r
CriticalSection callbackLock;\r
Array<MidiPortAndCallback*> activeCallbacks;\r
\r
- class MidiPortAndCallback\r
+ struct MidiPortAndCallback\r
{\r
- public:\r
- MidiPortAndCallback (MidiInputCallback& cb) : callback (cb)\r
- {\r
- }\r
+ MidiPortAndCallback (MidiInputCallback& cb) : callback (cb) {}\r
\r
~MidiPortAndCallback()\r
{\r
CHECK_ERROR (MIDIPortDisconnectSource (portAndEndpoint->port, portAndEndpoint->endPoint));\r
}\r
\r
- void handlePackets (const MIDIPacketList* const pktlist)\r
+ void handlePackets (const MIDIPacketList* pktlist)\r
{\r
auto time = Time::getMillisecondCounterHiRes() * 0.001;\r
\r
}\r
\r
MidiInput* input = nullptr;\r
- ScopedPointer<MidiPortAndEndpoint> portAndEndpoint;\r
- volatile bool active = false;\r
+ std::unique_ptr<MidiPortAndEndpoint> portAndEndpoint;\r
+ std::atomic<bool> active { false };\r
\r
private:\r
MidiInputCallback& callback;\r
\r
if (isPositiveAndBelow (index, MIDIGetNumberOfDestinations()))\r
{\r
- MIDIEndpointRef endPoint = MIDIGetDestination ((ItemCount) index);\r
+ auto endPoint = MIDIGetDestination ((ItemCount) index);\r
\r
CoreMidiHelpers::ScopedCFString pname;\r
\r
if (CHECK_ERROR (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &pname.cfString)))\r
{\r
- MIDIClientRef client = CoreMidiHelpers::getGlobalMidiClient();\r
+ auto client = CoreMidiHelpers::getGlobalMidiClient();\r
MIDIPortRef port;\r
- String deviceName = CoreMidiHelpers::getConnectedEndpointName (endPoint);\r
+ auto deviceName = CoreMidiHelpers::getConnectedEndpointName (endPoint);\r
\r
if (client != 0 && CHECK_ERROR (MIDIOutputPortCreate (client, pname.cfString, &port)))\r
{\r
{\r
CoreMidiHelpers::setUniqueIdForMidiPort (endPoint, deviceName, false);\r
\r
- MidiOutput* mo = new MidiOutput (deviceName);\r
+ auto mo = new MidiOutput (deviceName);\r
mo->internal = new CoreMidiHelpers::MidiPortAndEndpoint (0, endPoint);\r
return mo;\r
}\r
\r
HeapBlock<MIDIPacketList> allocatedPackets;\r
MIDIPacketList stackPacket;\r
- MIDIPacketList* packetToSend = &stackPacket;\r
- const size_t dataSize = (size_t) message.getRawDataSize();\r
+ auto* packetToSend = &stackPacket;\r
+ auto dataSize = (size_t) message.getRawDataSize();\r
\r
if (message.isSysEx())\r
{\r
packetToSend = allocatedPackets;\r
packetToSend->numPackets = (UInt32) numPackets;\r
\r
- MIDIPacket* p = packetToSend->packet;\r
+ auto* p = packetToSend->packet;\r
\r
for (int i = 0; i < numPackets; ++i)\r
{\r
}\r
else if (dataSize < 65536) // max packet size\r
{\r
- const size_t stackCapacity = sizeof (stackPacket.packet->data);\r
+ auto stackCapacity = sizeof (stackPacket.packet->data);\r
\r
if (dataSize > stackCapacity)\r
{\r
}\r
\r
packetToSend->numPackets = 1;\r
- MIDIPacket& p = *(packetToSend->packet);\r
+ auto& p = *(packetToSend->packet);\r
p.timeStamp = timeStamp;\r
p.length = (UInt16) dataSize;\r
memcpy (p.data, message.getRawData(), dataSize);\r
\r
if (isPositiveAndBelow (index, MIDIGetNumberOfSources()))\r
{\r
- if (MIDIEndpointRef endPoint = MIDIGetSource ((ItemCount) index))\r
+ if (auto endPoint = MIDIGetSource ((ItemCount) index))\r
{\r
ScopedCFString name;\r
\r
if (CHECK_ERROR (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &name.cfString)))\r
{\r
- if (MIDIClientRef client = getGlobalMidiClient())\r
+ if (auto client = getGlobalMidiClient())\r
{\r
MIDIPortRef port;\r
- ScopedPointer<MidiPortAndCallback> mpc (new MidiPortAndCallback (*callback));\r
+ std::unique_ptr<MidiPortAndCallback> mpc (new MidiPortAndCallback (*callback));\r
\r
if (CHECK_ERROR (MIDIInputPortCreate (client, name.cfString, midiInputProc, mpc.get(), &port)))\r
{\r
MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallback* callback)\r
{\r
jassert (callback != nullptr);\r
-\r
using namespace CoreMidiHelpers;\r
- MidiInput* mi = nullptr;\r
\r
- if (MIDIClientRef client = getGlobalMidiClient())\r
+ if (auto client = getGlobalMidiClient())\r
{\r
- ScopedPointer<MidiPortAndCallback> mpc (new MidiPortAndCallback (*callback));\r
+ std::unique_ptr<MidiPortAndCallback> mpc (new MidiPortAndCallback (*callback));\r
mpc->active = false;\r
\r
MIDIEndpointRef endPoint;\r
\r
if (CHECK_ERROR (MIDIDestinationCreate (client, name.cfString, midiInputProc, mpc.get(), &endPoint)))\r
{\r
- CoreMidiHelpers::setUniqueIdForMidiPort (endPoint, deviceName, true);\r
+ setUniqueIdForMidiPort (endPoint, deviceName, true);\r
\r
mpc->portAndEndpoint.reset (new MidiPortAndEndpoint (0, endPoint));\r
\r
- mi = new MidiInput (deviceName);\r
+ auto mi = new MidiInput (deviceName);\r
mpc->input = mi;\r
mi->internal = mpc.get();\r
\r
const ScopedLock sl (callbackLock);\r
activeCallbacks.add (mpc.release());\r
+\r
+ return mi;\r
}\r
}\r
\r
- return mi;\r
+ return nullptr;\r
}\r
\r
MidiInput::MidiInput (const String& nm) : name (nm)\r
{\r
ASIOSampleFormat() noexcept {}\r
\r
- ASIOSampleFormat (const long type) noexcept\r
- : bitDepth (24),\r
- littleEndian (true),\r
- formatIsFloat (false),\r
- byteStride (4)\r
+ ASIOSampleFormat (long type) noexcept\r
{\r
switch (type)\r
{\r
}\r
}\r
\r
- void convertToFloat (const void* const src, float* const dst, const int samps) const noexcept\r
+ void convertToFloat (const void* src, float* dst, int samps) const noexcept\r
{\r
if (formatIsFloat)\r
{\r
}\r
}\r
\r
- void convertFromFloat (const float* const src, void* const dst, const int samps) const noexcept\r
+ void convertFromFloat (const float* src, void* dst, int samps) const noexcept\r
{\r
if (formatIsFloat)\r
{\r
}\r
}\r
\r
- void clear (void* dst, const int numSamps) noexcept\r
+ void clear (void* dst, int numSamps) noexcept\r
{\r
if (dst != nullptr)\r
zeromem (dst, numSamps * byteStride);\r
}\r
\r
- int bitDepth, byteStride;\r
- bool formatIsFloat, littleEndian;\r
+ int bitDepth = 24, byteStride = 4;\r
+ bool formatIsFloat = false, littleEndian = true;\r
\r
private:\r
- static void convertInt16ToFloat (const char* src, float* dest, const int srcStrideBytes,\r
- int numSamples, const bool littleEndian) noexcept\r
+ static void convertInt16ToFloat (const char* src, float* dest, int srcStrideBytes,\r
+ int numSamples, bool littleEndian) noexcept\r
{\r
const double g = 1.0 / 32768.0;\r
\r
}\r
}\r
\r
- static void convertFloatToInt16 (const float* src, char* dest, const int dstStrideBytes,\r
- int numSamples, const bool littleEndian) noexcept\r
+ static void convertFloatToInt16 (const float* src, char* dest, int dstStrideBytes,\r
+ int numSamples, bool littleEndian) noexcept\r
{\r
const double maxVal = (double) 0x7fff;\r
\r
}\r
}\r
\r
- static void convertInt24ToFloat (const char* src, float* dest, const int srcStrideBytes,\r
- int numSamples, const bool littleEndian) noexcept\r
+ static void convertInt24ToFloat (const char* src, float* dest, int srcStrideBytes,\r
+ int numSamples, bool littleEndian) noexcept\r
{\r
const double g = 1.0 / 0x7fffff;\r
\r
}\r
}\r
\r
- static void convertFloatToInt24 (const float* src, char* dest, const int dstStrideBytes,\r
- int numSamples, const bool littleEndian) noexcept\r
+ static void convertFloatToInt24 (const float* src, char* dest, int dstStrideBytes,\r
+ int numSamples, bool littleEndian) noexcept\r
{\r
const double maxVal = (double) 0x7fffff;\r
\r
}\r
}\r
\r
- static void convertInt32ToFloat (const char* src, float* dest, const int srcStrideBytes,\r
- int numSamples, const bool littleEndian) noexcept\r
+ static void convertInt32ToFloat (const char* src, float* dest, int srcStrideBytes,\r
+ int numSamples, bool littleEndian) noexcept\r
{\r
const double g = 1.0 / 0x7fffffff;\r
\r
}\r
}\r
\r
- static void convertFloatToInt32 (const float* src, char* dest, const int dstStrideBytes,\r
- int numSamples, const bool littleEndian) noexcept\r
+ static void convertFloatToInt32 (const float* src, char* dest, int dstStrideBytes,\r
+ int numSamples, bool littleEndian) noexcept\r
{\r
const double maxVal = (double) 0x7fffffff;\r
\r
};\r
\r
//==============================================================================\r
+constexpr int maxNumASIODevices = 16;\r
class ASIOAudioIODevice;\r
-static ASIOAudioIODevice* volatile currentASIODev[16] = { 0 };\r
+static ASIOAudioIODevice* currentASIODev[maxNumASIODevices] = {};\r
\r
extern HWND juce_messageWindowHandle;\r
\r
{\r
public:\r
ASIOAudioIODevice (ASIOAudioIODeviceType* ownerType, const String& devName,\r
- const CLSID clsID, const int slotNumber)\r
+ CLSID clsID, int slotNumber)\r
: AudioIODevice (devName, "ASIO"),\r
owner (ownerType),\r
- asioObject (nullptr),\r
- classId (clsID),\r
- inputLatency (0),\r
- outputLatency (0),\r
- minBufferSize (0), maxBufferSize (0),\r
- preferredBufferSize (0),\r
- bufferGranularity (0),\r
- numClockSources (0),\r
- currentBlockSizeSamples (0),\r
- currentBitDepth (16),\r
- currentSampleRate (0),\r
- currentCallback (nullptr),\r
- bufferIndex (0),\r
- numActiveInputChans (0),\r
- numActiveOutputChans (0),\r
- deviceIsOpen (false),\r
- isStarted (false),\r
- buffersCreated (false),\r
- calledback (false),\r
- littleEndian (false),\r
- postOutput (true),\r
- needToReset (false),\r
- insideControlPanelModalLoop (false),\r
- shouldUsePreferredSize (false)\r
+ classId (clsID)\r
{\r
::CoInitialize (nullptr);\r
\r
inBuffers.calloc (4);\r
outBuffers.calloc (4);\r
\r
- jassert (currentASIODev [slotNumber] == nullptr);\r
- currentASIODev [slotNumber] = this;\r
+ jassert (currentASIODev[slotNumber] == nullptr);\r
+ currentASIODev[slotNumber] = this;\r
\r
openDevice();\r
}\r
\r
~ASIOAudioIODevice()\r
{\r
- for (int i = 0; i < numElementsInArray (currentASIODev); ++i)\r
+ for (int i = 0; i < maxNumASIODevices; ++i)\r
if (currentASIODev[i] == this)\r
currentASIODev[i] = nullptr;\r
\r
\r
if (newRates.isEmpty())\r
{\r
- double cr = getSampleRate();\r
+ auto cr = getSampleRate();\r
JUCE_ASIO_LOG ("No sample rates supported - current rate: " + String ((int) cr));\r
\r
if (cr > 0)\r
\r
#if JUCE_ASIO_DEBUGGING\r
StringArray s;\r
- for (int i = 0; i < sampleRates.size(); ++i)\r
- s.add (String (sampleRates.getUnchecked(i)));\r
+\r
+ for (auto r : sampleRates)\r
+ s.add (String (r));\r
\r
JUCE_ASIO_LOG ("Rates: " + s.joinIntoString (" "));\r
#endif\r
\r
if (asioObject == nullptr)\r
{\r
- const String openingError (openDevice());\r
+ auto openingError = openDevice();\r
\r
if (asioObject == nullptr)\r
return openingError;\r
}\r
\r
isStarted = false;\r
- bufferIndex = -1;\r
\r
- long err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans);\r
+ auto err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans);\r
jassert (err == ASE_OK);\r
\r
bufferSizeSamples = readBufferSizes (bufferSizeSamples);\r
\r
- double sampleRate = sr;\r
+ auto sampleRate = sr;\r
currentSampleRate = sampleRate;\r
currentBlockSizeSamples = bufferSizeSamples;\r
currentChansOut.clear();\r
if (sampleRate == 0 || (sampleRates.size() > 0 && ! sampleRates.contains (sampleRate)))\r
sampleRate = sampleRates[0];\r
\r
- jassert (sampleRate != 0);\r
if (sampleRate == 0)\r
+ {\r
+ jassertfalse;\r
sampleRate = 44100.0;\r
+ }\r
\r
updateClockSources();\r
currentSampleRate = getSampleRate();\r
needToReset = false;\r
}\r
\r
- const int totalBuffers = resetBuffers (inputChannels, outputChannels);\r
+ auto totalBuffers = resetBuffers (inputChannels, outputChannels);\r
\r
setCallbackFunctions();\r
\r
if (err == ASE_OK)\r
{\r
buffersCreated = true;\r
- tempBuffer.calloc (totalBuffers * currentBlockSizeSamples + 32);\r
+ ioBufferSpace.calloc (totalBuffers * currentBlockSizeSamples + 32);\r
\r
int n = 0;\r
Array<int> types;\r
{\r
if (inputChannels[i])\r
{\r
- inBuffers[n] = tempBuffer + (currentBlockSizeSamples * n);\r
+ inBuffers[n] = ioBufferSpace + (currentBlockSizeSamples * n);\r
\r
ASIOChannelInfo channelInfo = { 0 };\r
channelInfo.channel = i;\r
{\r
if (outputChannels[i])\r
{\r
- outBuffers[n] = tempBuffer + (currentBlockSizeSamples * (numActiveInputChans + n));\r
+ outBuffers[n] = ioBufferSpace + (currentBlockSizeSamples * (numActiveInputChans + n));\r
\r
ASIOChannelInfo channelInfo = { 0 };\r
channelInfo.channel = i;\r
\r
for (int i = 0; i < numActiveOutputChans; ++i)\r
{\r
- outputFormat[i].clear (bufferInfos [numActiveInputChans + i].buffers[0], currentBlockSizeSamples);\r
- outputFormat[i].clear (bufferInfos [numActiveInputChans + i].buffers[1], currentBlockSizeSamples);\r
+ outputFormat[i].clear (bufferInfos[numActiveInputChans + i].buffers[0], currentBlockSizeSamples);\r
+ outputFormat[i].clear (bufferInfos[numActiveInputChans + i].buffers[1], currentBlockSizeSamples);\r
}\r
\r
readLatencies();\r
isStarted = false;\r
deviceIsOpen = false;\r
\r
- const String errorCopy (error);\r
+ auto errorCopy = error;\r
close(); // (this resets the error string)\r
error = errorCopy;\r
}\r
\r
void stop() override\r
{\r
- AudioIODeviceCallback* const lastCallback = currentCallback;\r
+ auto* lastCallback = currentCallback;\r
\r
{\r
const ScopedLock sl (callbackLock);\r
\r
bool done = false;\r
insideControlPanelModalLoop = true;\r
-\r
- const uint32 started = Time::getMillisecondCounter();\r
+ auto started = Time::getMillisecondCounter();\r
\r
if (asioObject != nullptr)\r
{\r
asioObject->controlPanel();\r
\r
- const int spent = (int) Time::getMillisecondCounter() - (int) started;\r
-\r
+ auto spent = (int) (Time::getMillisecondCounter() - started);\r
JUCE_ASIO_LOG ("spent: " + String (spent));\r
\r
if (spent > 300)\r
if (! insideControlPanelModalLoop)\r
{\r
stopTimer();\r
-\r
JUCE_ASIO_LOG ("restart request!");\r
\r
- AudioIODeviceCallback* const oldCallback = currentCallback;\r
-\r
+ auto* oldCallback = currentCallback;\r
close();\r
-\r
needToReset = true;\r
open (BigInteger (currentChansIn), BigInteger (currentChansOut),\r
currentSampleRate, currentBlockSizeSamples);\r
private:\r
//==============================================================================\r
WeakReference<ASIOAudioIODeviceType> owner;\r
- IASIO* volatile asioObject;\r
+ IASIO* asioObject = {};\r
ASIOCallbacks callbacks;\r
\r
CLSID classId;\r
String error;\r
\r
- long totalNumInputChans, totalNumOutputChans;\r
+ long totalNumInputChans = 0, totalNumOutputChans = 0;\r
StringArray inputChannelNames, outputChannelNames;\r
\r
Array<double> sampleRates;\r
Array<int> bufferSizes;\r
- long inputLatency, outputLatency;\r
- long minBufferSize, maxBufferSize, preferredBufferSize, bufferGranularity;\r
- ASIOClockSource clocks[32];\r
- int numClockSources;\r
-\r
- int volatile currentBlockSizeSamples;\r
- int volatile currentBitDepth;\r
- double volatile currentSampleRate;\r
+ long inputLatency = 0, outputLatency = 0;\r
+ long minBufferSize = 0, maxBufferSize = 0, preferredBufferSize = 0, bufferGranularity = 0;\r
+ ASIOClockSource clocks[32] = {};\r
+ int numClockSources = 0;\r
+\r
+ int currentBlockSizeSamples = 0;\r
+ int currentBitDepth = 16;\r
+ double currentSampleRate = 0;\r
BigInteger currentChansOut, currentChansIn;\r
- AudioIODeviceCallback* volatile currentCallback;\r
+ AudioIODeviceCallback* currentCallback = {};\r
CriticalSection callbackLock;\r
\r
HeapBlock<ASIOBufferInfo> bufferInfos;\r
HeapBlock<float*> inBuffers, outBuffers;\r
+ HeapBlock<float> ioBufferSpace;\r
HeapBlock<ASIOSampleFormat> inputFormat, outputFormat;\r
+ int numActiveInputChans = 0, numActiveOutputChans = 0;\r
\r
- WaitableEvent event1;\r
- HeapBlock<float> tempBuffer;\r
- int volatile bufferIndex, numActiveInputChans, numActiveOutputChans;\r
-\r
- bool deviceIsOpen, isStarted, buffersCreated;\r
- bool volatile calledback;\r
- bool volatile littleEndian, postOutput, needToReset;\r
- bool volatile insideControlPanelModalLoop;\r
- bool volatile shouldUsePreferredSize;\r
+ bool deviceIsOpen = false, isStarted = false, buffersCreated = false;\r
+ std::atomic<bool> calledback { false };\r
+ bool littleEndian = false, postOutput = true, needToReset = false;\r
+ bool insideControlPanelModalLoop = false;\r
+ bool shouldUsePreferredSize = false;\r
int xruns = 0;\r
\r
//==============================================================================\r
- static String convertASIOString (char* const text, int length)\r
+ static String convertASIOString (char* text, int length)\r
{\r
if (CharPointer_UTF8::isValidString (text, length))\r
return String::fromUTF8 (text, length);\r
\r
- WCHAR wideVersion [64] = { 0 };\r
+ WCHAR wideVersion[64] = {};\r
MultiByteToWideChar (CP_ACP, 0, text, length, wideVersion, numElementsInArray (wideVersion));\r
return wideVersion;\r
}\r
if (shouldUsePreferredSize)\r
{\r
JUCE_ASIO_LOG ("Using preferred size for buffer..");\r
- long err = refreshBufferSizes();\r
+ auto err = refreshBufferSizes();\r
\r
if (err == ASE_OK)\r
{\r
{\r
numActiveInputChans = 0;\r
numActiveOutputChans = 0;\r
+ auto* info = bufferInfos.get();\r
\r
- ASIOBufferInfo* info = bufferInfos;\r
for (int i = 0; i < totalNumInputChans; ++i)\r
{\r
if (inputChannels[i])\r
double getSampleRate() const\r
{\r
double cr = 0;\r
- long err = asioObject->getSampleRate (&cr);\r
+ auto err = asioObject->getSampleRate (&cr);\r
JUCE_ASIO_LOG_ERROR ("getSampleRate", err);\r
return cr;\r
}\r
if (currentSampleRate != newRate)\r
{\r
JUCE_ASIO_LOG ("rate change: " + String (currentSampleRate) + " to " + String (newRate));\r
- long err = asioObject->setSampleRate (newRate);\r
+ auto err = asioObject->setSampleRate (newRate);\r
\r
if (err == ASE_NoClock && numClockSources > 0)\r
{\r
Thread::sleep (10);\r
err = asioObject->setClockSource (clocks[0].index);\r
JUCE_ASIO_LOG_ERROR ("setClockSource2", err);\r
-\r
Thread::sleep (10);\r
err = asioObject->setSampleRate (newRate);\r
}\r
if (numClockSources > 1 && ! isSourceSet)\r
{\r
JUCE_ASIO_LOG ("setting clock source");\r
- long err = asioObject->setClockSource (clocks[0].index);\r
+ auto err = asioObject->setClockSource (clocks[0].index);\r
JUCE_ASIO_LOG_ERROR ("setClockSource1", err);\r
Thread::sleep (20);\r
}\r
numActiveInputChans = 0;\r
numActiveOutputChans = 0;\r
\r
- ASIOBufferInfo* info = bufferInfos;\r
+ auto* info = bufferInfos.get();\r
int numChans = 0;\r
\r
for (int i = 0; i < jmin (2, (int) totalNumInputChans); ++i)\r
\r
if (preferredSize > 0)\r
{\r
- long err = asioObject->createBuffers (bufferInfos, numChans, preferredSize, &callbacks);\r
+ auto err = asioObject->createBuffers (bufferInfos, numChans, preferredSize, &callbacks);\r
JUCE_ASIO_LOG_ERROR ("dummy buffers", err);\r
}\r
\r
if (i < 2)\r
{\r
// clear the channels that are used with the dummy stuff\r
- outputFormat[i].clear (bufferInfos [outputBufferIndex + i].buffers[0], preferredBufferSize);\r
- outputFormat[i].clear (bufferInfos [outputBufferIndex + i].buffers[1], preferredBufferSize);\r
+ outputFormat[i].clear (bufferInfos[outputBufferIndex + i].buffers[0], preferredBufferSize);\r
+ outputFormat[i].clear (bufferInfos[outputBufferIndex + i].buffers[1], preferredBufferSize);\r
}\r
}\r
}\r
String getLastDriverError() const\r
{\r
jassert (asioObject != nullptr);\r
- char buffer [512] = { 0 };\r
+ char buffer[512] = {};\r
asioObject->getErrorMessage (buffer);\r
return String (buffer, sizeof (buffer) - 1);\r
}\r
\r
if (driverError.isEmpty())\r
{\r
- char buffer [512];\r
+ char buffer[512] = {};\r
asioObject->getDriverName (buffer); // just in case any flimsy drivers expect this to be called..\r
}\r
\r
numActiveOutputChans = 0;\r
xruns = 0;\r
currentCallback = nullptr;\r
-\r
error.clear();\r
\r
if (getName().isEmpty())\r
{\r
addBufferSizes (minBufferSize, maxBufferSize, preferredBufferSize, bufferGranularity);\r
\r
- double currentRate = getSampleRate();\r
+ auto currentRate = getSampleRate();\r
\r
if (currentRate < 1.0 || currentRate > 192001.0)\r
{\r
}\r
\r
currentSampleRate = currentRate;\r
-\r
postOutput = (asioObject->outputReady() == 0);\r
+\r
if (postOutput)\r
JUCE_ASIO_LOG ("outputReady true");\r
\r
updateSampleRates();\r
-\r
readLatencies(); // ..doing these steps because cubase does so at this stage\r
createDummyBuffers (preferredBufferSize); // in initialisation, and some devices fail if we don't.\r
readLatencies();\r
}\r
\r
//==============================================================================\r
- void JUCE_ASIOCALLBACK callback (const long index)\r
+ void JUCE_ASIOCALLBACK callback (long index)\r
{\r
if (isStarted)\r
{\r
- bufferIndex = index;\r
- processBuffer();\r
+ processBuffer (index);\r
}\r
else\r
{\r
calledback = true;\r
}\r
\r
- void processBuffer()\r
+ void processBuffer (long bufferIndex)\r
{\r
- const ASIOBufferInfo* const infos = bufferInfos;\r
- const int bi = bufferIndex;\r
-\r
const ScopedLock sl (callbackLock);\r
\r
- if (bi >= 0)\r
+ if (bufferIndex >= 0)\r
{\r
- const int samps = currentBlockSizeSamples;\r
+ auto* infos = bufferInfos.get();\r
+ auto samps = currentBlockSizeSamples;\r
\r
if (currentCallback != nullptr)\r
{\r
for (int i = 0; i < numActiveInputChans; ++i)\r
{\r
jassert (inBuffers[i] != nullptr);\r
- inputFormat[i].convertToFloat (infos[i].buffers[bi], inBuffers[i], samps);\r
+ inputFormat[i].convertToFloat (infos[i].buffers[bufferIndex], inBuffers[i], samps);\r
}\r
\r
currentCallback->audioDeviceIOCallback (const_cast<const float**> (inBuffers.getData()), numActiveInputChans,\r
for (int i = 0; i < numActiveOutputChans; ++i)\r
{\r
jassert (outBuffers[i] != nullptr);\r
- outputFormat[i].convertFromFloat (outBuffers[i], infos [numActiveInputChans + i].buffers[bi], samps);\r
+ outputFormat[i].convertFromFloat (outBuffers[i], infos[numActiveInputChans + i].buffers[bufferIndex], samps);\r
}\r
}\r
else\r
{\r
for (int i = 0; i < numActiveOutputChans; ++i)\r
- outputFormat[i].clear (infos[numActiveInputChans + i].buffers[bi], samps);\r
+ outputFormat[i].clear (infos[numActiveInputChans + i].buffers[bufferIndex], samps);\r
}\r
}\r
\r
return 1;\r
break;\r
\r
- case kAsioBufferSizeChange: JUCE_ASIO_LOG ("kAsioBufferSizeChange"); resetRequest(); return 1;\r
- case kAsioResetRequest: JUCE_ASIO_LOG ("kAsioResetRequest"); resetRequest(); return 1;\r
- case kAsioResyncRequest: JUCE_ASIO_LOG ("kAsioResyncRequest"); resetRequest(); return 1;\r
- case kAsioLatenciesChanged: JUCE_ASIO_LOG ("kAsioLatenciesChanged"); return 1;\r
- case kAsioEngineVersion: return 2;\r
+ case kAsioBufferSizeChange: JUCE_ASIO_LOG ("kAsioBufferSizeChange"); resetRequest(); return 1;\r
+ case kAsioResetRequest: JUCE_ASIO_LOG ("kAsioResetRequest"); resetRequest(); return 1;\r
+ case kAsioResyncRequest: JUCE_ASIO_LOG ("kAsioResyncRequest"); resetRequest(); return 1;\r
+ case kAsioLatenciesChanged: JUCE_ASIO_LOG ("kAsioLatenciesChanged"); return 1;\r
+ case kAsioEngineVersion: return 2;\r
\r
case kAsioSupportsTimeInfo:\r
case kAsioSupportsTimeCode: return 0;\r
- case kAsioOverload: xruns++; return 1;\r
+ case kAsioOverload: ++xruns; return 1;\r
}\r
\r
return 0;\r
{\r
static ASIOTime* JUCE_ASIOCALLBACK bufferSwitchTimeInfoCallback (ASIOTime*, long index, long)\r
{\r
- if (currentASIODev[deviceIndex] != nullptr)\r
- currentASIODev[deviceIndex]->callback (index);\r
+ if (auto* d = currentASIODev[deviceIndex])\r
+ d->callback (index);\r
\r
- return nullptr;\r
+ return {};\r
}\r
\r
static void JUCE_ASIOCALLBACK bufferSwitchCallback (long index, long)\r
{\r
- if (currentASIODev[deviceIndex] != nullptr)\r
- currentASIODev[deviceIndex]->callback (index);\r
+ if (auto* d = currentASIODev[deviceIndex])\r
+ d->callback (index);\r
}\r
\r
static long JUCE_ASIOCALLBACK asioMessagesCallback (long selector, long value, void*, double*)\r
{\r
- return currentASIODev[deviceIndex] != nullptr\r
- ? currentASIODev[deviceIndex]->asioMessagesCallback (selector, value)\r
- : 0;\r
+ if (auto* d = currentASIODev[deviceIndex])\r
+ return d->asioMessagesCallback (selector, value);\r
+\r
+ return {};\r
}\r
\r
static void JUCE_ASIOCALLBACK sampleRateChangedCallback (ASIOSampleRate)\r
{\r
- if (currentASIODev[deviceIndex] != nullptr)\r
- currentASIODev[deviceIndex]->resetRequest();\r
+ if (auto* d = currentASIODev[deviceIndex])\r
+ d->resetRequest();\r
}\r
\r
static void setCallbacks (ASIOCallbacks& callbacks) noexcept\r
};\r
\r
template <>\r
-struct ASIOAudioIODevice::ASIOCallbackFunctions <sizeof(currentASIODev) / sizeof(currentASIODev[0])>\r
+struct ASIOAudioIODevice::ASIOCallbackFunctions<maxNumASIODevices>\r
{\r
static void setCallbacksForDevice (ASIOCallbacks&, ASIOAudioIODevice*) noexcept {}\r
};\r
ASIOAudioIODeviceType() : AudioIODeviceType ("ASIO") {}\r
\r
//==============================================================================\r
- void scanForDevices()\r
+ void scanForDevices() override\r
{\r
hasScanned = true;\r
-\r
deviceNames.clear();\r
classIds.clear();\r
\r
\r
if (RegOpenKey (HKEY_LOCAL_MACHINE, _T("software\\asio"), &hk) == ERROR_SUCCESS)\r
{\r
- TCHAR name [256];\r
+ TCHAR name[256] = {};\r
\r
while (RegEnumKey (hk, index++, name, numElementsInArray (name)) == ERROR_SUCCESS)\r
addDriverInfo (name, hk);\r
}\r
}\r
\r
- StringArray getDeviceNames (bool /*wantInputNames*/) const\r
+ StringArray getDeviceNames (bool /*wantInputNames*/) const override\r
{\r
jassert (hasScanned); // need to call scanForDevices() before doing this\r
-\r
return deviceNames;\r
}\r
\r
- int getDefaultDeviceIndex (bool) const\r
+ int getDefaultDeviceIndex (bool) const override\r
{\r
jassert (hasScanned); // need to call scanForDevices() before doing this\r
\r
\r
static int findFreeSlot()\r
{\r
- for (int i = 0; i < numElementsInArray (currentASIODev); ++i)\r
- if (currentASIODev[i] == 0)\r
+ for (int i = 0; i < maxNumASIODevices; ++i)\r
+ if (currentASIODev[i] == nullptr)\r
return i;\r
\r
jassertfalse; // unfortunately you can only have a finite number\r
return -1;\r
}\r
\r
- int getIndexOfDevice (AudioIODevice* d, bool /*asInput*/) const\r
+ int getIndexOfDevice (AudioIODevice* d, bool /*asInput*/) const override\r
{\r
jassert (hasScanned); // need to call scanForDevices() before doing this\r
\r
return d == nullptr ? -1 : deviceNames.indexOf (d->getName());\r
}\r
\r
- bool hasSeparateInputsAndOutputs() const { return false; }\r
+ bool hasSeparateInputsAndOutputs() const override { return false; }\r
\r
AudioIODevice* createDevice (const String& outputDeviceName,\r
- const String& inputDeviceName)\r
+ const String& inputDeviceName) override\r
{\r
// ASIO can't open two different devices for input and output - they must be the same one.\r
jassert (inputDeviceName == outputDeviceName || outputDeviceName.isEmpty() || inputDeviceName.isEmpty());\r
jassert (hasScanned); // need to call scanForDevices() before doing this\r
\r
- const String deviceName (outputDeviceName.isNotEmpty() ? outputDeviceName\r
- : inputDeviceName);\r
- const int index = deviceNames.indexOf (deviceName);\r
+ auto deviceName = outputDeviceName.isNotEmpty() ? outputDeviceName\r
+ : inputDeviceName;\r
+ auto index = deviceNames.indexOf (deviceName);\r
\r
if (index >= 0)\r
{\r
- const int freeSlot = findFreeSlot();\r
+ auto freeSlot = findFreeSlot();\r
\r
if (freeSlot >= 0)\r
return new ASIOAudioIODevice (this, deviceName,\r
if (RegOpenKey (HKEY_CLASSES_ROOT, _T("clsid"), &hk) == ERROR_SUCCESS)\r
{\r
int index = 0;\r
- TCHAR name [512];\r
+ TCHAR name[512] = {};\r
\r
while (RegEnumKey (hk, index++, name, numElementsInArray (name)) == ERROR_SUCCESS)\r
{\r
{\r
if (RegOpenKeyEx (subKey, _T("InprocServer32"), 0, KEY_READ, &pathKey) == ERROR_SUCCESS)\r
{\r
- TCHAR pathName [1024] = { 0 };\r
+ TCHAR pathName[1024] = {};\r
DWORD dtype = REG_SZ;\r
DWORD dsize = sizeof (pathName);\r
\r
\r
if (RegOpenKeyEx (hk, keyName.toWideCharPointer(), 0, KEY_READ, &subKey) == ERROR_SUCCESS)\r
{\r
- TCHAR buf [256] = { 0 };\r
+ TCHAR buf[256] = {};\r
DWORD dtype = REG_SZ;\r
DWORD dsize = sizeof (buf);\r
\r
if (dsize > 0 && checkClassIsOk (buf))\r
{\r
CLSID classId;\r
+\r
if (CLSIDFromString ((LPOLESTR) buf, &classId) == S_OK)\r
{\r
dtype = REG_SZ;\r
extern "C"\r
{\r
// Declare just the minimum number of interfaces for the DSound objects that we need..\r
- typedef struct typeDSBUFFERDESC\r
+ struct DSBUFFERDESC\r
{\r
DWORD dwSize;\r
DWORD dwFlags;\r
DWORD dwReserved;\r
LPWAVEFORMATEX lpwfxFormat;\r
GUID guid3DAlgorithm;\r
- } DSBUFFERDESC;\r
+ };\r
\r
struct IDirectSoundBuffer;\r
\r
};\r
\r
//==============================================================================\r
- typedef struct typeDSCBUFFERDESC\r
+ struct DSCBUFFERDESC\r
{\r
DWORD dwSize;\r
DWORD dwFlags;\r
DWORD dwBufferBytes;\r
DWORD dwReserved;\r
LPWAVEFORMATEX lpwfxFormat;\r
- } DSCBUFFERDESC;\r
+ };\r
\r
struct IDirectSoundCaptureBuffer;\r
\r
virtual StringArray getDevices (bool) = 0;\r
virtual int getDefaultDeviceIndex (bool) = 0;\r
\r
- virtual InputWrapper* createInputWrapper (MidiInput*, int, MidiInputCallback*) = 0;\r
+ virtual InputWrapper* createInputWrapper (MidiInput&, int, MidiInputCallback&) = 0;\r
virtual OutputWrapper* createOutputWrapper (int) = 0;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiServiceType)\r
};\r
\r
//==============================================================================\r
-class WindowsMidiService : public MidiServiceType\r
+struct Win32MidiService : public MidiServiceType,\r
+ private Timer\r
{\r
+ Win32MidiService() {}\r
+\r
+ StringArray getDevices (bool isInput) override\r
+ {\r
+ return isInput ? Win32InputWrapper::getDevices()\r
+ : Win32OutputWrapper::getDevices();\r
+ }\r
+\r
+ int getDefaultDeviceIndex (bool isInput) override\r
+ {\r
+ return isInput ? Win32InputWrapper::getDefaultDeviceIndex()\r
+ : Win32OutputWrapper::getDefaultDeviceIndex();\r
+ }\r
+\r
+ InputWrapper* createInputWrapper (MidiInput& input, int index, MidiInputCallback& callback) override\r
+ {\r
+ return new Win32InputWrapper (*this, input, index, callback);\r
+ }\r
+\r
+ OutputWrapper* createOutputWrapper (int index) override\r
+ {\r
+ return new Win32OutputWrapper (*this, index);\r
+ }\r
+\r
private:\r
- struct WindowsInputWrapper : public InputWrapper\r
+ struct Win32InputWrapper;\r
+\r
+ //==============================================================================\r
+ struct MidiInCollector : public ReferenceCountedObject\r
{\r
- struct MidiInCollector\r
+ MidiInCollector (Win32MidiService& s, const String& name) : deviceName (name), midiService (s) {}\r
+\r
+ ~MidiInCollector()\r
{\r
- MidiInCollector (WindowsMidiService& s,\r
- MidiInput* const inputDevice,\r
- MidiInputCallback& cb)\r
- : midiService (s),\r
- input (inputDevice),\r
- callback (cb)\r
- {\r
- }\r
+ stop();\r
\r
- ~MidiInCollector()\r
+ if (deviceHandle != 0)\r
{\r
- stop();\r
-\r
- if (deviceHandle != 0)\r
+ for (int count = 5; --count >= 0;)\r
{\r
- for (int count = 5; --count >= 0;)\r
- {\r
- if (midiInClose (deviceHandle) == MMSYSERR_NOERROR)\r
- break;\r
+ if (midiInClose (deviceHandle) == MMSYSERR_NOERROR)\r
+ break;\r
\r
- Sleep (20);\r
- }\r
+ Sleep (20);\r
}\r
}\r
+ }\r
\r
- void handleMessage (const uint8* bytes, const uint32 timeStamp)\r
+ using Ptr = ReferenceCountedObjectPtr<MidiInCollector>;\r
+\r
+ void addClient (Win32InputWrapper* c)\r
+ {\r
+ const ScopedLock sl (clientLock);\r
+ jassert (! clients.contains (c));\r
+ clients.add (c);\r
+ }\r
+\r
+ void removeClient (Win32InputWrapper* c)\r
+ {\r
+ const ScopedLock sl (clientLock);\r
+ clients.removeFirstMatchingValue (c);\r
+ startOrStop();\r
+ midiService.asyncCheckForUnusedCollectors();\r
+ }\r
+\r
+ void handleMessage (const uint8* bytes, uint32 timeStamp)\r
+ {\r
+ if (bytes[0] >= 0x80 && isStarted.load())\r
{\r
- if (bytes[0] >= 0x80 && isStarted)\r
{\r
- concatenator.pushMidiData (bytes,\r
- MidiMessage::getMessageLengthFromFirstByte (bytes[0]),\r
- convertTimeStamp (timeStamp),\r
- input,\r
- callback);\r
- writeFinishedBlocks();\r
+ auto len = MidiMessage::getMessageLengthFromFirstByte (bytes[0]);\r
+ auto time = convertTimeStamp (timeStamp);\r
+ const ScopedLock sl (clientLock);\r
+\r
+ for (auto* c : clients)\r
+ c->pushMidiData (bytes, len, time);\r
}\r
+\r
+ writeFinishedBlocks();\r
}\r
+ }\r
\r
- void handleSysEx (MIDIHDR* const hdr, const uint32 timeStamp)\r
+ void handleSysEx (MIDIHDR* hdr, uint32 timeStamp)\r
+ {\r
+ if (isStarted.load() && hdr->dwBytesRecorded > 0)\r
{\r
- if (isStarted && hdr->dwBytesRecorded > 0)\r
{\r
- concatenator.pushMidiData (hdr->lpData, (int) hdr->dwBytesRecorded,\r
- convertTimeStamp (timeStamp), input, callback);\r
- writeFinishedBlocks();\r
+ auto time = convertTimeStamp (timeStamp);\r
+ const ScopedLock sl (clientLock);\r
+\r
+ for (auto* c : clients)\r
+ c->pushMidiData (hdr->lpData, (int) hdr->dwBytesRecorded, time);\r
}\r
+\r
+ writeFinishedBlocks();\r
}\r
+ }\r
\r
- void start()\r
- {\r
- if (deviceHandle != 0 && ! isStarted)\r
- {\r
- midiService.activeMidiCollectors.addIfNotAlreadyThere (this);\r
+ void startOrStop()\r
+ {\r
+ const ScopedLock sl (clientLock);\r
\r
- for (int i = 0; i < (int) numHeaders; ++i)\r
- {\r
- headers[i].prepare (deviceHandle);\r
- headers[i].write (deviceHandle);\r
- }\r
+ if (countRunningClients() == 0)\r
+ stop();\r
+ else\r
+ start();\r
+ }\r
\r
- startTime = Time::getMillisecondCounterHiRes();\r
- MMRESULT res = midiInStart (deviceHandle);\r
+ void start()\r
+ {\r
+ if (deviceHandle != 0 && ! isStarted.load())\r
+ {\r
+ activeMidiCollectors.addIfNotAlreadyThere (this);\r
\r
- if (res == MMSYSERR_NOERROR)\r
- {\r
- concatenator.reset();\r
- isStarted = true;\r
- }\r
- else\r
- {\r
- unprepareAllHeaders();\r
- }\r
+ for (int i = 0; i < (int) numHeaders; ++i)\r
+ {\r
+ headers[i].prepare (deviceHandle);\r
+ headers[i].write (deviceHandle);\r
}\r
- }\r
\r
- void stop()\r
- {\r
- if (isStarted)\r
- {\r
- isStarted = false;\r
- midiInReset (deviceHandle);\r
- midiInStop (deviceHandle);\r
- midiService.activeMidiCollectors.removeFirstMatchingValue (this);\r
+ startTime = Time::getMillisecondCounterHiRes();\r
+ auto res = midiInStart (deviceHandle);\r
+\r
+ if (res == MMSYSERR_NOERROR)\r
+ isStarted = true;\r
+ else\r
unprepareAllHeaders();\r
- concatenator.reset();\r
- }\r
}\r
+ }\r
\r
- static void CALLBACK midiInCallback (HMIDIIN, UINT uMsg, DWORD_PTR dwInstance,\r
- DWORD_PTR midiMessage, DWORD_PTR timeStamp)\r
+ void stop()\r
+ {\r
+ if (isStarted.load())\r
{\r
- auto* collector = reinterpret_cast<MidiInCollector*> (dwInstance);\r
-\r
- if (collector->midiService.activeMidiCollectors.contains (collector))\r
- {\r
- if (uMsg == MIM_DATA)\r
- collector->handleMessage ((const uint8*) &midiMessage, (uint32) timeStamp);\r
- else if (uMsg == MIM_LONGDATA)\r
- collector->handleSysEx ((MIDIHDR*) midiMessage, (uint32) timeStamp);\r
- }\r
+ isStarted = false;\r
+ midiInReset (deviceHandle);\r
+ midiInStop (deviceHandle);\r
+ activeMidiCollectors.removeFirstMatchingValue (this);\r
+ unprepareAllHeaders();\r
}\r
+ }\r
\r
- HMIDIIN deviceHandle = 0;\r
-\r
- private:\r
- WindowsMidiService& midiService;\r
- MidiInput* input;\r
- MidiInputCallback& callback;\r
- MidiDataConcatenator concatenator { 4096 };\r
- bool volatile isStarted = false;\r
- double startTime = 0;\r
+ static void CALLBACK midiInCallback (HMIDIIN, UINT uMsg, DWORD_PTR dwInstance,\r
+ DWORD_PTR midiMessage, DWORD_PTR timeStamp)\r
+ {\r
+ auto* collector = reinterpret_cast<MidiInCollector*> (dwInstance);\r
\r
- struct MidiHeader\r
+ // This is primarily a check for the collector being a dangling\r
+ // pointer, as the callback can sometimes be delayed\r
+ if (activeMidiCollectors.contains (collector))\r
{\r
- MidiHeader() {}\r
+ if (uMsg == MIM_DATA)\r
+ collector->handleMessage ((const uint8*) &midiMessage, (uint32) timeStamp);\r
+ else if (uMsg == MIM_LONGDATA)\r
+ collector->handleSysEx ((MIDIHDR*) midiMessage, (uint32) timeStamp);\r
+ }\r
+ }\r
\r
- void prepare (HMIDIIN device)\r
- {\r
- zerostruct (hdr);\r
- hdr.lpData = data;\r
- hdr.dwBufferLength = (DWORD) numElementsInArray (data);\r
+ String deviceName;\r
+ HMIDIIN deviceHandle = 0;\r
\r
- midiInPrepareHeader (device, &hdr, sizeof (hdr));\r
- }\r
+ private:\r
+ Win32MidiService& midiService;\r
+ CriticalSection clientLock;\r
+ Array<Win32InputWrapper*> clients;\r
+ std::atomic<bool> isStarted { false };\r
+ double startTime = 0;\r
\r
- void unprepare (HMIDIIN device)\r
- {\r
- if ((hdr.dwFlags & WHDR_DONE) != 0)\r
- {\r
- int c = 10;\r
- while (--c >= 0 && midiInUnprepareHeader (device, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING)\r
- Thread::sleep (20);\r
+ // This static array is used to prevent occasional callbacks to objects that are\r
+ // in the process of being deleted\r
+ static Array<MidiInCollector*, CriticalSection> activeMidiCollectors;\r
\r
- jassert (c >= 0);\r
- }\r
- }\r
+ int countRunningClients() const\r
+ {\r
+ int num = 0;\r
\r
- void write (HMIDIIN device)\r
- {\r
- hdr.dwBytesRecorded = 0;\r
- midiInAddBuffer (device, &hdr, sizeof (hdr));\r
- }\r
+ for (auto* c : clients)\r
+ if (c->started)\r
+ ++num;\r
\r
- void writeIfFinished (HMIDIIN device)\r
- {\r
- if ((hdr.dwFlags & WHDR_DONE) != 0)\r
- write (device);\r
- }\r
+ return num;\r
+ }\r
\r
- MIDIHDR hdr;\r
- char data [256];\r
+ struct MidiHeader\r
+ {\r
+ MidiHeader() {}\r
\r
- JUCE_DECLARE_NON_COPYABLE (MidiHeader)\r
- };\r
+ void prepare (HMIDIIN device)\r
+ {\r
+ zerostruct (hdr);\r
+ hdr.lpData = data;\r
+ hdr.dwBufferLength = (DWORD) numElementsInArray (data);\r
\r
- enum { numHeaders = 32 };\r
- MidiHeader headers [numHeaders];\r
+ midiInPrepareHeader (device, &hdr, sizeof (hdr));\r
+ }\r
\r
- void writeFinishedBlocks()\r
+ void unprepare (HMIDIIN device)\r
{\r
- for (int i = 0; i < (int) numHeaders; ++i)\r
- headers[i].writeIfFinished (deviceHandle);\r
+ if ((hdr.dwFlags & WHDR_DONE) != 0)\r
+ {\r
+ int c = 10;\r
+ while (--c >= 0 && midiInUnprepareHeader (device, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING)\r
+ Thread::sleep (20);\r
+\r
+ jassert (c >= 0);\r
+ }\r
}\r
\r
- void unprepareAllHeaders()\r
+ void write (HMIDIIN device)\r
{\r
- for (int i = 0; i < (int) numHeaders; ++i)\r
- headers[i].unprepare (deviceHandle);\r
+ hdr.dwBytesRecorded = 0;\r
+ midiInAddBuffer (device, &hdr, sizeof (hdr));\r
}\r
\r
- double convertTimeStamp (uint32 timeStamp)\r
+ void writeIfFinished (HMIDIIN device)\r
{\r
- auto t = startTime + timeStamp;\r
- auto now = Time::getMillisecondCounterHiRes();\r
+ if ((hdr.dwFlags & WHDR_DONE) != 0)\r
+ write (device);\r
+ }\r
\r
- if (t > now)\r
- {\r
- if (t > now + 2.0)\r
- startTime -= 1.0;\r
+ MIDIHDR hdr;\r
+ char data[256];\r
\r
- t = now;\r
- }\r
+ JUCE_DECLARE_NON_COPYABLE (MidiHeader)\r
+ };\r
\r
- return t * 0.001;\r
+ enum { numHeaders = 32 };\r
+ MidiHeader headers[numHeaders];\r
+\r
+ void writeFinishedBlocks()\r
+ {\r
+ for (int i = 0; i < (int) numHeaders; ++i)\r
+ headers[i].writeIfFinished (deviceHandle);\r
+ }\r
+\r
+ void unprepareAllHeaders()\r
+ {\r
+ for (int i = 0; i < (int) numHeaders; ++i)\r
+ headers[i].unprepare (deviceHandle);\r
+ }\r
+\r
+ double convertTimeStamp (uint32 timeStamp)\r
+ {\r
+ auto t = startTime + timeStamp;\r
+ auto now = Time::getMillisecondCounterHiRes();\r
+\r
+ if (t > now)\r
+ {\r
+ if (t > now + 2.0)\r
+ startTime -= 1.0;\r
+\r
+ t = now;\r
}\r
\r
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInCollector)\r
- };\r
+ return t * 0.001;\r
+ }\r
\r
- //==============================================================================\r
- WindowsInputWrapper (WindowsMidiService& parentService,\r
- MidiInput* const input,\r
- const int index,\r
- MidiInputCallback* const callback)\r
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInCollector)\r
+ };\r
+\r
+ //==============================================================================\r
+ struct Win32InputWrapper : public InputWrapper\r
+ {\r
+ Win32InputWrapper (Win32MidiService& parentService,\r
+ MidiInput& midiInput, int index, MidiInputCallback& c)\r
+ : input (midiInput), callback (c)\r
+ {\r
+ collector = getOrCreateCollector (parentService, index);\r
+ collector->addClient (this);\r
+ }\r
+\r
+ ~Win32InputWrapper()\r
+ {\r
+ collector->removeClient (this);\r
+ }\r
+\r
+ static MidiInCollector::Ptr getOrCreateCollector (Win32MidiService& parentService, int index)\r
{\r
auto names = getDevices();\r
- UINT deviceId = MIDI_MAPPER;\r
+ UINT deviceID = MIDI_MAPPER;\r
+ String deviceName;\r
\r
if (isPositiveAndBelow (index, names.size()))\r
{\r
deviceName = names[index];\r
- deviceId = index;\r
+ deviceID = index;\r
}\r
\r
- collector = new MidiInCollector (parentService, input, *callback);\r
+ const ScopedLock sl (parentService.activeCollectorLock);\r
+\r
+ for (auto& c : parentService.activeCollectors)\r
+ if (c->deviceName == deviceName)\r
+ return c;\r
+\r
+ MidiInCollector::Ptr c (new MidiInCollector (parentService, deviceName));\r
\r
HMIDIIN h;\r
- MMRESULT err = midiInOpen (&h, deviceId,\r
- (DWORD_PTR) &MidiInCollector::midiInCallback,\r
- (DWORD_PTR) (MidiInCollector*) collector.get(),\r
- CALLBACK_FUNCTION);\r
+ auto err = midiInOpen (&h, deviceID,\r
+ (DWORD_PTR) &MidiInCollector::midiInCallback,\r
+ (DWORD_PTR) (MidiInCollector*) c.get(),\r
+ CALLBACK_FUNCTION);\r
\r
if (err != MMSYSERR_NOERROR)\r
throw std::runtime_error ("Failed to create Windows input device wrapper");\r
\r
- collector->deviceHandle = h;\r
+ c->deviceHandle = h;\r
+ parentService.activeCollectors.add (c);\r
+ return c;\r
}\r
\r
- ~WindowsInputWrapper() {}\r
-\r
static StringArray getDevices()\r
{\r
StringArray s;\r
- const UINT num = midiInGetNumDevs();\r
+ auto num = midiInGetNumDevs();\r
\r
for (UINT i = 0; i < num; ++i)\r
{\r
return s;\r
}\r
\r
- static int getDefaultDeviceIndex()\r
- {\r
- return 0;\r
- }\r
+ static int getDefaultDeviceIndex() { return 0; }\r
+\r
+ void start() override { started = true; concatenator.reset(); collector->startOrStop(); }\r
+ void stop() override { started = false; collector->startOrStop(); concatenator.reset(); }\r
\r
- void start() override { collector->start(); }\r
- void stop() override { collector->stop(); }\r
+ String getDeviceName() override { return collector->deviceName; }\r
\r
- String getDeviceName() override\r
+ void pushMidiData (const void* inputData, int numBytes, double time)\r
{\r
- return deviceName;\r
+ concatenator.pushMidiData (inputData, numBytes, time, &input, callback);\r
}\r
\r
- String deviceName;\r
- ScopedPointer<MidiInCollector> collector;\r
+ MidiInput& input;\r
+ MidiInputCallback& callback;\r
+ MidiDataConcatenator concatenator { 4096 };\r
+ MidiInCollector::Ptr collector;\r
+ bool started = false;\r
\r
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsInputWrapper)\r
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Win32InputWrapper)\r
};\r
\r
//==============================================================================\r
- struct WindowsOutputWrapper : public OutputWrapper\r
+ struct MidiOutHandle : public ReferenceCountedObject\r
{\r
- struct MidiOutHandle : public ReferenceCountedObject\r
- {\r
- using Ptr = ReferenceCountedObjectPtr<MidiOutHandle>;\r
+ using Ptr = ReferenceCountedObjectPtr<MidiOutHandle>;\r
\r
- MidiOutHandle (WindowsMidiService& parent, UINT id, HMIDIOUT h)\r
- : owner (parent), deviceId (id), handle (h)\r
- {\r
- owner.activeOutputHandles.add (this);\r
- }\r
+ MidiOutHandle (Win32MidiService& parent, const String& name, HMIDIOUT h)\r
+ : owner (parent), deviceName (name), handle (h)\r
+ {\r
+ owner.activeOutputHandles.add (this);\r
+ }\r
\r
- ~MidiOutHandle()\r
- {\r
- if (handle != nullptr)\r
- midiOutClose (handle);\r
+ ~MidiOutHandle()\r
+ {\r
+ if (handle != nullptr)\r
+ midiOutClose (handle);\r
\r
- owner.activeOutputHandles.removeFirstMatchingValue (this);\r
- }\r
+ owner.activeOutputHandles.removeFirstMatchingValue (this);\r
+ }\r
\r
- WindowsMidiService& owner;\r
- UINT deviceId;\r
- HMIDIOUT handle;\r
+ Win32MidiService& owner;\r
+ String deviceName;\r
+ HMIDIOUT handle;\r
\r
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiOutHandle)\r
- };\r
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiOutHandle)\r
+ };\r
\r
- WindowsOutputWrapper (WindowsMidiService& p, int index) : parent (p)\r
+ //==============================================================================\r
+ struct Win32OutputWrapper : public OutputWrapper\r
+ {\r
+ Win32OutputWrapper (Win32MidiService& p, int index) : parent (p)\r
{\r
auto names = getDevices();\r
- UINT deviceId = MIDI_MAPPER;\r
+ UINT deviceID = MIDI_MAPPER;\r
\r
if (isPositiveAndBelow (index, names.size()))\r
{\r
deviceName = names[index];\r
- deviceId = index;\r
+ deviceID = index;\r
}\r
\r
- if (deviceId == MIDI_MAPPER)\r
+ if (deviceID == MIDI_MAPPER)\r
{\r
- // use the microsoft sw synth as a default - best not to allow deviceId\r
+ // use the microsoft sw synth as a default - best not to allow deviceID\r
// to be MIDI_MAPPER, or else device sharing breaks\r
for (int i = 0; i < names.size(); ++i)\r
if (names[i].containsIgnoreCase ("microsoft"))\r
- deviceId = (UINT) i;\r
+ deviceID = (UINT) i;\r
}\r
\r
for (int i = parent.activeOutputHandles.size(); --i >= 0;)\r
{\r
auto* activeHandle = parent.activeOutputHandles.getUnchecked (i);\r
\r
- if (activeHandle->deviceId == deviceId)\r
+ if (activeHandle->deviceName == deviceName)\r
{\r
han = activeHandle;\r
return;\r
for (int i = 4; --i >= 0;)\r
{\r
HMIDIOUT h = 0;\r
- MMRESULT res = midiOutOpen (&h, deviceId, 0, 0, CALLBACK_NULL);\r
+ auto res = midiOutOpen (&h, deviceID, 0, 0, CALLBACK_NULL);\r
\r
if (res == MMSYSERR_NOERROR)\r
{\r
- han = new MidiOutHandle (parent, deviceId, h);\r
+ han = new MidiOutHandle (parent, deviceName, h);\r
return;\r
}\r
\r
\r
if (midiOutPrepareHeader (han->handle, &h, sizeof (MIDIHDR)) == MMSYSERR_NOERROR)\r
{\r
- MMRESULT res = midiOutLongMsg (han->handle, &h, sizeof (MIDIHDR));\r
+ auto res = midiOutLongMsg (han->handle, &h, sizeof (MIDIHDR));\r
\r
if (res == MMSYSERR_NOERROR)\r
{\r
static Array<MIDIOUTCAPS> getDeviceCaps()\r
{\r
Array<MIDIOUTCAPS> devices;\r
- const UINT num = midiOutGetNumDevs();\r
+ auto num = midiOutGetNumDevs();\r
\r
for (UINT i = 0; i < num; ++i)\r
{\r
return 0;\r
}\r
\r
- String getDeviceName() override\r
- {\r
- return deviceName;\r
- }\r
+ String getDeviceName() override { return deviceName; }\r
\r
- WindowsMidiService& parent;\r
+ Win32MidiService& parent;\r
String deviceName;\r
-\r
MidiOutHandle::Ptr han;\r
\r
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsOutputWrapper)\r
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Win32OutputWrapper)\r
};\r
\r
-public:\r
- WindowsMidiService() {}\r
-\r
- StringArray getDevices (bool isInput) override\r
+ //==============================================================================\r
+ void asyncCheckForUnusedCollectors()\r
{\r
- return isInput ? WindowsInputWrapper::getDevices()\r
- : WindowsOutputWrapper::getDevices();\r
+ startTimer (10);\r
}\r
\r
- int getDefaultDeviceIndex (bool isInput) override\r
+ void timerCallback() override\r
{\r
- return isInput ? WindowsInputWrapper::getDefaultDeviceIndex()\r
- : WindowsOutputWrapper::getDefaultDeviceIndex();\r
- }\r
+ stopTimer();\r
\r
- InputWrapper* createInputWrapper (MidiInput* input, int index, MidiInputCallback* callback) override\r
- {\r
- return new WindowsInputWrapper (*this, input, index, callback);\r
- }\r
+ const ScopedLock sl (activeCollectorLock);\r
\r
- OutputWrapper* createOutputWrapper (int index) override\r
- {\r
- return new WindowsOutputWrapper (*this, index);\r
+ for (int i = activeCollectors.size(); --i >= 0;)\r
+ if (activeCollectors.getObjectPointer(i)->getReferenceCount() == 1)\r
+ activeCollectors.remove (i);\r
}\r
\r
-private:\r
- Array<WindowsInputWrapper::MidiInCollector*, CriticalSection> activeMidiCollectors;\r
- Array<WindowsOutputWrapper::MidiOutHandle*> activeOutputHandles;\r
-\r
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsMidiService)\r
+ CriticalSection activeCollectorLock;\r
+ ReferenceCountedArray<MidiInCollector> activeCollectors;\r
+ Array<MidiOutHandle*> activeOutputHandles;\r
};\r
\r
+Array<Win32MidiService::MidiInCollector*, CriticalSection> Win32MidiService::MidiInCollector::activeMidiCollectors;\r
+\r
+//==============================================================================\r
//==============================================================================\r
#if JUCE_USE_WINRT_MIDI\r
-\r
using namespace Microsoft::WRL;\r
\r
using namespace ABI::Windows::Foundation;\r
using namespace ABI::Windows::Devices::Enumeration;\r
using namespace ABI::Windows::Storage::Streams;\r
\r
+//==============================================================================\r
class WinRTMidiService : public MidiServiceType\r
{\r
-private:\r
+public:\r
+ //==============================================================================\r
+ WinRTMidiService()\r
+ {\r
+ if (! WinRTWrapper::getInstance()->isInitialised())\r
+ throw std::runtime_error ("Failed to initialise the WinRT wrapper");\r
+\r
+ midiInFactory = WinRTWrapper::getInstance()->getWRLFactory<IMidiInPortStatics> (&RuntimeClass_Windows_Devices_Midi_MidiInPort[0]);\r
+\r
+ if (midiInFactory == nullptr)\r
+ throw std::runtime_error ("Failed to create midi in factory");\r
+\r
+ midiOutFactory = WinRTWrapper::getInstance()->getWRLFactory<IMidiOutPortStatics> (&RuntimeClass_Windows_Devices_Midi_MidiOutPort[0]);\r
+\r
+ if (midiOutFactory == nullptr)\r
+ throw std::runtime_error ("Failed to create midi out factory");\r
+\r
+ inputDeviceWatcher.reset (new MidiIODeviceWatcher<IMidiInPortStatics> (midiInFactory));\r
+\r
+ if (! inputDeviceWatcher->start())\r
+ throw std::runtime_error ("Failed to start midi input device watcher");\r
+\r
+ outputDeviceWatcher.reset (new MidiIODeviceWatcher<IMidiOutPortStatics> (midiOutFactory));\r
+\r
+ if (! outputDeviceWatcher->start())\r
+ throw std::runtime_error ("Failed to start midi output device watcher");\r
+ }\r
+\r
+ ~WinRTMidiService() {}\r
+\r
+ StringArray getDevices (bool isInput) override\r
+ {\r
+ return isInput ? inputDeviceWatcher ->getDevices()\r
+ : outputDeviceWatcher->getDevices();\r
+ }\r
+\r
+ int getDefaultDeviceIndex (bool isInput) override\r
+ {\r
+ return isInput ? inputDeviceWatcher ->getDefaultDeviceIndex()\r
+ : outputDeviceWatcher->getDefaultDeviceIndex();\r
+ }\r
+\r
+ InputWrapper* createInputWrapper (MidiInput& input, int index, MidiInputCallback& callback) override\r
+ {\r
+ return new WinRTInputWrapper (*this, input, index, callback);\r
+ }\r
+\r
+ OutputWrapper* createOutputWrapper (int index) override\r
+ {\r
+ return new WinRTOutputWrapper (*this, index);\r
+ }\r
+\r
template <typename COMFactoryType>\r
struct MidiIODeviceWatcher\r
{\r
struct DeviceInfo\r
{\r
- String name;\r
- String id;\r
+ String name, id;\r
bool isDefault = false;\r
};\r
\r
- MidiIODeviceWatcher (ComSmartPtr<COMFactoryType>& comFactory)\r
- : factory (comFactory)\r
+ MidiIODeviceWatcher (ComSmartPtr<COMFactoryType>& comFactory) : factory (comFactory)\r
{\r
}\r
\r
bool start()\r
{\r
HSTRING deviceSelector;\r
- HRESULT hr = factory->GetDeviceSelector (&deviceSelector);\r
+ auto hr = factory->GetDeviceSelector (&deviceSelector);\r
+\r
if (FAILED (hr))\r
return false;\r
\r
auto deviceInformationFactory = WinRTWrapper::getInstance()->getWRLFactory<IDeviceInformationStatics> (&RuntimeClass_Windows_Devices_Enumeration_DeviceInformation[0]);\r
+\r
if (deviceInformationFactory == nullptr)\r
return false;\r
\r
hr = deviceInformationFactory->CreateWatcherAqsFilter (deviceSelector, watcher.resetAndGetPointerAddress());\r
+\r
if (FAILED (hr))\r
return false;\r
\r
- class DeviceEnumerationThread : public Thread\r
+ struct DeviceEnumerationThread : public Thread\r
{\r
- public:\r
DeviceEnumerationThread (String threadName, MidiIODeviceWatcher<COMFactoryType>& p)\r
: Thread (threadName), parent (p)\r
{}\r
parent.watcher->remove_EnumerationCompleted (deviceEnumerationCompletedToken);\r
}\r
\r
- private:\r
MidiIODeviceWatcher<COMFactoryType>& parent;\r
WaitableEvent enumerationCompleted;\r
};\r
\r
if (deviceAddedToken.value != 0)\r
{\r
- HRESULT hr = watcher->remove_Added (deviceAddedToken);\r
+ auto hr = watcher->remove_Added (deviceAddedToken);\r
+\r
if (FAILED (hr))\r
return false;\r
\r
\r
if (deviceRemovedToken.value != 0)\r
{\r
- HRESULT hr = watcher->remove_Removed (deviceRemovedToken);\r
+ auto hr = watcher->remove_Removed (deviceRemovedToken);\r
+\r
if (FAILED (hr))\r
return false;\r
\r
deviceRemovedToken.value = 0;\r
}\r
\r
- HRESULT hr = watcher->Stop();\r
+ auto hr = watcher->Stop();\r
+\r
if (FAILED (hr))\r
return false;\r
\r
HRESULT addDevice (IDeviceInformation* addedDeviceInfo)\r
{\r
boolean isEnabled;\r
- HRESULT hr = addedDeviceInfo->get_IsEnabled (&isEnabled);\r
+ auto hr = addedDeviceInfo->get_IsEnabled (&isEnabled);\r
+\r
if (FAILED (hr))\r
return S_OK;\r
\r
\r
HSTRING name;\r
hr = addedDeviceInfo->get_Name (&name);\r
+\r
if (FAILED (hr))\r
return S_OK;\r
\r
\r
HSTRING id;\r
hr = addedDeviceInfo->get_Id (&id);\r
+\r
if (FAILED (hr))\r
return S_OK;\r
\r
\r
boolean isDefault;\r
hr = addedDeviceInfo->get_IsDefault (&isDefault);\r
+\r
if (FAILED (hr))\r
return S_OK;\r
\r
info.isDefault = isDefault != 0;\r
-\r
connectedDevices.add (info);\r
-\r
return S_OK;\r
}\r
\r
\r
HSTRING removedDeviceIdHstr;\r
removedDeviceInfo->get_Id (&removedDeviceIdHstr);\r
- String removedDeviceId = WinRTWrapper::getInstance()->hStringToString (removedDeviceIdHstr);\r
+ auto removedDeviceId = WinRTWrapper::getInstance()->hStringToString (removedDeviceIdHstr);\r
\r
for (int i = 0; i < connectedDevices.size(); ++i)\r
{\r
}\r
\r
StringArray result;\r
+\r
for (auto info : lastQueriedConnectedDevices.get())\r
result.add (info.name);\r
\r
int getDefaultDeviceIndex()\r
{\r
auto& lastDevices = lastQueriedConnectedDevices.get();\r
+\r
for (int i = 0; i < lastDevices.size(); ++i)\r
if (lastDevices[i].isDefault)\r
return i;\r
return 0;\r
}\r
\r
- String getDeviceNameFromIndex (const int index)\r
+ String getDeviceNameFromIndex (int index)\r
{\r
if (isPositiveAndBelow (index, lastQueriedConnectedDevices.get().size()))\r
return lastQueriedConnectedDevices.get()[index].name;\r
return {};\r
}\r
\r
- String getDeviceID (const String name)\r
+ String getDeviceID (const String& name)\r
{\r
const ScopedLock lock (deviceChanges);\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiIODeviceWatcher);\r
};\r
\r
+ //==============================================================================\r
template <typename COMFactoryType, typename COMInterfaceType, typename COMType>\r
- class OpenMidiPortThread : public Thread\r
+ struct OpenMidiPortThread : public Thread\r
{\r
- public:\r
- OpenMidiPortThread (String threadName,\r
- String midiDeviceId,\r
+ OpenMidiPortThread (String threadName, String midiDeviceID,\r
ComSmartPtr<COMFactoryType>& comFactory,\r
ComSmartPtr<COMInterfaceType>& comPort)\r
: Thread (threadName),\r
- deviceId (midiDeviceId),\r
+ deviceID (midiDeviceID),\r
factory (comFactory),\r
port (comPort)\r
{\r
\r
~OpenMidiPortThread()\r
{\r
+ stopThread (2000);\r
}\r
\r
void run() override\r
{\r
- WinRTWrapper::ScopedHString hDeviceId (deviceId);\r
+ WinRTWrapper::ScopedHString hDeviceId (deviceID);\r
ComSmartPtr<IAsyncOperation<COMType*>> asyncOp;\r
- HRESULT hr = factory->FromIdAsync (hDeviceId.get(), asyncOp.resetAndGetPointerAddress());\r
+ auto hr = factory->FromIdAsync (hDeviceId.get(), asyncOp.resetAndGetPointerAddress());\r
+\r
if (FAILED (hr))\r
return;\r
\r
if (asyncOpPtr == nullptr)\r
return E_ABORT;\r
\r
- HRESULT hr = asyncOpPtr->GetResults (port.resetAndGetPointerAddress());\r
+ auto hr = asyncOpPtr->GetResults (port.resetAndGetPointerAddress());\r
+\r
if (FAILED (hr))\r
return hr;\r
\r
portOpened.wait (2000);\r
}\r
\r
- const String deviceId;\r
+ const String deviceID;\r
ComSmartPtr<COMFactoryType>& factory;\r
ComSmartPtr<COMInterfaceType>& port;\r
-\r
WaitableEvent portOpened { true };\r
};\r
\r
+ //==============================================================================\r
struct WinRTInputWrapper : public InputWrapper\r
{\r
- WinRTInputWrapper (WinRTMidiService& service,\r
- MidiInput* const input,\r
- const int index,\r
- MidiInputCallback& cb)\r
+ WinRTInputWrapper (WinRTMidiService& service, MidiInput& input, int index, MidiInputCallback& cb)\r
: inputDevice (input),\r
- callback (cb),\r
- concatenator (4096)\r
+ callback (cb)\r
{\r
const ScopedLock lock (service.inputDeviceWatcher->deviceChanges);\r
\r
deviceName = service.inputDeviceWatcher->getDeviceNameFromIndex (index);\r
+\r
if (deviceName.isEmpty())\r
throw std::runtime_error ("Invalid device index");\r
\r
- const auto deviceID = service.inputDeviceWatcher->getDeviceID (deviceName);\r
+ auto deviceID = service.inputDeviceWatcher->getDeviceID (deviceName);\r
+\r
if (deviceID.isEmpty())\r
throw std::runtime_error ("Device unavailable");\r
\r
midiInPort);\r
portThread.startThread();\r
portThread.waitForThreadToExit (-1);\r
+\r
if (midiInPort == nullptr)\r
throw std::runtime_error ("Timed out waiting for midi input port creation");\r
\r
startTime = Time::getMillisecondCounterHiRes();\r
\r
- HRESULT hr = midiInPort->add_MessageReceived (\r
+ auto hr = midiInPort->add_MessageReceived (\r
Callback<ITypedEventHandler<MidiInPort*, MidiMessageReceivedEventArgs*>> (\r
[this] (IMidiInPort*, IMidiMessageReceivedEventArgs* args) { return midiInMessageReceived (args); }\r
).Get(),\r
&midiInMessageToken);\r
+\r
if (FAILED (hr))\r
throw std::runtime_error ("Failed to set midi input callback");\r
}\r
\r
void start() override\r
{\r
- if (!isStarted)\r
+ if (! isStarted)\r
{\r
concatenator.reset();\r
isStarted = true;\r
}\r
}\r
\r
- String getDeviceName() override\r
- {\r
- return deviceName;\r
- }\r
+ String getDeviceName() override { return deviceName; }\r
\r
HRESULT midiInMessageReceived (IMidiMessageReceivedEventArgs* args)\r
{\r
return S_OK;\r
\r
ComSmartPtr<IMidiMessage> message;\r
- HRESULT hr = args->get_Message (message.resetAndGetPointerAddress());\r
+ auto hr = args->get_Message (message.resetAndGetPointerAddress());\r
+\r
if (FAILED (hr))\r
return hr;\r
\r
ComSmartPtr<IBuffer> buffer;\r
hr = message->get_RawData (buffer.resetAndGetPointerAddress());\r
+\r
if (FAILED (hr))\r
return hr;\r
\r
ComSmartPtr<Windows::Storage::Streams::IBufferByteAccess> bufferByteAccess;\r
hr = buffer->QueryInterface (bufferByteAccess.resetAndGetPointerAddress());\r
+\r
if (FAILED (hr))\r
return hr;\r
\r
uint8_t* bufferData = nullptr;\r
hr = bufferByteAccess->Buffer (&bufferData);\r
+\r
if (FAILED (hr))\r
return hr;\r
\r
uint32_t numBytes = 0;\r
hr = buffer->get_Length (&numBytes);\r
+\r
if (FAILED (hr))\r
return hr;\r
\r
ABI::Windows::Foundation::TimeSpan timespan;\r
hr = message->get_Timestamp (×pan);\r
+\r
if (FAILED (hr))\r
return hr;\r
\r
- concatenator.pushMidiData (bufferData,\r
- numBytes,\r
+ concatenator.pushMidiData (bufferData, numBytes,\r
convertTimeStamp (timespan.Duration),\r
- inputDevice,\r
- callback);\r
-\r
+ &inputDevice, callback);\r
return S_OK;\r
}\r
\r
double convertTimeStamp (int64 timestamp)\r
{\r
- const auto millisecondsSinceStart = static_cast<double> (timestamp) / 10000.0;\r
- double t = startTime + millisecondsSinceStart;\r
+ auto millisecondsSinceStart = static_cast<double> (timestamp) / 10000.0;\r
+ auto t = startTime + millisecondsSinceStart;\r
+ auto now = Time::getMillisecondCounterHiRes();\r
\r
- const double now = Time::getMillisecondCounterHiRes();\r
if (t > now)\r
{\r
if (t > now + 2.0)\r
return t * 0.001;\r
}\r
\r
- MidiInput* inputDevice;\r
+ MidiInput& inputDevice;\r
MidiInputCallback& callback;\r
String deviceName;\r
- MidiDataConcatenator concatenator;\r
+ MidiDataConcatenator concatenator { 4096 };\r
ComSmartPtr<IMidiInPort> midiInPort;\r
EventRegistrationToken midiInMessageToken { 0 };\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTInputWrapper);\r
};\r
\r
+ //==============================================================================\r
struct WinRTOutputWrapper : public OutputWrapper\r
{\r
- WinRTOutputWrapper (WinRTMidiService& service, const int index)\r
+ WinRTOutputWrapper (WinRTMidiService& service, int index)\r
{\r
const ScopedLock lock (service.outputDeviceWatcher->deviceChanges);\r
\r
deviceName = service.outputDeviceWatcher->getDeviceNameFromIndex (index);\r
+\r
if (deviceName.isEmpty())\r
throw std::runtime_error ("Invalid device index");\r
\r
- const auto deviceID = service.outputDeviceWatcher->getDeviceID (deviceName);\r
+ auto deviceID = service.outputDeviceWatcher->getDeviceID (deviceName);\r
+\r
if (deviceID.isEmpty())\r
throw std::runtime_error ("Device unavailable");\r
\r
midiOutPort);\r
portThread.startThread();\r
portThread.waitForThreadToExit (-1);\r
+\r
if (midiOutPort == nullptr)\r
throw std::runtime_error ("Timed out waiting for midi output port creation");\r
\r
auto bufferFactory = WinRTWrapper::getInstance()->getWRLFactory<IBufferFactory> (&RuntimeClass_Windows_Storage_Streams_Buffer[0]);\r
+\r
if (bufferFactory == nullptr)\r
throw std::runtime_error ("Failed to create output buffer factory");\r
\r
- HRESULT hr = bufferFactory->Create (static_cast<UINT32> (65536), buffer.resetAndGetPointerAddress());\r
+ auto hr = bufferFactory->Create (static_cast<UINT32> (65536), buffer.resetAndGetPointerAddress());\r
+\r
if (FAILED (hr))\r
throw std::runtime_error ("Failed to create output buffer");\r
\r
hr = buffer->QueryInterface (bufferByteAccess.resetAndGetPointerAddress());\r
+\r
if (FAILED (hr))\r
throw std::runtime_error ("Failed to get buffer byte access");\r
\r
hr = bufferByteAccess->Buffer (&bufferData);\r
+\r
if (FAILED (hr))\r
throw std::runtime_error ("Failed to get buffer data pointer");\r
}\r
\r
void sendMessageNow (const MidiMessage& message) override\r
{\r
- const UINT32 numBytes = message.getRawDataSize();\r
- HRESULT hr = buffer->put_Length (numBytes);\r
+ auto numBytes = message.getRawDataSize();\r
+ auto hr = buffer->put_Length (numBytes);\r
+\r
if (FAILED (hr))\r
jassertfalse;\r
\r
memcpy_s (bufferData, numBytes, message.getRawData(), numBytes);\r
-\r
midiOutPort->SendBuffer (buffer);\r
}\r
\r
- String getDeviceName() override\r
- {\r
- return deviceName;\r
- }\r
+ String getDeviceName() override { return deviceName; }\r
\r
String deviceName;\r
ComSmartPtr<IMidiOutPort> midiOutPort;\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTOutputWrapper);\r
};\r
\r
-public:\r
- WinRTMidiService()\r
- {\r
- if (! WinRTWrapper::getInstance()->isInitialised())\r
- throw std::runtime_error ("Failed to initialise the WinRT wrapper");\r
-\r
- midiInFactory = WinRTWrapper::getInstance()->getWRLFactory<IMidiInPortStatics> (&RuntimeClass_Windows_Devices_Midi_MidiInPort[0]);\r
- if (midiInFactory == nullptr)\r
- throw std::runtime_error ("Failed to create midi in factory");\r
-\r
- midiOutFactory = WinRTWrapper::getInstance()->getWRLFactory<IMidiOutPortStatics> (&RuntimeClass_Windows_Devices_Midi_MidiOutPort[0]);\r
- if (midiOutFactory == nullptr)\r
- throw std::runtime_error ("Failed to create midi out factory");\r
+ ComSmartPtr<IMidiInPortStatics> midiInFactory;\r
+ ComSmartPtr<IMidiOutPortStatics> midiOutFactory;\r
\r
- inputDeviceWatcher = new MidiIODeviceWatcher<IMidiInPortStatics> (midiInFactory);\r
- if (! inputDeviceWatcher->start())\r
- throw std::runtime_error ("Failed to start midi input device watcher");\r
+ std::unique_ptr<MidiIODeviceWatcher<IMidiInPortStatics>> inputDeviceWatcher;\r
+ std::unique_ptr<MidiIODeviceWatcher<IMidiOutPortStatics>> outputDeviceWatcher;\r
\r
- outputDeviceWatcher = new MidiIODeviceWatcher<IMidiOutPortStatics> (midiOutFactory);\r
- if (! outputDeviceWatcher->start())\r
- throw std::runtime_error ("Failed to start midi output device watcher");\r
- }\r
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTMidiService)\r
+};\r
\r
- ~WinRTMidiService()\r
- {\r
- }\r
+#endif // JUCE_USE_WINRT_MIDI\r
\r
- StringArray getDevices (bool isInput) override\r
+//==============================================================================\r
+struct MidiService : public DeletedAtShutdown\r
+{\r
+ MidiService()\r
{\r
- return isInput ? inputDeviceWatcher ->getDevices()\r
- : outputDeviceWatcher->getDevices();\r
- }\r
+ #if JUCE_USE_WINRT_MIDI\r
+ try\r
+ {\r
+ internal.reset (new WinRTMidiService());\r
+ return;\r
+ }\r
+ catch (std::runtime_error&) {}\r
+ #endif\r
\r
- int getDefaultDeviceIndex (bool isInput) override\r
- {\r
- return isInput ? inputDeviceWatcher ->getDefaultDeviceIndex()\r
- : outputDeviceWatcher->getDefaultDeviceIndex();\r
+ internal.reset (new Win32MidiService());\r
}\r
\r
- InputWrapper* createInputWrapper (MidiInput* input, int index, MidiInputCallback* callback) override\r
+ ~MidiService()\r
{\r
- return new WinRTInputWrapper (*this, input, index, *callback);\r
+ clearSingletonInstance();\r
}\r
\r
- OutputWrapper* createOutputWrapper (int index) override\r
+ static MidiServiceType& getService()\r
{\r
- return new WinRTOutputWrapper (*this, index);\r
+ jassert (getInstance()->internal != nullptr);\r
+ return *getInstance()->internal.get();\r
}\r
\r
- ComSmartPtr<IMidiInPortStatics> midiInFactory;\r
- ComSmartPtr<IMidiOutPortStatics> midiOutFactory;\r
-\r
- ScopedPointer<MidiIODeviceWatcher<IMidiInPortStatics>> inputDeviceWatcher;\r
- ScopedPointer<MidiIODeviceWatcher<IMidiOutPortStatics>> outputDeviceWatcher;\r
-\r
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WinRTMidiService)\r
-};\r
-\r
-#endif // JUCE_USE_WINRT_MIDI\r
-\r
-//==============================================================================\r
-class MidiService : public DeletedAtShutdown\r
-{\r
-public:\r
- ~MidiService();\r
-\r
- MidiServiceType* getService();\r
-\r
JUCE_DECLARE_SINGLETON (MidiService, false)\r
\r
private:\r
- MidiService();\r
-\r
- ScopedPointer<MidiServiceType> internal;\r
+ std::unique_ptr<MidiServiceType> internal;\r
};\r
\r
JUCE_IMPLEMENT_SINGLETON (MidiService)\r
\r
-MidiService::~MidiService()\r
-{\r
- clearSingletonInstance();\r
-}\r
-\r
-MidiServiceType* MidiService::getService()\r
-{\r
- return internal.get();\r
-}\r
-\r
-MidiService::MidiService()\r
-{\r
- #if JUCE_USE_WINRT_MIDI\r
- try\r
- {\r
- internal = new WinRTMidiService();\r
- return;\r
- }\r
- catch (std::runtime_error&)\r
- {\r
- }\r
- #endif\r
-\r
- internal = new WindowsMidiService();\r
-}\r
-\r
//==============================================================================\r
StringArray MidiInput::getDevices()\r
{\r
- return MidiService::getInstance()->getService()->getDevices (true);\r
+ return MidiService::getService().getDevices (true);\r
}\r
\r
int MidiInput::getDefaultDeviceIndex()\r
{\r
- return MidiService::getInstance()->getService()->getDefaultDeviceIndex (true);\r
+ return MidiService::getService().getDefaultDeviceIndex (true);\r
}\r
\r
-MidiInput::MidiInput (const String& deviceName)\r
- : name (deviceName)\r
+MidiInput::MidiInput (const String& deviceName) : name (deviceName)\r
{\r
}\r
\r
-MidiInput* MidiInput::openDevice (const int index, MidiInputCallback* const callback)\r
+MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback)\r
{\r
if (callback == nullptr)\r
return nullptr;\r
\r
- ScopedPointer<MidiInput> in (new MidiInput (String()));\r
- ScopedPointer<MidiServiceType::InputWrapper> wrapper;\r
+ std::unique_ptr<MidiInput> in (new MidiInput (String()));\r
+ std::unique_ptr<MidiServiceType::InputWrapper> wrapper;\r
\r
try\r
{\r
- wrapper = MidiService::getInstance()->getService()->createInputWrapper (in, index, callback);\r
+ wrapper.reset (MidiService::getService().createInputWrapper (*in, index, *callback));\r
}\r
catch (std::runtime_error&)\r
{\r
//==============================================================================\r
StringArray MidiOutput::getDevices()\r
{\r
- return MidiService::getInstance()->getService()->getDevices (false);\r
+ return MidiService::getService().getDevices (false);\r
}\r
\r
int MidiOutput::getDefaultDeviceIndex()\r
{\r
- return MidiService::getInstance()->getService()->getDefaultDeviceIndex (false);\r
+ return MidiService::getService().getDefaultDeviceIndex (false);\r
}\r
\r
-MidiOutput* MidiOutput::openDevice (const int index)\r
+MidiOutput* MidiOutput::openDevice (int index)\r
{\r
- ScopedPointer<MidiServiceType::OutputWrapper> wrapper;\r
+ std::unique_ptr<MidiServiceType::OutputWrapper> wrapper;\r
\r
try\r
{\r
- wrapper = MidiService::getInstance()->getService()->createOutputWrapper (index);\r
+ wrapper.reset (MidiService::getService().createOutputWrapper (index));\r
}\r
catch (std::runtime_error&)\r
{\r
return nullptr;\r
}\r
\r
- ScopedPointer<MidiOutput> out (new MidiOutput (wrapper->getDeviceName()));\r
+ std::unique_ptr<MidiOutput> out (new MidiOutput (wrapper->getDeviceName()));\r
out->internal = wrapper.release();\r
return out.release();\r
}\r
\r
JUCE_COMCLASS (MMDeviceEnumerator, "BCDE0395-E52F-467C-8E3D-C4579291692E");\r
\r
-typedef LONGLONG REFERENCE_TIME;\r
+using REFERENCE_TIME = LONGLONG;\r
\r
enum AVRT_PRIORITY\r
{\r
namespace WasapiClasses\r
{\r
\r
-String getDeviceID (IMMDevice* const device)\r
+String getDeviceID (IMMDevice* device)\r
{\r
String s;\r
WCHAR* deviceId = nullptr;\r
return flow;\r
}\r
\r
-int refTimeToSamples (const REFERENCE_TIME& t, const double sampleRate) noexcept\r
+int refTimeToSamples (const REFERENCE_TIME& t, double sampleRate) noexcept\r
{\r
return roundToInt (sampleRate * ((double) t) * 0.0000001);\r
}\r
\r
-REFERENCE_TIME samplesToRefTime (const int numSamples, const double sampleRate) noexcept\r
+REFERENCE_TIME samplesToRefTime (int numSamples, double sampleRate) noexcept\r
{\r
return (REFERENCE_TIME) ((numSamples * 10000.0 * 1000.0 / sampleRate) + 0.5);\r
}\r
\r
-void copyWavFormat (WAVEFORMATEXTENSIBLE& dest, const WAVEFORMATEX* const src) noexcept\r
+void copyWavFormat (WAVEFORMATEXTENSIBLE& dest, const WAVEFORMATEX* src) noexcept\r
{\r
memcpy (&dest, src, src->wFormatTag == WAVE_FORMAT_EXTENSIBLE ? sizeof (WAVEFORMATEXTENSIBLE)\r
: sizeof (WAVEFORMATEX));\r
class WASAPIDeviceBase\r
{\r
public:\r
- WASAPIDeviceBase (const ComSmartPtr<IMMDevice>& d, const bool exclusiveMode)\r
- : device (d),\r
- sampleRate (0),\r
- defaultSampleRate (0),\r
- numChannels (0),\r
- actualNumChannels (0),\r
- minBufferSize (0),\r
- defaultBufferSize (0),\r
- latencySamples (0),\r
- useExclusiveMode (exclusiveMode),\r
- actualBufferSize (0),\r
- bytesPerSample (0),\r
- bytesPerFrame (0),\r
- sampleRateHasChanged (false),\r
- shouldClose (false)\r
+ WASAPIDeviceBase (const ComSmartPtr<IMMDevice>& d, bool exclusiveMode)\r
+ : device (d), useExclusiveMode (exclusiveMode)\r
{\r
clientEvent = CreateEvent (nullptr, false, false, nullptr);\r
\r
{\r
sampleRateHasChanged = false;\r
shouldClose = false;\r
-\r
channelMaps.clear();\r
+\r
for (int i = 0; i <= channels.getHighestBit(); ++i)\r
if (channels[i])\r
channelMaps.add (i);\r
\r
REFERENCE_TIME latency;\r
+\r
if (check (client->GetStreamLatency (&latency)))\r
latencySamples = refTimeToSamples (latency, sampleRate);\r
\r
(void) check (client->GetBufferSize (&actualBufferSize));\r
-\r
createSessionEventCallback();\r
-\r
return check (client->SetEventHandle (clientEvent));\r
}\r
\r
//==============================================================================\r
ComSmartPtr<IMMDevice> device;\r
ComSmartPtr<IAudioClient> client;\r
- double sampleRate, defaultSampleRate;\r
- int numChannels, actualNumChannels;\r
- int minBufferSize, defaultBufferSize, latencySamples;\r
- DWORD mixFormatChannelMask;\r
+ double sampleRate = 0, defaultSampleRate = 0;\r
+ int numChannels = 0, actualNumChannels = 0;\r
+ int minBufferSize = 0, defaultBufferSize = 0, latencySamples = 0;\r
+ DWORD mixFormatChannelMask = 0;\r
const bool useExclusiveMode;\r
Array<double> rates;\r
- HANDLE clientEvent;\r
+ HANDLE clientEvent = {};\r
BigInteger channels;\r
Array<int> channelMaps;\r
- UINT32 actualBufferSize;\r
- int bytesPerSample, bytesPerFrame;\r
- bool sampleRateHasChanged, shouldClose;\r
+ UINT32 actualBufferSize = 0;\r
+ int bytesPerSample = 0, bytesPerFrame = 0;\r
+ bool sampleRateHasChanged = false, shouldClose = false;\r
\r
virtual void updateFormat (bool isFloat) = 0;\r
\r
private:\r
//==============================================================================\r
- class SessionEventCallback : public ComBaseClassHelper<IAudioSessionEvents>\r
+ struct SessionEventCallback : public ComBaseClassHelper<IAudioSessionEvents>\r
{\r
- public:\r
SessionEventCallback (WASAPIDeviceBase& d) : owner (d) {}\r
\r
JUCE_COMRESULT OnDisplayNameChanged (LPCWSTR, LPCGUID) { return S_OK; }\r
JUCE_COMRESULT OnSimpleVolumeChanged (float, BOOL, LPCGUID) { return S_OK; }\r
JUCE_COMRESULT OnChannelVolumeChanged (DWORD, float*, DWORD, LPCGUID) { return S_OK; }\r
JUCE_COMRESULT OnGroupingParamChanged (LPCGUID, LPCGUID) { return S_OK; }\r
+\r
JUCE_COMRESULT OnStateChanged(AudioSessionState state)\r
{\r
if (state == AudioSessionStateInactive || state == AudioSessionStateExpired)\r
return S_OK;\r
}\r
\r
- private:\r
WASAPIDeviceBase& owner;\r
-\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SessionEventCallback)\r
};\r
\r
return false;\r
}\r
\r
- bool tryInitialisingWithBufferSize (const int bufferSizeSamples)\r
+ bool tryInitialisingWithBufferSize (int bufferSizeSamples)\r
{\r
WAVEFORMATEXTENSIBLE format;\r
\r
class WASAPIInputDevice : public WASAPIDeviceBase\r
{\r
public:\r
- WASAPIInputDevice (const ComSmartPtr<IMMDevice>& d, const bool exclusiveMode)\r
- : WASAPIDeviceBase (d, exclusiveMode),\r
- reservoir (1, 1)\r
+ WASAPIInputDevice (const ComSmartPtr<IMMDevice>& d, bool exclusiveMode)\r
+ : WASAPIDeviceBase (d, exclusiveMode)\r
{\r
}\r
\r
close();\r
}\r
\r
- bool open (const double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples)\r
+ bool open (double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples)\r
{\r
return openClient (newSampleRate, newChannels, bufferSizeSamples)\r
&& (numChannels == 0 || check (client->GetService (__uuidof (IAudioCaptureClient),\r
closeClient();\r
captureClient = nullptr;\r
reservoir.reset();\r
- reservoirReadPos = reservoirWritePos = 0;\r
+ reservoirReadPos = 0;\r
+ reservoirWritePos = 0;\r
}\r
\r
template<class SourceType>\r
void updateFormatWithType (SourceType*) noexcept\r
{\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> NativeType;\r
- converter = new AudioData::ConverterInstance<AudioData::Pointer<SourceType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::Const>, NativeType> (actualNumChannels, 1);\r
+ using NativeType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+ converter.reset (new AudioData::ConverterInstance<AudioData::Pointer<SourceType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::Const>, NativeType> (actualNumChannels, 1));\r
}\r
\r
void updateFormat (bool isFloat) override\r
else updateFormatWithType ((AudioData::Int16*) nullptr);\r
}\r
\r
- bool start (const int userBufferSize)\r
+ bool start (int userBufferSize)\r
{\r
reservoirSize = actualBufferSize + userBufferSize;\r
reservoirMask = nextPowerOfTwo (reservoirSize) - 1;\r
reservoir.setSize ((reservoirMask + 1) * bytesPerFrame, true);\r
- reservoirReadPos = reservoirWritePos = 0;\r
+ reservoirReadPos = 0;\r
+ reservoirWritePos = 0;\r
xruns = 0;\r
\r
if (! check (client->Start()))\r
captureClient->ReleaseBuffer (numSamplesAvailable);\r
}\r
\r
- int getNumSamplesInReservoir() const noexcept { return reservoirWritePos - reservoirReadPos; }\r
+ int getNumSamplesInReservoir() const noexcept { return reservoirWritePos.load() - reservoirReadPos.load(); }\r
\r
void handleDeviceBuffer()\r
{\r
\r
while (samplesLeft > 0)\r
{\r
- const int localWrite = reservoirWritePos & reservoirMask;\r
- const int samplesToDo = jmin (samplesLeft, reservoirMask + 1 - localWrite);\r
- const int samplesToDoBytes = samplesToDo * bytesPerFrame;\r
+ auto localWrite = reservoirWritePos.load() & reservoirMask;\r
+ auto samplesToDo = jmin (samplesLeft, reservoirMask + 1 - localWrite);\r
+ auto samplesToDoBytes = samplesToDo * bytesPerFrame;\r
\r
void* reservoirPtr = addBytesToPointer (reservoir.getData(), localWrite * bytesPerFrame);\r
\r
}\r
\r
if (getNumSamplesInReservoir() > reservoirSize)\r
- reservoirReadPos = reservoirWritePos - reservoirSize;\r
+ reservoirReadPos = reservoirWritePos.load() - reservoirSize;\r
\r
captureClient->ReleaseBuffer (numSamplesAvailable);\r
}\r
\r
while (bufferSize > 0)\r
{\r
- const int localRead = reservoirReadPos & reservoirMask;\r
+ auto localRead = reservoirReadPos.load() & reservoirMask;\r
+ auto samplesToDo = jmin (bufferSize, getNumSamplesInReservoir(), reservoirMask + 1 - localRead);\r
\r
- const int samplesToDo = jmin (bufferSize, getNumSamplesInReservoir(), reservoirMask + 1 - localRead);\r
if (samplesToDo <= 0)\r
break;\r
\r
- const int reservoirOffset = localRead * bytesPerFrame;\r
+ auto reservoirOffset = localRead * bytesPerFrame;\r
\r
for (int i = 0; i < numDestBuffers; ++i)\r
converter->convertSamples (destBuffers[i] + offset, 0, addBytesToPointer (reservoir.getData(), reservoirOffset), channelMaps.getUnchecked(i), samplesToDo);\r
ComSmartPtr<IAudioCaptureClient> captureClient;\r
MemoryBlock reservoir;\r
int reservoirSize, reservoirMask, xruns;\r
- volatile int reservoirReadPos, reservoirWritePos;\r
+ std::atomic<int> reservoirReadPos, reservoirWritePos;\r
\r
- ScopedPointer<AudioData::Converter> converter;\r
+ std::unique_ptr<AudioData::Converter> converter;\r
\r
private:\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WASAPIInputDevice)\r
class WASAPIOutputDevice : public WASAPIDeviceBase\r
{\r
public:\r
- WASAPIOutputDevice (const ComSmartPtr<IMMDevice>& d, const bool exclusiveMode)\r
+ WASAPIOutputDevice (const ComSmartPtr<IMMDevice>& d, bool exclusiveMode)\r
: WASAPIDeviceBase (d, exclusiveMode)\r
{\r
}\r
close();\r
}\r
\r
- bool open (const double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples)\r
+ bool open (double newSampleRate, const BigInteger& newChannels, int bufferSizeSamples)\r
{\r
return openClient (newSampleRate, newChannels, bufferSizeSamples)\r
&& (numChannels == 0 || check (client->GetService (__uuidof (IAudioRenderClient),\r
template<class DestType>\r
void updateFormatWithType (DestType*)\r
{\r
- typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> NativeType;\r
- converter = new AudioData::ConverterInstance<NativeType, AudioData::Pointer<DestType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst>> (1, actualNumChannels);\r
+ using NativeType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
+ converter.reset (new AudioData::ConverterInstance<NativeType, AudioData::Pointer<DestType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst>> (1, actualNumChannels));\r
}\r
\r
void updateFormat (bool isFloat) override\r
\r
bool start()\r
{\r
- int samplesToDo = getNumSamplesAvailableToCopy();\r
+ auto samplesToDo = getNumSamplesAvailableToCopy();\r
uint8* outputData;\r
\r
if (check (renderClient->GetBuffer (samplesToDo, &outputData)))\r
if (! useExclusiveMode)\r
{\r
UINT32 padding = 0;\r
+\r
if (check (client->GetCurrentPadding (&padding)))\r
return actualBufferSize - (int) padding;\r
}\r
return actualBufferSize;\r
}\r
\r
- void copyBuffers (const float** const srcBuffers, const int numSrcBuffers, int bufferSize,\r
+ void copyBuffers (const float** srcBuffers, int numSrcBuffers, int bufferSize,\r
WASAPIInputDevice* inputDevice, Thread& thread)\r
{\r
if (numChannels <= 0)\r
}\r
\r
ComSmartPtr<IAudioRenderClient> renderClient;\r
- ScopedPointer<AudioData::Converter> converter;\r
+ std::unique_ptr<AudioData::Converter> converter;\r
\r
private:\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WASAPIOutputDevice)\r
const String& typeName,\r
const String& outputDeviceID,\r
const String& inputDeviceID,\r
- const bool exclusiveMode)\r
+ bool exclusiveMode)\r
: AudioIODevice (deviceName, typeName),\r
Thread ("JUCE WASAPI"),\r
outputDeviceId (outputDeviceID),\r
inputDeviceId (inputDeviceID),\r
- useExclusiveMode (exclusiveMode),\r
- isOpen_ (false),\r
- isStarted (false),\r
- currentBufferSizeSamples (0),\r
- currentSampleRate (0),\r
- callback (nullptr),\r
- deviceBecameInactive (false)\r
+ useExclusiveMode (exclusiveMode)\r
{\r
}\r
\r
}\r
else\r
{\r
- WASAPIDeviceBase* d = inputDevice != nullptr ? static_cast<WASAPIDeviceBase*> (inputDevice)\r
- : static_cast<WASAPIDeviceBase*> (outputDevice);\r
+ WASAPIDeviceBase* d = inputDevice != nullptr ? static_cast<WASAPIDeviceBase*> (inputDevice.get())\r
+ : static_cast<WASAPIDeviceBase*> (outputDevice.get());\r
defaultSampleRate = d->defaultSampleRate;\r
minBufferSize = d->minBufferSize;\r
defaultBufferSize = d->defaultBufferSize;\r
BigInteger getActiveOutputChannels() const override { return outputDevice != nullptr ? outputDevice->channels : BigInteger(); }\r
BigInteger getActiveInputChannels() const override { return inputDevice != nullptr ? inputDevice->channels : BigInteger(); }\r
String getLastError() override { return lastError; }\r
- int getXRunCount () const noexcept override { return inputDevice != nullptr ? inputDevice->xruns : -1; }\r
+ int getXRunCount() const noexcept override { return inputDevice != nullptr ? inputDevice->xruns : -1; }\r
\r
String open (const BigInteger& inputChannels, const BigInteger& outputChannels,\r
double sampleRate, int bufferSizeSamples) override\r
{\r
if (isStarted)\r
{\r
- AudioIODeviceCallback* const callbackLocal = callback;\r
+ auto* callbackLocal = callback;\r
\r
{\r
const ScopedLock sl (startStopLock);\r
if (avSetMmThreadCharacteristics != 0 && avSetMmThreadPriority != 0)\r
{\r
DWORD dummy = 0;\r
- HANDLE h = avSetMmThreadCharacteristics (L"Pro Audio", &dummy);\r
\r
- if (h != 0)\r
+ if (auto h = avSetMmThreadCharacteristics (L"Pro Audio", &dummy))\r
avSetMmThreadPriority (h, AVRT_PRIORITY_NORMAL);\r
}\r
}\r
{\r
setMMThreadPriority();\r
\r
- const int bufferSize = currentBufferSizeSamples;\r
- const int numInputBuffers = getActiveInputChannels().countNumberOfSetBits();\r
- const int numOutputBuffers = getActiveOutputChannels().countNumberOfSetBits();\r
+ auto bufferSize = currentBufferSizeSamples;\r
+ auto numInputBuffers = getActiveInputChannels().countNumberOfSetBits();\r
+ auto numOutputBuffers = getActiveOutputChannels().countNumberOfSetBits();\r
bool sampleRateHasChanged = false;\r
\r
AudioBuffer<float> ins (jmax (1, numInputBuffers), bufferSize + 32);\r
AudioBuffer<float> outs (jmax (1, numOutputBuffers), bufferSize + 32);\r
- float** const inputBuffers = ins.getArrayOfWritePointers();\r
- float** const outputBuffers = outs.getArrayOfWritePointers();\r
+ auto inputBuffers = ins.getArrayOfWritePointers();\r
+ auto outputBuffers = outs.getArrayOfWritePointers();\r
ins.clear();\r
outs.clear();\r
\r
{\r
// Note that this function is handed the input device so it can check for the event and make sure\r
// the input reservoir is filled up correctly even when bufferSize > device actualBufferSize\r
- outputDevice->copyBuffers (const_cast<const float**> (outputBuffers), numOutputBuffers, bufferSize, inputDevice, *this);\r
+ outputDevice->copyBuffers (const_cast<const float**> (outputBuffers), numOutputBuffers, bufferSize, inputDevice.get(), *this);\r
\r
if (outputDevice->sampleRateHasChanged)\r
{\r
\r
private:\r
// Device stats...\r
- ScopedPointer<WASAPIInputDevice> inputDevice;\r
- ScopedPointer<WASAPIOutputDevice> outputDevice;\r
+ std::unique_ptr<WASAPIInputDevice> inputDevice;\r
+ std::unique_ptr<WASAPIOutputDevice> outputDevice;\r
const bool useExclusiveMode;\r
- double defaultSampleRate;\r
- int minBufferSize, defaultBufferSize;\r
- int latencyIn, latencyOut;\r
+ double defaultSampleRate = 0;\r
+ int minBufferSize = 0, defaultBufferSize = 0;\r
+ int latencyIn = 0, latencyOut = 0;\r
Array<double> sampleRates;\r
Array<int> bufferSizes;\r
\r
// Active state...\r
- bool isOpen_, isStarted;\r
- int currentBufferSizeSamples;\r
- double currentSampleRate;\r
+ bool isOpen_ = false, isStarted = false;\r
+ int currentBufferSizeSamples = 0;\r
+ double currentSampleRate = 0;\r
\r
- AudioIODeviceCallback* callback;\r
+ AudioIODeviceCallback* callback = {};\r
CriticalSection startStopLock;\r
\r
- bool sampleRateChangedByOutput, deviceBecameInactive;\r
+ bool sampleRateChangedByOutput = false, deviceBecameInactive = false;\r
\r
BigInteger lastKnownInputChannels, lastKnownOutputChannels;\r
\r
bool createDevices()\r
{\r
ComSmartPtr<IMMDeviceEnumerator> enumerator;\r
+\r
if (! check (enumerator.CoCreateInstance (__uuidof (MMDeviceEnumerator))))\r
return false;\r
\r
ComSmartPtr<IMMDeviceCollection> deviceCollection;\r
+\r
if (! check (enumerator->EnumAudioEndpoints (eAll, DEVICE_STATE_ACTIVE, deviceCollection.resetAndGetPointerAddress())))\r
return false;\r
\r
UINT32 numDevices = 0;\r
+\r
if (! check (deviceCollection->GetCount (&numDevices)))\r
return false;\r
\r
for (UINT32 i = 0; i < numDevices; ++i)\r
{\r
ComSmartPtr<IMMDevice> device;\r
+\r
if (! check (deviceCollection->Item (i, device.resetAndGetPointerAddress())))\r
continue;\r
\r
- const String deviceId (getDeviceID (device));\r
+ auto deviceId = getDeviceID (device);\r
+\r
if (deviceId.isEmpty())\r
continue;\r
\r
- const EDataFlow flow = getDataFlow (device);\r
+ auto flow = getDataFlow (device);\r
\r
if (deviceId == inputDeviceId && flow == eCapture)\r
- inputDevice = new WASAPIInputDevice (device, useExclusiveMode);\r
+ inputDevice.reset (new WASAPIInputDevice (device, useExclusiveMode));\r
else if (deviceId == outputDeviceId && flow == eRender)\r
- outputDevice = new WASAPIOutputDevice (device, useExclusiveMode);\r
+ outputDevice.reset (new WASAPIOutputDevice (device, useExclusiveMode));\r
}\r
\r
return (outputDeviceId.isEmpty() || (outputDevice != nullptr && outputDevice->isOk()))\r
- && (inputDeviceId.isEmpty() || (inputDevice != nullptr && inputDevice->isOk()));\r
+ && (inputDeviceId.isEmpty() || (inputDevice != nullptr && inputDevice->isOk()));\r
}\r
\r
//==============================================================================\r
WASAPIAudioIODeviceType (bool exclusive)\r
: AudioIODeviceType (exclusive ? "Windows Audio (Exclusive Mode)" : "Windows Audio"),\r
DeviceChangeDetector (L"Windows Audio"),\r
- exclusiveMode (exclusive),\r
- hasScanned (false)\r
+ exclusiveMode (exclusive)\r
{\r
}\r
\r
{\r
jassert (hasScanned); // need to call scanForDevices() before doing this\r
\r
- if (WASAPIAudioIODevice* const d = dynamic_cast<WASAPIAudioIODevice*> (device))\r
+ if (auto d = dynamic_cast<WASAPIAudioIODevice*> (device))\r
return asInput ? inputDeviceIds.indexOf (d->inputDeviceId)\r
: outputDeviceIds.indexOf (d->outputDeviceId);\r
\r
{\r
jassert (hasScanned); // need to call scanForDevices() before doing this\r
\r
- ScopedPointer<WASAPIAudioIODevice> device;\r
+ std::unique_ptr<WASAPIAudioIODevice> device;\r
\r
- const int outputIndex = outputDeviceNames.indexOf (outputDeviceName);\r
- const int inputIndex = inputDeviceNames.indexOf (inputDeviceName);\r
+ auto outputIndex = outputDeviceNames.indexOf (outputDeviceName);\r
+ auto inputIndex = inputDeviceNames.indexOf (inputDeviceName);\r
\r
if (outputIndex >= 0 || inputIndex >= 0)\r
{\r
- device = new WASAPIAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
- : inputDeviceName,\r
- getTypeName(),\r
- outputDeviceIds [outputIndex],\r
- inputDeviceIds [inputIndex],\r
- exclusiveMode);\r
+ device.reset (new WASAPIAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName\r
+ : inputDeviceName,\r
+ getTypeName(),\r
+ outputDeviceIds [outputIndex],\r
+ inputDeviceIds [inputIndex],\r
+ exclusiveMode));\r
\r
if (! device->initialise())\r
device = nullptr;\r
StringArray inputDeviceNames, inputDeviceIds;\r
\r
private:\r
- bool exclusiveMode, hasScanned;\r
+ const bool exclusiveMode;\r
+ bool hasScanned = false;\r
ComSmartPtr<IMMDeviceEnumerator> enumerator;\r
\r
//==============================================================================\r
ComSmartPtr<ChangeNotificationClient> notifyClient;\r
\r
//==============================================================================\r
- static String getDefaultEndpoint (IMMDeviceEnumerator* const enumerator, const bool forCapture)\r
+ static String getDefaultEndpoint (IMMDeviceEnumerator* enumerator, bool forCapture)\r
{\r
String s;\r
IMMDevice* dev = nullptr;\r
enumerator->RegisterEndpointNotificationCallback (notifyClient);\r
}\r
\r
- const String defaultRenderer (getDefaultEndpoint (enumerator, false));\r
- const String defaultCapture (getDefaultEndpoint (enumerator, true));\r
+ auto defaultRenderer = getDefaultEndpoint (enumerator, false);\r
+ auto defaultCapture = getDefaultEndpoint (enumerator, true);\r
\r
ComSmartPtr<IMMDeviceCollection> deviceCollection;\r
UINT32 numDevices = 0;\r
for (UINT32 i = 0; i < numDevices; ++i)\r
{\r
ComSmartPtr<IMMDevice> device;\r
+\r
if (! check (deviceCollection->Item (i, device.resetAndGetPointerAddress())))\r
continue;\r
\r
DWORD state = 0;\r
+\r
if (! (check (device->GetState (&state)) && state == DEVICE_STATE_ACTIVE))\r
continue;\r
\r
- const String deviceId (getDeviceID (device));\r
+ auto deviceId = getDeviceID (device);\r
String name;\r
\r
{\r
ComSmartPtr<IPropertyStore> properties;\r
+\r
if (! check (device->OpenPropertyStore (STGM_READ, properties.resetAndGetPointerAddress())))\r
continue;\r
\r
PropVariantClear (&value);\r
}\r
\r
- const EDataFlow flow = getDataFlow (device);\r
+ auto flow = getDataFlow (device);\r
\r
if (flow == eRender)\r
{\r
MMDeviceMasterVolume()\r
{\r
ComSmartPtr<IMMDeviceEnumerator> enumerator;\r
+\r
if (check (enumerator.CoCreateInstance (__uuidof (MMDeviceEnumerator))))\r
{\r
ComSmartPtr<IMMDevice> device;\r
+\r
if (check (enumerator->GetDefaultAudioEndpoint (eRender, eConsole, device.resetAndGetPointerAddress())))\r
check (device->Activate (__uuidof (IAudioEndpointVolume), CLSCTX_INPROC_SERVER, nullptr,\r
(void**) endpointVolume.resetAndGetPointerAddress()));\r
float getGain() const\r
{\r
float vol = 0.0f;\r
+\r
if (endpointVolume != nullptr)\r
check (endpointVolume->GetMasterVolumeLevelScalar (&vol));\r
\r
PositionableAudioSource* newPositionableSource = nullptr;\r
AudioSource* newMasterSource = nullptr;\r
\r
- ScopedPointer<ResamplingAudioSource> oldResamplerSource (resamplerSource);\r
- ScopedPointer<BufferingAudioSource> oldBufferingSource (bufferingSource);\r
+ std::unique_ptr<ResamplingAudioSource> oldResamplerSource (resamplerSource);\r
+ std::unique_ptr<BufferingAudioSource> oldBufferingSource (bufferingSource);\r
AudioSource* oldMasterSource = masterSource;\r
\r
if (newSource != nullptr)\r
AudioSource* masterSource = nullptr;\r
\r
CriticalSection callbackLock;\r
- float volatile gain = 1.0f, lastGain = 1.0f;\r
- bool volatile playing = false, stopped = true;\r
+ float gain = 1.0f, lastGain = 1.0f;\r
+ bool playing = false, stopped = true;\r
double sampleRate = 44100.0, sourceSampleRate = 0;\r
int blockSize = 128, readAheadBufferSize = 0;\r
- bool volatile isPrepared = false, inputStreamEOF = false;\r
+ bool isPrepared = false, inputStreamEOF = false;\r
\r
void releaseMasterResources();\r
\r
\r
AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails)\r
{\r
- ScopedPointer<AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream));\r
+ std::unique_ptr<AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream));\r
\r
if (w->sampleRate > 0 && w->numChannels > 0)\r
return w.release();\r
AudioFormatReader* CoreAudioFormat::createReaderFor (InputStream* sourceStream,\r
bool deleteStreamIfOpeningFails)\r
{\r
- ScopedPointer<CoreAudioReader> r (new CoreAudioReader (sourceStream));\r
+ std::unique_ptr<CoreAudioReader> r (new CoreAudioReader (sourceStream));\r
\r
if (r->ok)\r
return r.release();\r
\r
AudioFormatReader* FlacAudioFormat::createReaderFor (InputStream* in, const bool deleteStreamIfOpeningFails)\r
{\r
- ScopedPointer<FlacReader> r (new FlacReader (in));\r
+ std::unique_ptr<FlacReader> r (new FlacReader (in));\r
\r
if (r->sampleRate > 0)\r
return r.release();\r
{\r
if (out != nullptr && getPossibleBitDepths().contains (bitsPerSample))\r
{\r
- ScopedPointer<FlacWriter> w (new FlacWriter (out, sampleRate, numberOfChannels,\r
+ std::unique_ptr<FlacWriter> w (new FlacWriter (out, sampleRate, numberOfChannels,\r
(uint32) bitsPerSample, qualityOptionIndex));\r
if (w->ok)\r
return w.release();\r
\r
if (auto* out = tempWav.getFile().createOutputStream())\r
{\r
- writer = wavFormat.createWriterFor (out, sampleRate, numChannels,\r
- bitsPerSample, metadata, 0);\r
+ writer.reset (wavFormat.createWriterFor (out, sampleRate, numChannels,\r
+ bitsPerSample, metadata, 0));\r
\r
args.add (appFile.getFullPathName());\r
\r
private:\r
int vbrLevel, cbrBitrate;\r
TemporaryFile tempWav { ".wav" };\r
- ScopedPointer<AudioFormatWriter> writer;\r
+ std::unique_ptr<AudioFormatWriter> writer;\r
StringArray args;\r
\r
bool runLameChildProcess (const TemporaryFile& tempMP3, const StringArray& processArgs) const\r
\r
AudioFormatReader* MP3AudioFormat::createReaderFor (InputStream* sourceStream, const bool deleteStreamIfOpeningFails)\r
{\r
- ScopedPointer<MP3Decoder::MP3Reader> r (new MP3Decoder::MP3Reader (sourceStream));\r
+ std::unique_ptr<MP3Decoder::MP3Reader> r (new MP3Decoder::MP3Reader (sourceStream));\r
\r
if (r->lengthInSamples > 0)\r
return r.release();\r
\r
AudioFormatReader* OggVorbisAudioFormat::createReaderFor (InputStream* in, bool deleteStreamIfOpeningFails)\r
{\r
- ScopedPointer<OggReader> r (new OggReader (in));\r
+ std::unique_ptr<OggReader> r (new OggReader (in));\r
\r
if (r->sampleRate > 0)\r
return r.release();\r
if (out == nullptr)\r
return nullptr;\r
\r
- ScopedPointer<OggWriter> w (new OggWriter (out, sampleRate, numChannels,\r
- (unsigned int) bitsPerSample,\r
- qualityOptionIndex, metadataValues));\r
+ std::unique_ptr<OggWriter> w (new OggWriter (out, sampleRate, numChannels,\r
+ (unsigned int) bitsPerSample,\r
+ qualityOptionIndex, metadataValues));\r
\r
return w->ok ? w.release() : nullptr;\r
}\r
{\r
if (auto* in = source.createInputStream())\r
{\r
- ScopedPointer<AudioFormatReader> r (createReaderFor (in, true));\r
+ std::unique_ptr<AudioFormatReader> r (createReaderFor (in, true));\r
\r
if (r != nullptr)\r
{\r
{\r
static void addToMetadata (StringPairArray& destValues, const String& source)\r
{\r
- ScopedPointer<XmlElement> xml (XmlDocument::parse (source));\r
+ std::unique_ptr<XmlElement> xml (XmlDocument::parse (source));\r
\r
if (xml != nullptr && xml->hasTagName ("ebucore:ebuCoreMain"))\r
{\r
auto identifier = (uint32) input->readInt();\r
auto sampleLength = (uint32) input->readInt();\r
auto purpose = (uint32) input->readInt();\r
- auto country = (uint16) input->readInt();\r
- auto language = (uint16) input->readInt();\r
- auto dialect = (uint16) input->readInt();\r
- auto codePage = (uint16) input->readInt();\r
+ auto country = (uint16) input->readShort();\r
+ auto language = (uint16) input->readShort();\r
+ auto dialect = (uint16) input->readShort();\r
+ auto codePage = (uint16) input->readShort();\r
auto stringLength = adtlLength - 20;\r
\r
MemoryBlock textBlock;\r
\r
AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails)\r
{\r
- ScopedPointer<WavAudioFormatReader> r (new WavAudioFormatReader (sourceStream));\r
+ std::unique_ptr<WavAudioFormatReader> r (new WavAudioFormatReader (sourceStream));\r
\r
#if JUCE_USE_OGGVORBIS\r
if (r->isSubformatOggVorbis)\r
TemporaryFile tempFile (file);\r
WavAudioFormat wav;\r
\r
- ScopedPointer<AudioFormatReader> reader (wav.createReaderFor (file.createInputStream(), true));\r
+ std::unique_ptr<AudioFormatReader> reader (wav.createReaderFor (file.createInputStream(), true));\r
\r
if (reader != nullptr)\r
{\r
- ScopedPointer<OutputStream> outStream (tempFile.getFile().createOutputStream());\r
+ std::unique_ptr<OutputStream> outStream (tempFile.getFile().createOutputStream());\r
\r
if (outStream != nullptr)\r
{\r
- ScopedPointer<AudioFormatWriter> writer (wav.createWriterFor (outStream.get(), reader->sampleRate,\r
- reader->numChannels, (int) reader->bitsPerSample,\r
- metadata, 0));\r
+ std::unique_ptr<AudioFormatWriter> writer (wav.createWriterFor (outStream.get(), reader->sampleRate,\r
+ reader->numChannels, (int) reader->bitsPerSample,\r
+ metadata, 0));\r
\r
if (writer != nullptr)\r
{\r
{\r
using namespace WavFileHelpers;\r
\r
- ScopedPointer<WavAudioFormatReader> reader (static_cast<WavAudioFormatReader*> (createReaderFor (wavFile.createInputStream(), true)));\r
+ std::unique_ptr<WavAudioFormatReader> reader (static_cast<WavAudioFormatReader*> (createReaderFor (wavFile.createInputStream(), true)));\r
\r
if (reader != nullptr)\r
{\r
{\r
beginTest ("Creating a basic wave writer");\r
\r
- ScopedPointer<AudioFormatWriter> writer (format.createWriterFor (new MemoryOutputStream (memoryBlock, false),\r
- 44100.0, numTestAudioBufferChannels,\r
- 32, metadataValues, 0));\r
+ std::unique_ptr<AudioFormatWriter> writer (format.createWriterFor (new MemoryOutputStream (memoryBlock, false),\r
+ 44100.0, numTestAudioBufferChannels,\r
+ 32, metadataValues, 0));\r
expect (writer != nullptr);\r
\r
AudioBuffer<float> buffer (numTestAudioBufferChannels, numTestAudioBufferSamples);\r
{\r
beginTest ("Creating a basic wave reader");\r
\r
- ScopedPointer<AudioFormatReader> reader (format.createReaderFor (new MemoryInputStream (memoryBlock, false), false));\r
+ std::unique_ptr<AudioFormatReader> reader (format.createReaderFor (new MemoryInputStream (memoryBlock, false), false));\r
expect (reader != nullptr);\r
expect (reader->metadataValues == metadataValues, "Somehow, the metadata is different!");\r
}\r
//==============================================================================\r
AudioFormatReader* WindowsMediaAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails)\r
{\r
- ScopedPointer<WindowsMediaCodec::WMAudioReader> r (new WindowsMediaCodec::WMAudioReader (sourceStream));\r
+ std::unique_ptr<WindowsMediaCodec::WMAudioReader> r (new WindowsMediaCodec::WMAudioReader (sourceStream));\r
\r
if (r->sampleRate > 0)\r
return r.release();\r
\r
if (audioFileStream != nullptr)\r
{\r
- ScopedPointer<InputStream> in (audioFileStream);\r
+ std::unique_ptr<InputStream> in (audioFileStream);\r
auto originalStreamPos = in->getPosition();\r
\r
for (auto* af : knownFormats)\r
template <class DestSampleType, class SourceSampleType, class SourceEndianness>\r
struct ReadHelper\r
{\r
- typedef AudioData::Pointer<DestSampleType, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst> DestType;\r
- typedef AudioData::Pointer<SourceSampleType, SourceEndianness, AudioData::Interleaved, AudioData::Const> SourceType;\r
+ using DestType = AudioData::Pointer<DestSampleType, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;\r
+ using SourceType = AudioData::Pointer<SourceSampleType, SourceEndianness, AudioData::Interleaved, AudioData::Const>;\r
\r
template <typename TargetType>\r
static void read (TargetType* const* destData, int destOffset, int numDestChannels,\r
//==============================================================================\r
OptionalScopedPointer<AudioFormatReader> reader;\r
\r
- int64 volatile nextPlayPos;\r
- bool volatile looping;\r
+ int64 nextPlayPos;\r
+ bool looping;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatReaderSource)\r
};\r
\r
while (numSamples > 0)\r
{\r
- const int numToDo = jmin (numSamples, maxSamples);\r
+ auto numToDo = jmin (numSamples, maxSamples);\r
\r
for (int i = 0; i < numSourceChannels; ++i)\r
convertFloatsToInts (chans[i], channels[i] + startSample, numToDo);\r
: fifo (numSamples),\r
buffer (channels, numSamples),\r
timeSliceThread (tst),\r
- writer (w),\r
- receiver (nullptr),\r
- samplesWritten (0),\r
- samplesPerFlush (0),\r
- flushSampleCounter (0),\r
- isRunning (true)\r
+ writer (w)\r
{\r
timeSliceThread.addTimeSliceClient (this);\r
}\r
\r
int writePendingData()\r
{\r
- const int numToDo = fifo.getTotalSize() / 4;\r
+ auto numToDo = fifo.getTotalSize() / 4;\r
\r
int start1, size1, start2, size2;\r
fifo.prepareToRead (numToDo, start1, size1, start2, size2);\r
writer->writeFromAudioSampleBuffer (buffer, start1, size1);\r
\r
const ScopedLock sl (thumbnailLock);\r
+\r
if (receiver != nullptr)\r
receiver->addBlock (samplesWritten, buffer, start1, size1);\r
\r
AbstractFifo fifo;\r
AudioBuffer<float> buffer;\r
TimeSliceThread& timeSliceThread;\r
- ScopedPointer<AudioFormatWriter> writer;\r
+ std::unique_ptr<AudioFormatWriter> writer;\r
CriticalSection thumbnailLock;\r
- IncomingDataReceiver* receiver;\r
- int64 samplesWritten;\r
- int samplesPerFlush, flushSampleCounter;\r
- volatile bool isRunning;\r
+ IncomingDataReceiver* receiver = {};\r
+ int64 samplesWritten = 0;\r
+ int samplesPerFlush = 0, flushSampleCounter = 0;\r
+ std::atomic<bool> isRunning { true };\r
\r
JUCE_DECLARE_NON_COPYABLE (Buffer)\r
};\r
private:\r
class Buffer;\r
friend struct ContainerDeletePolicy<Buffer>;\r
- ScopedPointer<Buffer> buffer;\r
+ std::unique_ptr<Buffer> buffer;\r
};\r
\r
protected:\r
template <class DestSampleType, class SourceSampleType, class DestEndianness>\r
struct WriteHelper\r
{\r
- typedef AudioData::Pointer <DestSampleType, DestEndianness, AudioData::Interleaved, AudioData::NonConst> DestType;\r
- typedef AudioData::Pointer <SourceSampleType, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SourceType;\r
+ using DestType = AudioData::Pointer <DestSampleType, DestEndianness, AudioData::Interleaved, AudioData::NonConst>;\r
+ using SourceType = AudioData::Pointer <SourceSampleType, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;\r
\r
static void write (void* destData, int numDestChannels, const int* const* source,\r
int numSamples, const int sourceOffset = 0) noexcept\r
int64 startSampleInFile, int numSamples) override;\r
\r
private:\r
- ScopedPointer<AudioFormatReader> source;\r
+ std::unique_ptr<AudioFormatReader> source;\r
TimeSliceThread& thread;\r
int64 nextReadPosition;\r
const int numBlocks;\r
protected:\r
File file;\r
Range<int64> mappedSection;\r
- ScopedPointer<MemoryMappedFile> map;\r
+ std::unique_ptr<MemoryMappedFile> map;\r
int64 dataChunkStart, dataLength;\r
int bytesPerFrame;\r
\r
template <typename SampleType, typename Endianness>\r
Range<float> scanMinAndMaxInterleaved (int channel, int64 startSampleInFile, int64 numSamples) const noexcept\r
{\r
- typedef AudioData::Pointer <SampleType, Endianness, AudioData::Interleaved, AudioData::Const> SourceType;\r
+ using SourceType = AudioData::Pointer <SampleType, Endianness, AudioData::Interleaved, AudioData::Const>;\r
\r
return SourceType (addBytesToPointer (sampleToPointer (startSampleInFile), ((int) bitsPerSample / 8) * channel), (int) numChannels)\r
.findMinAndMax ((size_t) numSamples);\r
\r
ID: juce_audio_formats\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE audio file format codecs\r
description: Classes for reading and writing various audio file formats.\r
website: http://www.juce.com/juce\r
friend class SamplerVoice;\r
\r
String name;\r
- ScopedPointer<AudioBuffer<float>> data;\r
+ std::unique_ptr<AudioBuffer<float>> data;\r
double sourceSampleRate;\r
BigInteger midiNotes;\r
int length = 0, attackSamples = 0, releaseSamples = 0;\r
return AAX_eStemFormat_INT32_MAX;\r
}\r
\r
- static AudioChannelSet channelSetFromStemFormat (AAX_EStemFormat format, bool ignoreLayout) noexcept\r
+ static inline AudioChannelSet channelSetFromStemFormat (AAX_EStemFormat format, bool ignoreLayout) noexcept\r
{\r
if (! ignoreLayout)\r
{\r
setOpaque (true);\r
setBroughtToFrontOnMouseClick (true);\r
\r
- addAndMakeVisible (pluginEditor = plugin.createEditorIfNeeded());\r
+ pluginEditor.reset (plugin.createEditorIfNeeded());\r
+ addAndMakeVisible (pluginEditor.get());\r
\r
if (pluginEditor != nullptr)\r
{\r
{\r
PopupMenu::dismissAllActiveMenus();\r
pluginEditor->removeMouseListener (this);\r
- pluginEditor->processor.editorBeingDeleted (pluginEditor);\r
+ pluginEditor->processor.editorBeingDeleted (pluginEditor.get());\r
}\r
}\r
\r
}\r
}\r
\r
- ScopedPointer<AudioProcessorEditor> pluginEditor;\r
+ std::unique_ptr<AudioProcessorEditor> pluginEditor;\r
JuceAAX_GUI& owner;\r
\r
#if JUCE_WINDOWS\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent)\r
};\r
\r
- ScopedPointer<ContentWrapperComponent> component;\r
+ std::unique_ptr<ContentWrapperComponent> component;\r
ScopedJuceInitialiser_GUI libraryInitialiser;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceAAX_GUI)\r
{\r
aaxWrapperProvidedBypassParam = true;\r
\r
- ownedBypassParameter = new AudioParameterBool (cDefaultMasterBypassID, "Master Bypass", false, {}, {}, {});\r
-\r
- bypassParameter = ownedBypassParameter;\r
+ ownedBypassParameter.reset (new AudioParameterBool (cDefaultMasterBypassID, "Master Bypass", false, {}, {}, {}));\r
+ bypassParameter = ownedBypassParameter.get();\r
}\r
\r
if (! bypassPartOfRegularParams)\r
//==============================================================================\r
ScopedJuceInitialiser_GUI libraryInitialiser;\r
\r
- ScopedPointer<AudioProcessor> pluginInstance;\r
+ std::unique_ptr<AudioProcessor> pluginInstance;\r
\r
bool isPrepared = false;\r
MidiBuffer midiBuffer;\r
Array<String> aaxParamIDs;\r
HashMap<int32, AudioProcessorParameter*> paramMap;\r
LegacyAudioParametersWrapper juceParameters;\r
- ScopedPointer<AudioProcessorParameter> ownedBypassParameter;\r
+ std::unique_ptr<AudioProcessorParameter> ownedBypassParameter;\r
\r
Array<AudioProcessorParameter*> aaxMeters;\r
\r
if (component == nullptr)\r
{\r
if (auto* params = dynamic_cast<JuceAAX_Processor*> (GetEffectParameters()))\r
- component = new ContentWrapperComponent (*this, params->getPluginInstance());\r
+ component.reset (new ContentWrapperComponent (*this, params->getPluginInstance()));\r
else\r
jassertfalse;\r
}\r
check (desc.AddProcessProc_Native (algorithmProcessCallback, properties));\r
}\r
\r
- static bool hostSupportsStemFormat (AAX_EStemFormat stemFormat, const AAX_IFeatureInfo* featureInfo)\r
+ static inline bool hostSupportsStemFormat (AAX_EStemFormat stemFormat, const AAX_IFeatureInfo* featureInfo)\r
{\r
if (featureInfo != nullptr)\r
{\r
\r
if (featureInfo->SupportLevel (supportLevel) == AAX_SUCCESS && supportLevel == AAX_eSupportLevel_ByProperty)\r
{\r
- ScopedPointer<const AAX_IPropertyMap> props (featureInfo->AcquireProperties());\r
+ std::unique_ptr<const AAX_IPropertyMap> props (featureInfo->AcquireProperties());\r
\r
// Due to a bug in ProTools 12.8, ProTools thinks that AAX_eStemFormat_Ambi_1_ACN is not supported\r
// To workaround this bug, check if ProTools supports AAX_eStemFormat_Ambi_2_ACN, and, if yes,\r
static void getPlugInDescription (AAX_IEffectDescriptor& descriptor, const AAX_IFeatureInfo* featureInfo)\r
{\r
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AAX;\r
- ScopedPointer<AudioProcessor> plugin = createPluginFilterOfType (AudioProcessor::wrapperType_AAX);\r
+ std::unique_ptr<AudioProcessor> plugin (createPluginFilterOfType (AudioProcessor::wrapperType_AAX));\r
auto numInputBuses = plugin->getBusCount (true);\r
auto numOutputBuses = plugin->getBusCount (false);\r
\r
check (descriptor.AddProcPtr ((void*) JuceAAX_GUI::Create, kAAX_ProcPtrID_Create_EffectGUI));\r
check (descriptor.AddProcPtr ((void*) JuceAAX_Processor::Create, kAAX_ProcPtrID_Create_EffectParameters));\r
\r
+ Array<int32> pluginIds;\r
#if JucePlugin_IsMidiEffect\r
// MIDI effect plug-ins do not support any audio channels\r
jassert (numInputBuses == 0 && numOutputBuses == 0);\r
+ ignoreUnused (featureInfo);\r
\r
if (auto* desc = descriptor.NewComponentDescriptor())\r
{\r
- createDescriptor (*desc, 0, plugin->getBusesLayout(), *plugin, numMeters);\r
+ createDescriptor (*desc, plugin->getBusesLayout(), *plugin, pluginIds, numMeters);\r
check (descriptor.AddComponent (desc));\r
}\r
-\r
#else\r
- Array<int32> pluginIds;\r
-\r
const int numIns = numInputBuses > 0 ? numElementsInArray (aaxFormats) : 0;\r
const int numOuts = numOutputBuses > 0 ? numElementsInArray (aaxFormats) : 0;\r
\r
{\r
ScopedJuceInitialiser_GUI libraryInitialiser;\r
\r
- ScopedPointer<const AAX_IFeatureInfo> stemFormatFeatureInfo;\r
+ std::unique_ptr<const AAX_IFeatureInfo> stemFormatFeatureInfo;\r
\r
if (const auto* hostDescription = collection->DescriptionHost())\r
- stemFormatFeatureInfo = hostDescription->AcquireFeatureProperties (AAXATTR_ClientFeature_StemFormat);\r
+ stemFormatFeatureInfo.reset (hostDescription->AcquireFeatureProperties (AAXATTR_ClientFeature_StemFormat));\r
\r
if (auto* descriptor = collection->NewDescriptor())\r
{\r
- AAXClasses::getPlugInDescription (*descriptor, stemFormatFeatureInfo);\r
+ AAXClasses::getPlugInDescription (*descriptor, stemFormatFeatureInfo.get());\r
collection->AddEffect (JUCE_STRINGIFY (JucePlugin_AAXIdentifier), descriptor);\r
\r
collection->SetManufacturerName (JucePlugin_Manufacturer);\r
//==============================================================================\r
void initialise (const String&) override\r
{\r
- mainWindow = createWindow();\r
+ mainWindow.reset (createWindow());\r
\r
#if JUCE_STANDALONE_FILTER_WINDOW_USE_KIOSK_MODE\r
- Desktop::getInstance().setKioskModeComponent (mainWindow, false);\r
+ Desktop::getInstance().setKioskModeComponent (mainWindow.get(), false);\r
#endif\r
\r
mainWindow->setVisible (true);\r
\r
protected:\r
ApplicationProperties appProperties;\r
- ScopedPointer<StandaloneFilterWindow> mainWindow;\r
+ std::unique_ptr<StandaloneFilterWindow> mainWindow;\r
};\r
\r
} // namespace juce\r
: processor->getMainBusNumInputChannels());\r
\r
if (preferredSetupOptions != nullptr)\r
- options = new AudioDeviceManager::AudioDeviceSetup (*preferredSetupOptions);\r
+ options.reset (new AudioDeviceManager::AudioDeviceSetup (*preferredSetupOptions));\r
\r
if (inChannels > 0 && RuntimePermissions::isRequired (RuntimePermissions::recordAudio)\r
&& ! RuntimePermissions::isGranted (RuntimePermissions::recordAudio))\r
\r
void init (bool enableAudioInput, const String& preferredDefaultDeviceName)\r
{\r
- setupAudioDevices (enableAudioInput, preferredDefaultDeviceName, options);\r
+ setupAudioDevices (enableAudioInput, preferredDefaultDeviceName, options.get());\r
reloadPluginState();\r
startPlaying();\r
\r
{\r
\r
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client\r
- processor = ::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone);\r
+ processor.reset (::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone));\r
#else\r
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone);\r
- processor = createPluginFilter();\r
+ processor.reset (createPluginFilter());\r
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined);\r
#endif\r
jassert (processor != nullptr); // Your createPluginFilter() function must return a valid object!\r
//==============================================================================\r
void startPlaying()\r
{\r
- player.setProcessor (processor);\r
+ player.setProcessor (processor.get());\r
\r
#if JucePlugin_Enable_IAA && JUCE_IOS\r
if (auto device = dynamic_cast<iOSAudioIODevice*> (deviceManager.getCurrentAudioDevice()))\r
{\r
if (settings != nullptr)\r
{\r
- ScopedPointer<XmlElement> xml (deviceManager.createStateXml());\r
+ std::unique_ptr<XmlElement> xml (deviceManager.createStateXml());\r
\r
- settings->setValue ("audioSetup", xml);\r
+ settings->setValue ("audioSetup", xml.get());\r
\r
#if ! (JUCE_IOS || JUCE_ANDROID)\r
settings->setValue ("shouldMuteInput", (bool) shouldMuteInput.getValue());\r
const String& preferredDefaultDeviceName,\r
const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions)\r
{\r
- ScopedPointer<XmlElement> savedState;\r
+ std::unique_ptr<XmlElement> savedState;\r
\r
if (settings != nullptr)\r
{\r
- savedState = settings->getXmlValue ("audioSetup");\r
+ savedState.reset (settings->getXmlValue ("audioSetup"));\r
\r
#if ! (JUCE_IOS || JUCE_ANDROID)\r
shouldMuteInput.setValue (settings->getBoolValue ("shouldMuteInput", true));\r
\r
deviceManager.initialise (enableAudioInput ? totalInChannels : 0,\r
totalOutChannels,\r
- savedState,\r
+ savedState.get(),\r
true,\r
preferredDefaultDeviceName,\r
preferredSetupOptions);\r
\r
//==============================================================================\r
OptionalScopedPointer<PropertySet> settings;\r
- ScopedPointer<AudioProcessor> processor;\r
+ std::unique_ptr<AudioProcessor> processor;\r
AudioDeviceManager deviceManager;\r
AudioProcessorPlayer player;\r
Array<PluginInOuts> channelConfiguration;\r
AudioBuffer<float> emptyBuffer;\r
bool autoOpenMidiDevices;\r
\r
- ScopedPointer<AudioDeviceManager::AudioDeviceSetup> options;\r
+ std::unique_ptr<AudioDeviceManager::AudioDeviceSetup> options;\r
StringArray lastMidiDevices;\r
\r
private:\r
optionsButton.setTriggeredOnMouseDown (true);\r
#endif\r
\r
- pluginHolder = new StandalonePluginHolder (settingsToUse, takeOwnershipOfSettings,\r
- preferredDefaultDeviceName, preferredSetupOptions,\r
- constrainToConfiguration, autoOpenMidiDevices);\r
+ pluginHolder.reset (new StandalonePluginHolder (settingsToUse, takeOwnershipOfSettings,\r
+ preferredDefaultDeviceName, preferredSetupOptions,\r
+ constrainToConfiguration, autoOpenMidiDevices));\r
\r
#if JUCE_IOS || JUCE_ANDROID\r
setFullScreen (true);\r
}\r
\r
//==============================================================================\r
- AudioProcessor* getAudioProcessor() const noexcept { return pluginHolder->processor; }\r
+ AudioProcessor* getAudioProcessor() const noexcept { return pluginHolder->processor.get(); }\r
AudioDeviceManager& getDeviceManager() const noexcept { return pluginHolder->deviceManager; }\r
\r
/** Deletes and re-creates the plugin, resetting it to its default state. */\r
optionsButton.setBounds (8, 6, 60, getTitleBarHeight() - 8);\r
}\r
\r
- virtual StandalonePluginHolder* getPluginHolder() { return pluginHolder; }\r
+ virtual StandalonePluginHolder* getPluginHolder() { return pluginHolder.get(); }\r
\r
- ScopedPointer<StandalonePluginHolder> pluginHolder;\r
+ std::unique_ptr<StandalonePluginHolder> pluginHolder;\r
\r
private:\r
//==============================================================================\r
editor->addComponentListener (this);\r
componentMovedOrResized (*editor, false, true);\r
\r
- addAndMakeVisible (editor);\r
+ addAndMakeVisible (editor.get());\r
}\r
\r
addChildComponent (notification);\r
if (editor != nullptr)\r
{\r
editor->removeComponentListener (this);\r
- owner.pluginHolder->processor->editorBeingDeleted (editor);\r
+ owner.pluginHolder->processor->editorBeingDeleted (editor.get());\r
editor = nullptr;\r
}\r
}\r
//==============================================================================\r
StandaloneFilterWindow& owner;\r
NotificationArea notification;\r
- ScopedPointer<AudioProcessorEditor> editor;\r
+ std::unique_ptr<AudioProcessorEditor> editor;\r
bool shouldShowNotification = false;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)\r
{\r
virtual ~VSTCallbackHandler() {}\r
\r
+ /** This is called by the VST plug-in wrapper when it receives unhandled\r
+ plug-in "can do" calls from the host.\r
+ */\r
+ virtual pointer_sized_int handleVstPluginCanDo (int32 index,\r
+ pointer_sized_int value,\r
+ void* ptr,\r
+ float opt)\r
+ {\r
+ ignoreUnused (index, value, ptr, opt);\r
+ return 0;\r
+ }\r
+\r
/** This is called by the VST plug-in wrapper when it receives unhandled\r
vendor specific calls from the host.\r
*/\r
if (auto* ed = processor->createEditorIfNeeded())\r
{\r
vstEffect.flags |= vstEffectFlagHasEditor;\r
- editorComp = new EditorCompWrapper (*this, *ed);\r
+ editorComp.reset (new EditorCompWrapper (*this, *ed));\r
\r
#if ! (JUCE_MAC || JUCE_IOS)\r
ed->setScaleFactor (editorScaleFactor);\r
\r
~EditorCompWrapper()\r
{\r
- deleteAllChildren(); // note that we can't use a ScopedPointer because the editor may\r
+ deleteAllChildren(); // note that we can't use a std::unique_ptr because the editor may\r
// have been transferred to another parent which takes over ownership.\r
}\r
\r
VstEffectInterface vstEffect;\r
juce::MemoryBlock chunkMemory;\r
juce::uint32 chunkMemoryTime = 0;\r
- ScopedPointer<EditorCompWrapper> editorComp;\r
+ std::unique_ptr<EditorCompWrapper> editorComp;\r
VstEditorBounds editorBounds;\r
MidiBuffer midiEvents;\r
VSTMidiEventList outgoingEvents;\r
if (matches ("hasCockosExtensions"))\r
return (int32) 0xbeef0000;\r
\r
+ if (auto callbackHandler = dynamic_cast<VSTCallbackHandler*> (processor))\r
+ return callbackHandler->handleVstPluginCanDo (args.index, args.value, args.ptr, args.opt);\r
+\r
return 0;\r
}\r
\r
\r
virtual ~JuceAudioProcessor() {}\r
\r
- AudioProcessor* get() const noexcept { return audioProcessor; }\r
+ AudioProcessor* get() const noexcept { return audioProcessor.get(); }\r
\r
JUCE_DECLARE_VST3_COM_QUERY_METHODS\r
JUCE_DECLARE_VST3_COM_REF_METHODS\r
\r
//==============================================================================\r
- #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
- inline Vst::ParamID getVSTParamIDForIndex (int paramIndex) const noexcept { return static_cast<Vst::ParamID> (paramIndex); }\r
- #else\r
inline Vst::ParamID getVSTParamIDForIndex (int paramIndex) const noexcept\r
{\r
- return isUsingManagedParameters() ? vstParamIDs.getReference (paramIndex)\r
- : static_cast<Vst::ParamID> (paramIndex);\r
+ #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
+ return static_cast<Vst::ParamID> (paramIndex);\r
+ #else\r
+ return vstParamIDs.getReference (paramIndex);\r
+ #endif\r
}\r
- #endif\r
\r
AudioProcessorParameter* getParamForVSTParamID (Vst::ParamID paramID) const noexcept\r
{\r
if (bypassParameter == nullptr)\r
{\r
vst3WrapperProvidedBypassParam = true;\r
- bypassParameter = ownedBypassParameter = new AudioParameterBool ("byps", "Bypass", false, {}, {}, {});\r
+ ownedBypassParameter.reset (new AudioParameterBool ("byps", "Bypass", false, {}, {}, {}));\r
+ bypassParameter = ownedBypassParameter.get();\r
}\r
\r
// if the bypass parameter is not part of the exported parameters that the plug-in supports\r
Vst::ParamID generateVSTParamIDForParam (AudioProcessorParameter* param)\r
{\r
auto juceParamID = LegacyAudioParameter::getParamID (param, false);\r
+\r
+ #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
+ return static_cast<Vst::ParamID> (juceParamID.getIntValue());\r
+ #else\r
auto paramHash = static_cast<Vst::ParamID> (juceParamID.hashCode());\r
\r
#if JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS\r
paramHash &= ~(1 << (sizeof (Vst::ParamID) * 8 - 1));\r
#endif\r
\r
- return isUsingManagedParameters() ? paramHash\r
- : static_cast<Vst::ParamID> (juceParamID.getIntValue());\r
+ return paramHash;\r
+ #endif\r
}\r
\r
//==============================================================================\r
Atomic<int> refCount;\r
- ScopedPointer<AudioProcessor> audioProcessor;\r
+ std::unique_ptr<AudioProcessor> audioProcessor;\r
ScopedJuceInitialiser_GUI libraryInitialiser;\r
\r
//==============================================================================\r
LegacyAudioParametersWrapper juceParameters;\r
HashMap<int32, AudioProcessorParameter*> paramMap;\r
- ScopedPointer<AudioProcessorParameter> ownedBypassParameter;\r
+ std::unique_ptr<AudioProcessorParameter> ownedBypassParameter;\r
\r
JuceAudioProcessor() = delete;\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceAudioProcessor)\r
\r
void toString (Vst::ParamValue value, Vst::String128 result) const override\r
{\r
- toString128 (result, param.getText ((float) value, 128));\r
+ if (LegacyAudioParameter::isLegacy (¶m))\r
+ // remain backward-compatible with old JUCE code\r
+ toString128 (result, param.getCurrentValueAsText());\r
+ else\r
+ toString128 (result, param.getText ((float) value, 128));\r
}\r
\r
bool fromString (const Vst::TChar* text, Vst::ParamValue& outValueNormalized) const override\r
\r
if (parameters.getParameterCount() <= 0)\r
{\r
- #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
+ #if JUCE_FORCE_USE_LEGACY_PARAM_IDS\r
const bool forceLegacyParamIDs = true;\r
#else\r
const bool forceLegacyParamIDs = false;\r
: Vst::EditorView (&ec, nullptr),\r
owner (&ec), pluginInstance (p)\r
{\r
- component = new ContentWrapperComponent (*this, p);\r
+ component.reset (new ContentWrapperComponent (*this, p));\r
}\r
\r
tresult PLUGIN_API queryInterface (const TUID targetIID, void** obj) override\r
return kResultFalse;\r
\r
if (component == nullptr)\r
- component = new ContentWrapperComponent (*this, pluginInstance);\r
+ component.reset (new ContentWrapperComponent (*this, pluginInstance));\r
\r
#if JUCE_WINDOWS\r
component->addToDesktop (0, parent);\r
component->setVisible (true);\r
#else\r
isNSView = (strcmp (type, kPlatformTypeNSView) == 0);\r
- macHostWindow = juce::attachComponentToWindowRefVST (component, parent, isNSView);\r
+ macHostWindow = juce::attachComponentToWindowRefVST (component.get(), parent, isNSView);\r
#endif\r
\r
component->resizeHostWindow();\r
#else\r
if (macHostWindow != nullptr)\r
{\r
- juce::detachComponentFromWindowRefVST (component, macHostWindow, isNSView);\r
+ juce::detachComponentFromWindowRefVST (component.get(), macHostWindow, isNSView);\r
macHostWindow = nullptr;\r
}\r
#endif\r
if (auto* editor = component->pluginEditor.get())\r
{\r
// checkSizeConstraint\r
- auto juceRect = editor->getLocalArea (component, Rectangle<int>::leftTopRightBottom (rectToCheck->left, rectToCheck->top,\r
- rectToCheck->right, rectToCheck->bottom));\r
+ auto juceRect = editor->getLocalArea (component.get(), Rectangle<int>::leftTopRightBottom (rectToCheck->left, rectToCheck->top,\r
+ rectToCheck->right, rectToCheck->bottom));\r
if (auto* constrainer = editor->getConstrainer())\r
{\r
Rectangle<int> limits (0, 0, constrainer->getMaximumWidth(), constrainer->getMaximumHeight());\r
\r
if (pluginEditor != nullptr)\r
{\r
- addAndMakeVisible (pluginEditor);\r
+ addAndMakeVisible (pluginEditor.get());\r
\r
pluginEditor->setTopLeftPosition (0, 0);\r
lastBounds = getSizeToContainChild();\r
if (pluginEditor != nullptr)\r
{\r
PopupMenu::dismissAllActiveMenus();\r
- pluginEditor->processor.editorBeingDeleted (pluginEditor);\r
+ pluginEditor->processor.editorBeingDeleted (pluginEditor.get());\r
}\r
}\r
\r
juce::Rectangle<int> getSizeToContainChild()\r
{\r
if (pluginEditor != nullptr)\r
- return getLocalArea (pluginEditor, pluginEditor->getLocalBounds());\r
+ return getLocalArea (pluginEditor.get(), pluginEditor->getLocalBounds());\r
\r
return {};\r
}\r
}\r
}\r
\r
- ScopedPointer<AudioProcessorEditor> pluginEditor;\r
+ std::unique_ptr<AudioProcessorEditor> pluginEditor;\r
\r
private:\r
JuceVST3Editor& owner;\r
ComSmartPtr<JuceVST3EditController> owner;\r
AudioProcessor& pluginInstance;\r
\r
- ScopedPointer<ContentWrapperComponent> component;\r
+ std::unique_ptr<ContentWrapperComponent> component;\r
friend struct ContentWrapperComponent;\r
\r
#if JUCE_MAC\r
\r
ID: juce_audio_plugin_client\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE audio plugin wrapper classes\r
description: Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins.\r
website: http://www.juce.com/juce\r
DAW projects with automation data written by an AudioUnit, VST3 or\r
AAX plug-in built with JUCE version 5.1.1 or earlier may load\r
incorrectly when opened by an AudioUnit, VST3 or AAX plug-in built\r
- with JUCE version 5.3.0 and later.\r
+ with JUCE version 5.2.0 and later.\r
*/\r
#ifndef JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE\r
#define JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE 0\r
startTimer (1000 / 30);\r
}\r
\r
+ static bool componentContainsAudioProcessorEditor (Component* comp) noexcept\r
+ {\r
+ if (dynamic_cast<AudioProcessorEditor*> (comp) != nullptr)\r
+ return true;\r
+\r
+ for (auto* child : comp->getChildren())\r
+ if (componentContainsAudioProcessorEditor (child))\r
+ return true;\r
+\r
+ return false;\r
+ }\r
+\r
void timerCallback() override\r
{\r
// Workaround for windows not getting mouse-moves...\r
if (screenPos != lastScreenPos)\r
{\r
lastScreenPos = screenPos;\r
- auto mods = ModifierKeys::getCurrentModifiers();\r
+ auto mods = ModifierKeys::currentModifiers;\r
\r
if (! mods.isAnyMouseButtonDown())\r
{\r
if (auto* comp = Desktop::getInstance().findComponentAt (screenPos.roundToInt()))\r
{\r
- safeOldComponent = comp;\r
-\r
- if (auto* peer = comp->getPeer())\r
+ if (componentContainsAudioProcessorEditor (comp->getTopLevelComponent()))\r
{\r
- if (! peer->isFocused())\r
+ safeOldComponent = comp;\r
+\r
+ if (auto* peer = comp->getPeer())\r
{\r
- peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, peer->globalToLocal (screenPos), mods,\r
- MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis());\r
+ if (! peer->isFocused())\r
+ {\r
+ peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, peer->globalToLocal (screenPos), mods,\r
+ MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis());\r
+ }\r
}\r
+\r
+ return;\r
}\r
}\r
- else\r
+\r
+ if (safeOldComponent != nullptr)\r
{\r
- if (safeOldComponent != nullptr)\r
+ if (auto* peer = safeOldComponent->getPeer())\r
{\r
- if (auto* peer = safeOldComponent->getPeer())\r
- {\r
- peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, mods,\r
- MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis());\r
- }\r
+ peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, mods,\r
+ MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, Time::currentTimeMillis());\r
}\r
-\r
- safeOldComponent = nullptr;\r
}\r
+\r
+ safeOldComponent = nullptr;\r
}\r
}\r
}\r
//==============================================================================\r
AudioPluginInstance* instance;\r
String error;\r
- ScopedPointer<AudioPluginFormat::InstantiationCompletionCallback> compCallback;\r
- ScopedPointer<CallbackInvoker> owner;\r
+ std::unique_ptr<AudioPluginFormat::InstantiationCompletionCallback> compCallback;\r
+ std::unique_ptr<CallbackInvoker> owner;\r
};\r
\r
//==============================================================================\r
WaitableEvent waitForCreation;\r
AudioPluginInstance* instance = nullptr;\r
\r
- ScopedPointer<EventSignaler> eventSignaler (new EventSignaler (waitForCreation, instance, errorMessage));\r
+ std::unique_ptr<EventSignaler> eventSignaler (new EventSignaler (waitForCreation, instance, errorMessage));\r
\r
if (! MessageManager::getInstance()->isThisTheMessageThread())\r
createPluginInstanceAsync (desc, initialSampleRate, initialBufferSize, eventSignaler.release());\r
void messageCallback() override { callback->completionCallback (nullptr, error); }\r
\r
String error;\r
- ScopedPointer<AudioPluginFormat::InstantiationCompletionCallback> callback;\r
+ std::unique_ptr<AudioPluginFormat::InstantiationCompletionCallback> callback;\r
};\r
\r
struct ErrorLambdaOnMessageThread : public CallbackMessage\r
auSupportsBypass = (AudioUnitGetPropertyInfo (audioUnit, kAudioUnitProperty_BypassEffect,\r
kAudioUnitScope_Global, 0, &propertySize, &writable) == noErr\r
&& propertySize >= sizeof (UInt32) && writable);\r
- bypassParam = new AUBypassParameter (*this);\r
+ bypassParam.reset (new AUBypassParameter (*this));\r
}\r
\r
void updateLatency()\r
MidiDataConcatenator midiConcatenator;\r
CriticalSection midiInLock;\r
MidiBuffer incomingMidi;\r
- ScopedPointer<AUBypassParameter> bypassParam;\r
+ std::unique_ptr<AUBypassParameter> bypassParam;\r
bool lastProcessBlockCallWasBypass = false, auSupportsBypass = false;\r
\r
void createPluginCallbacks()\r
audioComponent (nullptr),\r
viewComponent (nullptr)\r
{\r
- addAndMakeVisible (innerWrapper = new InnerWrapperComponent (*this));\r
+ innerWrapper.reset (new InnerWrapperComponent (*this));\r
+ addAndMakeVisible (innerWrapper.get());\r
\r
setOpaque (true);\r
setVisible (true);\r
};\r
\r
friend class InnerWrapperComponent;\r
- ScopedPointer<InnerWrapperComponent> innerWrapper;\r
+ std::unique_ptr<InnerWrapperComponent> innerWrapper;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioUnitPluginWindowCarbon)\r
};\r
//==============================================================================\r
AudioProcessorEditor* AudioUnitPluginInstance::createEditor()\r
{\r
- ScopedPointer<AudioProcessorEditor> w (new AudioUnitPluginWindowCocoa (*this, false));\r
+ std::unique_ptr<AudioProcessorEditor> w (new AudioUnitPluginWindowCocoa (*this, false));\r
\r
if (! static_cast<AudioUnitPluginWindowCocoa*> (w.get())->isValid())\r
w.reset();\r
#if JUCE_SUPPORT_CARBON\r
if (w == nullptr)\r
{\r
- w = new AudioUnitPluginWindowCarbon (*this);\r
+ w.reset (new AudioUnitPluginWindowCarbon (*this));\r
\r
if (! static_cast<AudioUnitPluginWindowCarbon*> (w.get())->isValid())\r
- w = nullptr;\r
+ w.reset();\r
}\r
#endif\r
\r
return w.release();\r
}\r
\r
-\r
-//==============================================================================\r
//==============================================================================\r
AudioUnitPluginFormat::AudioUnitPluginFormat()\r
{\r
\r
try\r
{\r
- ScopedPointer<AudioPluginInstance> createdInstance (createInstanceFromDescription (desc, 44100.0, 512));\r
+ std::unique_ptr<AudioPluginInstance> createdInstance (createInstanceFromDescription (desc, 44100.0, 512));\r
\r
if (AudioUnitPluginInstance* auInstance = dynamic_cast<AudioUnitPluginInstance*> (createdInstance.get()))\r
results.add (new PluginDescription (auInstance->getPluginDescription()));\r
{\r
if (err == noErr)\r
{\r
- ScopedPointer<AudioUnitPluginInstance> instance (new AudioUnitPluginInstance (audioUnit));\r
+ std::unique_ptr<AudioUnitPluginInstance> instance (new AudioUnitPluginInstance (audioUnit));\r
\r
if (instance->initialise (sampleRate, framesPerBuffer))\r
originalCallback (passUserData, instance.release(), StringRef());\r
{\r
public:\r
LADSPAModuleHandle (const File& f)\r
- : file (f), moduleMain (nullptr)\r
+ : file (f)\r
{\r
getActiveModules().add (this);\r
}\r
close();\r
}\r
\r
- typedef ReferenceCountedObjectPtr<LADSPAModuleHandle> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<LADSPAModuleHandle>;\r
\r
static Array<LADSPAModuleHandle*>& getActiveModules()\r
{\r
\r
static LADSPAModuleHandle* findOrCreateModule (const File& file)\r
{\r
- for (int i = getActiveModules().size(); --i >= 0;)\r
+ for (auto i = getActiveModules().size(); --i >= 0;)\r
{\r
- LADSPAModuleHandle* const module = getActiveModules().getUnchecked(i);\r
+ auto* module = getActiveModules().getUnchecked(i);\r
\r
if (module->file == file)\r
return module;\r
\r
JUCE_LADSPA_LOG ("Loading LADSPA module: " + file.getFullPathName());\r
\r
- ScopedPointer<LADSPAModuleHandle> m (new LADSPAModuleHandle (file));\r
+ std::unique_ptr<LADSPAModuleHandle> m (new LADSPAModuleHandle (file));\r
\r
if (! m->open())\r
m = nullptr;\r
}\r
\r
File file;\r
- LADSPA_Descriptor_Function moduleMain;\r
+ LADSPA_Descriptor_Function moduleMain = nullptr;\r
\r
private:\r
DynamicLibrary module;\r
{\r
module.open (file.getFullPathName());\r
moduleMain = (LADSPA_Descriptor_Function) module.getFunction ("ladspa_descriptor");\r
- return moduleMain != nullptr;\r
+\r
+ return (moduleMain != nullptr);\r
}\r
\r
void close()\r
class LADSPAPluginInstance : public AudioPluginInstance\r
{\r
public:\r
- struct LADSPAParameter final : public Parameter\r
- {\r
- struct ParameterValue\r
- {\r
- inline ParameterValue() noexcept : scaled (0), unscaled (0) {}\r
- inline ParameterValue (float s, float u) noexcept : scaled (s), unscaled (u) {}\r
-\r
- float scaled, unscaled;\r
- };\r
-\r
- LADSPAParameter (LADSPAPluginInstance& parent,\r
- int parameterID,\r
- const String& parameterName,\r
- bool parameterIsAutomatable)\r
- : pluginInstance (parent),\r
- paramID (parameterID),\r
- name (parameterName),\r
- automatable (parameterIsAutomatable)\r
- {\r
- reset();\r
- }\r
-\r
- virtual float getValue() const override\r
- {\r
- if (pluginInstance.plugin != nullptr)\r
- {\r
- const ScopedLock sl (pluginInstance.lock);\r
-\r
- return paramValue.unscaled;\r
- }\r
-\r
- return 0.0f;\r
- }\r
-\r
- String getCurrentValueAsText() const override\r
- {\r
- if (auto* interface = pluginInstance.plugin)\r
- {\r
- const LADSPA_PortRangeHint& hint = interface->PortRangeHints[paramID];\r
-\r
- if (LADSPA_IS_HINT_INTEGER (hint.HintDescriptor))\r
- return String ((int) paramValue.scaled);\r
-\r
- return String (paramValue.scaled, 4);\r
- }\r
-\r
- return {};\r
- }\r
-\r
- virtual void setValue (float newValue) override\r
- {\r
- if (auto* interface = pluginInstance.plugin)\r
- {\r
- const ScopedLock sl (pluginInstance.lock);\r
-\r
- if (paramValue.unscaled != newValue)\r
- paramValue = ParameterValue (getNewParamScaled (interface->PortRangeHints [paramID], newValue), newValue);\r
- }\r
- }\r
-\r
- float getDefaultValue() const override\r
- {\r
- return defaultValue;\r
- }\r
-\r
- ParameterValue getDefaultParamValue() const\r
- {\r
- if (auto* interface = pluginInstance.plugin)\r
- {\r
- const LADSPA_PortRangeHint& hint = interface->PortRangeHints[paramID];\r
- const LADSPA_PortRangeHintDescriptor& desc = hint.HintDescriptor;\r
-\r
- if (LADSPA_IS_HINT_HAS_DEFAULT (desc))\r
- {\r
- if (LADSPA_IS_HINT_DEFAULT_0 (desc)) return ParameterValue();\r
- if (LADSPA_IS_HINT_DEFAULT_1 (desc)) return ParameterValue (1.0f, 1.0f);\r
- if (LADSPA_IS_HINT_DEFAULT_100 (desc)) return ParameterValue (100.0f, 0.5f);\r
- if (LADSPA_IS_HINT_DEFAULT_440 (desc)) return ParameterValue (440.0f, 0.5f);\r
-\r
- const float scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate() : 1.0f;\r
- const float lower = hint.LowerBound * scale;\r
- const float upper = hint.UpperBound * scale;\r
-\r
- if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_DEFAULT_MINIMUM (desc)) return ParameterValue (lower, 0.0f);\r
- if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc) && LADSPA_IS_HINT_DEFAULT_MAXIMUM (desc)) return ParameterValue (upper, 1.0f);\r
-\r
- if (LADSPA_IS_HINT_BOUNDED_BELOW (desc))\r
- {\r
- const bool useLog = LADSPA_IS_HINT_LOGARITHMIC (desc);\r
-\r
- if (LADSPA_IS_HINT_DEFAULT_LOW (desc)) return ParameterValue (scaledValue (lower, upper, 0.25f, useLog), 0.25f);\r
- if (LADSPA_IS_HINT_DEFAULT_MIDDLE (desc)) return ParameterValue (scaledValue (lower, upper, 0.50f, useLog), 0.50f);\r
- if (LADSPA_IS_HINT_DEFAULT_HIGH (desc)) return ParameterValue (scaledValue (lower, upper, 0.75f, useLog), 0.75f);\r
- }\r
- }\r
- }\r
-\r
- return ParameterValue();\r
- }\r
-\r
- void reset()\r
- {\r
- paramValue = getDefaultParamValue();\r
- defaultValue = paramValue.unscaled;\r
- }\r
-\r
- String getName (int /*maximumStringLength*/) const override\r
- {\r
- return name;\r
- }\r
-\r
- String getLabel() const override\r
- {\r
- return {};\r
- }\r
-\r
- bool isAutomatable() const override\r
- {\r
- return automatable;\r
- }\r
-\r
- static float scaledValue (float low, float high, float alpha, bool useLog) noexcept\r
- {\r
- if (useLog && low > 0 && high > 0)\r
- return expf (logf (low) * (1.0f - alpha) + logf (high) * alpha);\r
-\r
- return low + (high - low) * alpha;\r
- }\r
-\r
- static float toIntIfNecessary (const LADSPA_PortRangeHintDescriptor& desc, float value)\r
- {\r
- return LADSPA_IS_HINT_INTEGER (desc) ? ((float) (int) value) : value;\r
- }\r
-\r
- float getNewParamScaled (const LADSPA_PortRangeHint& hint, float newValue) const\r
- {\r
- const LADSPA_PortRangeHintDescriptor& desc = hint.HintDescriptor;\r
-\r
- if (LADSPA_IS_HINT_TOGGLED (desc))\r
- return (newValue < 0.5f) ? 0.0f : 1.0f;\r
-\r
- const float scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate() : 1.0f;\r
- const float lower = hint.LowerBound * scale;\r
- const float upper = hint.UpperBound * scale;\r
-\r
- if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_BOUNDED_ABOVE (desc))\r
- return toIntIfNecessary (desc, scaledValue (lower, upper, newValue, LADSPA_IS_HINT_LOGARITHMIC (desc)));\r
-\r
- if (LADSPA_IS_HINT_BOUNDED_BELOW (desc)) return toIntIfNecessary (desc, newValue);\r
- if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc)) return toIntIfNecessary (desc, newValue * upper);\r
-\r
- return 0.0f;\r
- }\r
-\r
- LADSPAPluginInstance& pluginInstance;\r
- const int paramID;\r
- const String name;\r
- const bool automatable;\r
-\r
- ParameterValue paramValue;\r
- float defaultValue = 0;\r
- };\r
-\r
LADSPAPluginInstance (const LADSPAModuleHandle::Ptr& m)\r
- : module (m), plugin (nullptr), handle (nullptr),\r
- initialised (false), tempBuffer (1, 1)\r
+ : module (m)\r
{\r
++insideLADSPACallback;\r
\r
\r
if (module->moduleMain != nullptr)\r
{\r
- plugin = module->moduleMain (shellLADSPAUIDToCreate);\r
+ plugin = module->moduleMain ((size_t) shellLADSPAUIDToCreate);\r
\r
if (plugin == nullptr)\r
{\r
return;\r
}\r
\r
- const double sampleRate = getSampleRate() > 0 ? getSampleRate() : 44100.0;\r
+ const auto sampleRate = getSampleRate() > 0 ? getSampleRate()\r
+ : 44100.0;\r
\r
handle = plugin->instantiate (plugin, (uint32) sampleRate);\r
\r
\r
for (unsigned int i = 0; i < plugin->PortCount; ++i)\r
{\r
- const LADSPA_PortDescriptor portDesc = plugin->PortDescriptors[i];\r
+ const auto portDesc = plugin->PortDescriptors[i];\r
\r
if ((portDesc & LADSPA_PORT_CONTROL) != 0)\r
- addParameter (new LADSPAParameter (*this,\r
- i,\r
- String (plugin->PortNames[i]).trim(),\r
- (portDesc & LADSPA_PORT_INPUT) != 0));\r
+ addParameter (new LADSPAParameter (*this, (int) i, String (plugin->PortNames[i]).trim(), (portDesc & LADSPA_PORT_INPUT) != 0));\r
\r
if ((portDesc & LADSPA_PORT_AUDIO) != 0)\r
{\r
- if ((portDesc & LADSPA_PORT_INPUT) != 0) inputs.add (i);\r
- if ((portDesc & LADSPA_PORT_OUTPUT) != 0) outputs.add (i);\r
+ if ((portDesc & LADSPA_PORT_INPUT) != 0) inputs.add ((int) i);\r
+ if ((portDesc & LADSPA_PORT_OUTPUT) != 0) outputs.add ((int) i);\r
}\r
}\r
\r
for (auto* param : getParameters())\r
if (auto* ladspaParam = dynamic_cast<LADSPAParameter*> (param))\r
- plugin->connect_port (handle, ladspaParam->paramID, &(ladspaParam->paramValue.scaled));\r
+ plugin->connect_port (handle, (size_t) ladspaParam->paramID, &(ladspaParam->paramValue.scaled));\r
\r
setPlayConfigDetails (inputs.size(), outputs.size(), initialSampleRate, initialBlockSize);\r
\r
// dodgy hack to force some plugins to initialise the sample rate..\r
if (auto* firstParam = getParameters()[0])\r
{\r
- const float old = firstParam->getValue();\r
+ const auto old = firstParam->getValue();\r
firstParam->setValue ((old < 0.5f) ? 1.0f : 0.0f);\r
firstParam->setValue (old);\r
}\r
tempBuffer.setSize (1, 1);\r
}\r
\r
- void processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages)\r
+ void processBlock (AudioBuffer<float>& buffer, MidiBuffer&)\r
{\r
auto numSamples = buffer.getNumSamples();\r
\r
if (initialised && plugin != nullptr && handle != nullptr)\r
{\r
for (int i = 0; i < inputs.size(); ++i)\r
- plugin->connect_port (handle, inputs[i],\r
+ plugin->connect_port (handle, (size_t) inputs[i],\r
i < buffer.getNumChannels() ? buffer.getWritePointer (i) : nullptr);\r
\r
if (plugin->run != nullptr)\r
{\r
for (int i = 0; i < outputs.size(); ++i)\r
- plugin->connect_port (handle, outputs.getUnchecked(i),\r
+ plugin->connect_port (handle, (size_t) outputs.getUnchecked(i),\r
i < buffer.getNumChannels() ? buffer.getWritePointer (i) : nullptr);\r
\r
- plugin->run (handle, numSamples);\r
+ plugin->run (handle, (size_t) numSamples);\r
return;\r
}\r
\r
tempBuffer.clear();\r
\r
for (int i = 0; i < outputs.size(); ++i)\r
- plugin->connect_port (handle, outputs.getUnchecked(i), tempBuffer.getWritePointer (i));\r
+ plugin->connect_port (handle, (size_t) outputs.getUnchecked(i), tempBuffer.getWritePointer (i));\r
\r
- plugin->run_adding (handle, numSamples);\r
+ plugin->run_adding (handle, (size_t) numSamples);\r
\r
for (int i = 0; i < outputs.size(); ++i)\r
if (i < buffer.getNumChannels())\r
jassertfalse; // no callback to use?\r
}\r
\r
- for (int i = getTotalNumInputChannels(), e = getTotalNumOutputChannels(); i < e; ++i)\r
+ for (auto i = getTotalNumInputChannels(), e = getTotalNumOutputChannels(); i < e; ++i)\r
buffer.clear (i, 0, numSamples);\r
}\r
\r
}\r
\r
//==============================================================================\r
- int getNumPrograms() { return 0; }\r
- int getCurrentProgram() { return 0; }\r
+ int getNumPrograms() { return 0; }\r
+ int getCurrentProgram() { return 0; }\r
\r
void setCurrentProgram (int)\r
{\r
ladspaParam->reset();\r
}\r
\r
- const String getProgramName (int index)\r
- {\r
- // XXX\r
- return {};\r
- }\r
-\r
- void changeProgramName (int index, const String& newName)\r
- {\r
- // XXX\r
- }\r
+ const String getProgramName (int) { return {}; }\r
+ void changeProgramName (int, const String&) {}\r
\r
//==============================================================================\r
void getStateInformation (MemoryBlock& destData)\r
{\r
auto numParameters = getParameters().size();\r
- destData.setSize (sizeof (float) * numParameters);\r
+ destData.setSize (sizeof (float) * (size_t) numParameters);\r
destData.fillWith (0);\r
\r
- float* const p = (float*) ((char*) destData.getData());\r
+ auto* p = (float*) ((char*) destData.getData());\r
\r
for (int i = 0; i < numParameters; ++i)\r
if (auto* param = getParameters()[i])\r
p[i] = param->getValue();\r
}\r
\r
- void getCurrentProgramStateInformation (MemoryBlock& destData)\r
- {\r
- getStateInformation (destData);\r
- }\r
+ void getCurrentProgramStateInformation (MemoryBlock& destData) { getStateInformation (destData); }\r
+ void setCurrentProgramStateInformation (const void* data, int sizeInBytes) { setStateInformation (data, sizeInBytes); }\r
\r
void setStateInformation (const void* data, int sizeInBytes)\r
{\r
- const float* p = static_cast<const float*> (data);\r
+ ignoreUnused (sizeInBytes);\r
+\r
+ auto* p = static_cast<const float*> (data);\r
\r
for (int i = 0; i < getParameters().size(); ++i)\r
if (auto* param = getParameters()[i])\r
param->setValue (p[i]);\r
}\r
\r
- void setCurrentProgramStateInformation (const void* data, int sizeInBytes)\r
- {\r
- setStateInformation (data, sizeInBytes);\r
- }\r
+ bool hasEditor() const { return false; }\r
+ AudioProcessorEditor* createEditor() { return nullptr; }\r
\r
- bool hasEditor() const\r
- {\r
- return false;\r
- }\r
+ bool isValid() const { return handle != nullptr; }\r
\r
- AudioProcessorEditor* createEditor()\r
- {\r
- return nullptr;\r
- }\r
+ //==============================================================================\r
+ LADSPAModuleHandle::Ptr module;\r
+ const LADSPA_Descriptor* plugin = nullptr;\r
\r
- bool isValid() const\r
+private:\r
+ //==============================================================================\r
+ struct LADSPAParameter final : public Parameter\r
{\r
- return handle != nullptr;\r
- }\r
+ struct ParameterValue\r
+ {\r
+ inline ParameterValue() noexcept {}\r
+ inline ParameterValue (float s, float u) noexcept : scaled (s), unscaled (u) {}\r
\r
- LADSPAModuleHandle::Ptr module;\r
- const LADSPA_Descriptor* plugin;\r
+ float scaled = 0, unscaled = 0;\r
+ };\r
\r
-private:\r
- LADSPA_Handle handle;\r
+ LADSPAParameter (LADSPAPluginInstance& parent, int parameterID,\r
+ const String& parameterName, bool parameterIsAutomatable)\r
+ : pluginInstance (parent),\r
+ paramID (parameterID),\r
+ name (parameterName),\r
+ automatable (parameterIsAutomatable)\r
+ {\r
+ reset();\r
+ }\r
+\r
+ virtual float getValue() const override\r
+ {\r
+ if (pluginInstance.plugin != nullptr)\r
+ {\r
+ const ScopedLock sl (pluginInstance.lock);\r
+\r
+ return paramValue.unscaled;\r
+ }\r
+\r
+ return 0.0f;\r
+ }\r
+\r
+ String getCurrentValueAsText() const override\r
+ {\r
+ if (auto* interface = pluginInstance.plugin)\r
+ {\r
+ const auto& hint = interface->PortRangeHints[paramID];\r
+\r
+ if (LADSPA_IS_HINT_INTEGER (hint.HintDescriptor))\r
+ return String ((int) paramValue.scaled);\r
+\r
+ return String (paramValue.scaled, 4);\r
+ }\r
+\r
+ return {};\r
+ }\r
+\r
+ virtual void setValue (float newValue) override\r
+ {\r
+ if (auto* interface = pluginInstance.plugin)\r
+ {\r
+ const ScopedLock sl (pluginInstance.lock);\r
+\r
+ if (paramValue.unscaled != newValue)\r
+ paramValue = ParameterValue (getNewParamScaled (interface->PortRangeHints [paramID], newValue), newValue);\r
+ }\r
+ }\r
+\r
+ float getDefaultValue() const override\r
+ {\r
+ return defaultValue;\r
+ }\r
+\r
+ ParameterValue getDefaultParamValue() const\r
+ {\r
+ if (auto* interface = pluginInstance.plugin)\r
+ {\r
+ const auto& hint = interface->PortRangeHints[paramID];\r
+ const auto& desc = hint.HintDescriptor;\r
+\r
+ if (LADSPA_IS_HINT_HAS_DEFAULT (desc))\r
+ {\r
+ if (LADSPA_IS_HINT_DEFAULT_0 (desc)) return {};\r
+ if (LADSPA_IS_HINT_DEFAULT_1 (desc)) return { 1.0f, 1.0f };\r
+ if (LADSPA_IS_HINT_DEFAULT_100 (desc)) return { 100.0f, 0.5f };\r
+ if (LADSPA_IS_HINT_DEFAULT_440 (desc)) return { 440.0f, 0.5f };\r
+\r
+ const auto scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate()\r
+ : 1.0f;\r
+ const auto lower = hint.LowerBound * scale;\r
+ const auto upper = hint.UpperBound * scale;\r
+\r
+ if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_DEFAULT_MINIMUM (desc)) return { lower, 0.0f };\r
+ if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc) && LADSPA_IS_HINT_DEFAULT_MAXIMUM (desc)) return { upper, 1.0f };\r
+\r
+ if (LADSPA_IS_HINT_BOUNDED_BELOW (desc))\r
+ {\r
+ auto useLog = LADSPA_IS_HINT_LOGARITHMIC (desc);\r
+\r
+ if (LADSPA_IS_HINT_DEFAULT_LOW (desc)) return { scaledValue (lower, upper, 0.25f, useLog), 0.25f };\r
+ if (LADSPA_IS_HINT_DEFAULT_MIDDLE (desc)) return { scaledValue (lower, upper, 0.50f, useLog), 0.50f };\r
+ if (LADSPA_IS_HINT_DEFAULT_HIGH (desc)) return { scaledValue (lower, upper, 0.75f, useLog), 0.75f };\r
+ }\r
+ }\r
+ }\r
+\r
+ return {};\r
+ }\r
+\r
+ void reset()\r
+ {\r
+ paramValue = getDefaultParamValue();\r
+ defaultValue = paramValue.unscaled;\r
+ }\r
+\r
+ String getName (int /*maximumStringLength*/) const override { return name; }\r
+ String getLabel() const override { return {}; }\r
+\r
+ bool isAutomatable() const override { return automatable; }\r
+\r
+ static float scaledValue (float low, float high, float alpha, bool useLog) noexcept\r
+ {\r
+ if (useLog && low > 0 && high > 0)\r
+ return expf (logf (low) * (1.0f - alpha) + logf (high) * alpha);\r
+\r
+ return low + (high - low) * alpha;\r
+ }\r
+\r
+ static float toIntIfNecessary (const LADSPA_PortRangeHintDescriptor& desc, float value)\r
+ {\r
+ return LADSPA_IS_HINT_INTEGER (desc) ? ((float) (int) value) : value;\r
+ }\r
+\r
+ float getNewParamScaled (const LADSPA_PortRangeHint& hint, float newValue) const\r
+ {\r
+ const auto& desc = hint.HintDescriptor;\r
+\r
+ if (LADSPA_IS_HINT_TOGGLED (desc))\r
+ return (newValue < 0.5f) ? 0.0f : 1.0f;\r
+\r
+ const auto scale = LADSPA_IS_HINT_SAMPLE_RATE (desc) ? (float) pluginInstance.getSampleRate()\r
+ : 1.0f;\r
+ const auto lower = hint.LowerBound * scale;\r
+ const auto upper = hint.UpperBound * scale;\r
+\r
+ if (LADSPA_IS_HINT_BOUNDED_BELOW (desc) && LADSPA_IS_HINT_BOUNDED_ABOVE (desc))\r
+ return toIntIfNecessary (desc, scaledValue (lower, upper, newValue, LADSPA_IS_HINT_LOGARITHMIC (desc)));\r
+\r
+ if (LADSPA_IS_HINT_BOUNDED_BELOW (desc)) return toIntIfNecessary (desc, newValue);\r
+ if (LADSPA_IS_HINT_BOUNDED_ABOVE (desc)) return toIntIfNecessary (desc, newValue * upper);\r
+\r
+ return 0.0f;\r
+ }\r
+\r
+ LADSPAPluginInstance& pluginInstance;\r
+ const int paramID;\r
+ const String name;\r
+ const bool automatable;\r
+\r
+ ParameterValue paramValue;\r
+ float defaultValue = 0.0f;\r
+ };\r
+\r
+ //==============================================================================\r
+ LADSPA_Handle handle = nullptr;\r
String name;\r
CriticalSection lock;\r
- bool initialised;\r
- AudioBuffer<float> tempBuffer;\r
+ bool initialised = false;\r
+ AudioBuffer<float> tempBuffer { 1, 1 };\r
Array<int> inputs, outputs;\r
\r
+ //==============================================================================\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LADSPAPluginInstance)\r
};\r
\r
\r
-//==============================================================================\r
//==============================================================================\r
LADSPAPluginFormat::LADSPAPluginFormat() {}\r
LADSPAPluginFormat::~LADSPAPluginFormat() {}\r
\r
-void LADSPAPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& results,\r
- const String& fileOrIdentifier)\r
+void LADSPAPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& results, const String& fileOrIdentifier)\r
{\r
if (! fileMightContainThisPluginType (fileOrIdentifier))\r
return;\r
desc.fileOrIdentifier = fileOrIdentifier;\r
desc.uid = 0;\r
\r
- ScopedPointer<LADSPAPluginInstance> instance (dynamic_cast<LADSPAPluginInstance*> (createInstanceFromDescription (desc, 44100.0, 512)));\r
+ std::unique_ptr<LADSPAPluginInstance> instance (dynamic_cast<LADSPAPluginInstance*> (createInstanceFromDescription (desc, 44100.0, 512)));\r
\r
if (instance == nullptr || ! instance->isValid())\r
return;\r
\r
instance->initialise (44100.0, 512);\r
-\r
instance->fillInPluginDescription (desc);\r
\r
if (instance->module->moduleMain != nullptr)\r
{\r
for (int uid = 0;; ++uid)\r
{\r
- if (const LADSPA_Descriptor* plugin = instance->module->moduleMain (uid))\r
+ if (auto* plugin = instance->module->moduleMain ((size_t) uid))\r
{\r
desc.uid = uid;\r
desc.name = plugin->Name != nullptr ? plugin->Name : "Unknown";\r
}\r
}\r
\r
-void LADSPAPluginFormat::createPluginInstance (const PluginDescription& desc,\r
- double sampleRate, int blockSize,\r
- void* userData,\r
- void (*callback) (void*, AudioPluginInstance*, const String&))\r
+void LADSPAPluginFormat::createPluginInstance (const PluginDescription& desc, double sampleRate, int blockSize,\r
+ void* userData, void (*callback) (void*, AudioPluginInstance*, const String&))\r
{\r
- ScopedPointer<LADSPAPluginInstance> result;\r
-\r
+ std::unique_ptr<LADSPAPluginInstance> result;\r
\r
if (fileMightContainThisPluginType (desc.fileOrIdentifier))\r
{\r
- File file (desc.fileOrIdentifier);\r
+ auto file = File (desc.fileOrIdentifier);\r
\r
- const File previousWorkingDirectory (File::getCurrentWorkingDirectory());\r
+ auto previousWorkingDirectory = File::getCurrentWorkingDirectory();\r
file.getParentDirectory().setAsCurrentWorkingDirectory();\r
\r
const LADSPAModuleHandle::Ptr module (LADSPAModuleHandle::findOrCreateModule (file));\r
{\r
shellLADSPAUIDToCreate = desc.uid;\r
\r
- result = new LADSPAPluginInstance (module);\r
+ result.reset (new LADSPAPluginInstance (module));\r
\r
if (result->plugin != nullptr && result->isValid())\r
result->initialise (sampleRate, blockSize);\r
\r
bool LADSPAPluginFormat::fileMightContainThisPluginType (const String& fileOrIdentifier)\r
{\r
- const File f (File::createFileWithoutCheckingPath (fileOrIdentifier));\r
+ auto f = File::createFileWithoutCheckingPath (fileOrIdentifier);\r
return f.existsAsFile() && f.hasFileExtension (".so");\r
}\r
\r
\r
while (iter.next())\r
{\r
- const File f (iter.getFile());\r
+ auto f = iter.getFile();\r
bool isPlugin = false;\r
\r
if (fileMightContainThisPluginType (f.getFullPathName()))\r
\r
FileSearchPath LADSPAPluginFormat::getDefaultLocationsToSearch()\r
{\r
- return FileSearchPath (SystemStats::getEnvironmentVariable ("LADSPA_PATH",\r
- "/usr/lib/ladspa;/usr/local/lib/ladspa;~/.ladspa")\r
- .replace (":", ";"));\r
+ return { SystemStats::getEnvironmentVariable ("LADSPA_PATH", "/usr/lib/ladspa;/usr/local/lib/ladspa;~/.ladspa").replace (":", ";") };\r
}\r
\r
} // namespace juce\r
{\r
public:\r
LegacyAudioParameter (AudioProcessor& audioProcessorToUse, int audioParameterIndex)\r
- : audioProcessor (audioProcessorToUse), idx (audioParameterIndex)\r
{\r
- jassert (idx < audioProcessor.getNumParameters());\r
+ processor = &audioProcessorToUse;\r
+\r
+ parameterIndex = audioParameterIndex;\r
+ jassert (parameterIndex < processor->getNumParameters());\r
}\r
\r
//==============================================================================\r
- float getValue() const override { return audioProcessor.getParameter (idx); }\r
- void setValue (float newValue) override { audioProcessor.setParameter (idx, newValue); }\r
- float getDefaultValue() const override { return audioProcessor.getParameterDefaultValue (idx); }\r
- String getName (int maxLen) const override { return audioProcessor.getParameterName (idx, maxLen); }\r
- String getLabel() const override { return audioProcessor.getParameterLabel (idx); }\r
- int getNumSteps() const override { return audioProcessor.getParameterNumSteps (idx); }\r
- bool isDiscrete() const override { return audioProcessor.isParameterDiscrete (idx); }\r
+ float getValue() const override { return processor->getParameter (parameterIndex); }\r
+ void setValue (float newValue) override { processor->setParameter (parameterIndex, newValue); }\r
+ float getDefaultValue() const override { return processor->getParameterDefaultValue (parameterIndex); }\r
+ String getName (int maxLen) const override { return processor->getParameterName (parameterIndex, maxLen); }\r
+ String getLabel() const override { return processor->getParameterLabel (parameterIndex); }\r
+ int getNumSteps() const override { return processor->getParameterNumSteps (parameterIndex); }\r
+ bool isDiscrete() const override { return processor->isParameterDiscrete (parameterIndex); }\r
bool isBoolean() const override { return false; }\r
- bool isOrientationInverted() const override { return audioProcessor.isParameterOrientationInverted (idx); }\r
- bool isAutomatable() const override { return audioProcessor.isParameterAutomatable (idx); }\r
- bool isMetaParameter() const override { return audioProcessor.isMetaParameter (idx); }\r
- Category getCategory() const override { return audioProcessor.getParameterCategory (idx); }\r
- String getCurrentValueAsText() const override { return audioProcessor.getParameterText (idx); }\r
- String getParamID() const { return audioProcessor.getParameterID (idx); }\r
+ bool isOrientationInverted() const override { return processor->isParameterOrientationInverted (parameterIndex); }\r
+ bool isAutomatable() const override { return processor->isParameterAutomatable (parameterIndex); }\r
+ bool isMetaParameter() const override { return processor->isMetaParameter (parameterIndex); }\r
+ Category getCategory() const override { return processor->getParameterCategory (parameterIndex); }\r
+ String getCurrentValueAsText() const override { return processor->getParameterText (parameterIndex); }\r
+ String getParamID() const { return processor->getParameterID (parameterIndex); }\r
\r
//==============================================================================\r
float getValueForText (const String&) const override\r
{\r
if (auto* legacy = dynamic_cast<LegacyAudioParameter*> (param))\r
{\r
- return legacy->idx;\r
+ return legacy->parameterIndex;\r
}\r
else\r
{\r
\r
return String (param->getParameterIndex());\r
}\r
-private:\r
- AudioProcessor& audioProcessor;\r
- int idx;\r
};\r
\r
//==============================================================================\r
template <typename FloatType>\r
struct VST3BufferExchange\r
{\r
- typedef Array<FloatType*> Bus;\r
- typedef Array<Bus> BusMap;\r
+ using Bus = Array<FloatType*>;\r
+ using BusMap = Array<Bus>;\r
\r
static inline void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, float** raw) { vstBuffers.channelBuffers32 = raw; }\r
static inline void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, double** raw) { vstBuffers.channelBuffers64 = raw; }\r
Atomic<int> refCount;\r
String appName;\r
\r
- typedef std::map<Vst::ParamID, int> ParamMapType;\r
+ using ParamMapType = std::map<Vst::ParamID, int>;\r
ParamMapType paramToIndexMap;\r
\r
int getIndexOfParamID (Vst::ParamID paramID)\r
if (foundNames.contains (name, true))\r
continue;\r
\r
- ScopedPointer<PClassInfo2> info2;\r
- ScopedPointer<PClassInfoW> infoW;\r
+ std::unique_ptr<PClassInfo2> info2;\r
+ std::unique_ptr<PClassInfoW> infoW;\r
\r
{\r
ComSmartPtr<IPluginFactory2> pf2;\r
}\r
\r
//==============================================================================\r
- typedef ReferenceCountedObjectPtr<VST3ModuleHandle> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<VST3ModuleHandle>;\r
\r
static VST3ModuleHandle::Ptr findOrCreateModule (const File& file, const PluginDescription& description)\r
{\r
String name;\r
\r
private:\r
- ScopedPointer<DLLHandle> dllHandle;\r
+ std::unique_ptr<DLLHandle> dllHandle;\r
\r
//==============================================================================\r
static Array<VST3ModuleHandle*>& getActiveModules()\r
};\r
\r
ChildComponent embeddedComponent;\r
- ScopedPointer<ComponentPeer> peer;\r
- typedef HWND HandleFormat;\r
+ std::unique_ptr<ComponentPeer> peer;\r
+ using HandleFormat = HWND;\r
#elif JUCE_MAC\r
AutoResizingNSViewComponentWithParent embeddedComponent;\r
- typedef NSView* HandleFormat;\r
+ using HandleFormat = NSView*;\r
#else\r
Component embeddedComponent;\r
- typedef void* HandleFormat;\r
+ using HandleFormat = void*;\r
#endif\r
\r
HandleFormat pluginHandle = {};\r
{\r
#if JUCE_WINDOWS\r
if (auto* topComp = getTopLevelComponent())\r
- peer = embeddedComponent.createNewPeer (0, topComp->getWindowHandle());\r
+ peer.reset (embeddedComponent.createNewPeer (0, topComp->getWindowHandle()));\r
else\r
peer = nullptr;\r
\r
ComSmartPtr<IPluginFactory2> pf2;\r
ComSmartPtr<IPluginFactory3> pf3;\r
\r
- ScopedPointer<PClassInfo2> info2;\r
- ScopedPointer<PClassInfoW> infoW;\r
+ std::unique_ptr<PClassInfo2> info2;\r
+ std::unique_ptr<PClassInfoW> infoW;\r
\r
if (pf2.loadFrom (factory))\r
{\r
\r
void terminate()\r
{\r
- if (isComponentInitialised) component->terminate();\r
+ if (isComponentInitialised)\r
+ component->terminate();\r
+\r
isComponentInitialised = false;\r
}\r
\r
{\r
VST3Parameter (VST3PluginInstance& parent,\r
Steinberg::Vst::ParamID parameterID,\r
- const String& parameterName,\r
- const String& parameterLabel,\r
- Steinberg::Vst::ParamValue defaultParameterValue,\r
- bool parameterIsAutomatable,\r
- bool parameterIsDiscrete,\r
- int numParameterSteps)\r
+ bool parameterIsAutomatable)\r
: pluginInstance (parent),\r
paramID (parameterID),\r
- name (parameterName),\r
- label (parameterLabel),\r
- defaultValue (defaultParameterValue),\r
- automatable (parameterIsAutomatable),\r
- discrete (parameterIsDiscrete),\r
- numSteps (numParameterSteps)\r
+ automatable (parameterIsAutomatable)\r
{\r
}\r
\r
\r
float getDefaultValue() const override\r
{\r
- return (float) defaultValue;\r
+ return (float) pluginInstance.getParameterInfoForIndex (getParameterIndex()).defaultNormalizedValue;\r
}\r
\r
String getName (int /*maximumStringLength*/) const override\r
{\r
- return name;\r
+ return toString (pluginInstance.getParameterInfoForIndex (getParameterIndex()).title);\r
}\r
\r
String getLabel() const override\r
{\r
- return label;\r
+ return toString (pluginInstance.getParameterInfoForIndex (getParameterIndex()).units);\r
}\r
\r
bool isAutomatable() const override\r
\r
bool isDiscrete() const override\r
{\r
- return discrete;\r
+ return getNumSteps() != AudioProcessor::getDefaultNumParameterSteps();\r
}\r
\r
int getNumSteps() const override\r
{\r
- return numSteps;\r
+ auto stepCount = pluginInstance.getParameterInfoForIndex (getParameterIndex()).stepCount;\r
+ return stepCount == 0 ? AudioProcessor::getDefaultNumParameterSteps()\r
+ : stepCount + 1;\r
}\r
\r
StringArray getAllValueStrings() const override\r
\r
VST3PluginInstance& pluginInstance;\r
const Steinberg::Vst::ParamID paramID;\r
- const String name, label;\r
- const Steinberg::Vst::ParamValue defaultValue;\r
- const bool automatable, discrete;\r
- const int numSteps;\r
+ const bool automatable;\r
};\r
\r
VST3PluginInstance (VST3ComponentHolder* componentHolder)\r
\r
for (int i = 0; i < editController->getParameterCount(); ++i)\r
{\r
- Vst::ParameterInfo paramInfo = { 0 };\r
- editController->getParameterInfo (i, paramInfo);\r
-\r
- bool isDiscrete = paramInfo.stepCount != 0;\r
- int numSteps = isDiscrete ? paramInfo.stepCount + 1\r
- : AudioProcessor::getDefaultNumParameterSteps();\r
-\r
+ auto paramInfo = getParameterInfoForIndex (i);\r
VST3Parameter* p = new VST3Parameter (*this,\r
paramInfo.id,\r
- toString (paramInfo.title),\r
- toString (paramInfo.units),\r
- paramInfo.defaultNormalizedValue,\r
- (paramInfo.flags & Vst::ParameterInfo::kCanAutomate) != 0,\r
- isDiscrete,\r
- numSteps);\r
+ (paramInfo.flags & Vst::ParameterInfo::kCanAutomate) != 0);\r
addParameter (p);\r
\r
if ((paramInfo.flags & Vst::ParameterInfo::kIsBypass) != 0)\r
\r
void setStateInformation (const void* data, int sizeInBytes) override\r
{\r
- ScopedPointer<XmlElement> head (AudioProcessor::getXmlFromBinary (data, sizeInBytes));\r
+ std::unique_ptr<XmlElement> head (AudioProcessor::getXmlFromBinary (data, sizeInBytes));\r
\r
if (head != nullptr)\r
{\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<VST3ComponentHolder> holder;\r
+ std::unique_ptr<VST3ComponentHolder> holder;\r
\r
friend VST3HostContext;\r
\r
// Information objects:\r
String company;\r
- ScopedPointer<PClassInfo> info;\r
- ScopedPointer<PClassInfo2> info2;\r
- ScopedPointer<PClassInfoW> infoW;\r
+ std::unique_ptr<PClassInfo> info;\r
+ std::unique_ptr<PClassInfo2> info2;\r
+ std::unique_ptr<PClassInfoW> infoW;\r
\r
// Rudimentary interfaces:\r
ComSmartPtr<Vst::IEditController> editController;\r
void VST3PluginFormat::createPluginInstance (const PluginDescription& description, double, int, void* userData,\r
void (*callback) (void*, AudioPluginInstance*, const String&))\r
{\r
- ScopedPointer<VST3Classes::VST3PluginInstance> result;\r
+ std::unique_ptr<VST3Classes::VST3PluginInstance> result;\r
\r
if (fileMightContainThisPluginType (description.fileOrIdentifier))\r
{\r
\r
if (const VST3Classes::VST3ModuleHandle::Ptr module = VST3Classes::VST3ModuleHandle::findOrCreateModule (file, description))\r
{\r
- ScopedPointer<VST3Classes::VST3ComponentHolder> holder (new VST3Classes::VST3ComponentHolder (module));\r
+ std::unique_ptr<VST3Classes::VST3ComponentHolder> holder (new VST3Classes::VST3ComponentHolder (module));\r
\r
if (holder->initialise())\r
{\r
File file;\r
MainCall moduleMain, customMain = {};\r
String pluginName;\r
- ScopedPointer<XmlElement> vstXml;\r
+ std::unique_ptr<XmlElement> vstXml;\r
\r
- typedef ReferenceCountedObjectPtr<ModuleHandle> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<ModuleHandle>;\r
\r
static Array<ModuleHandle*>& getActiveModules()\r
{\r
\r
if (moduleMain != nullptr)\r
{\r
- vstXml = XmlDocument::parse (file.withFileExtension ("vstxml"));\r
+ vstXml.reset (XmlDocument::parse (file.withFileExtension ("vstxml")));\r
\r
#if JUCE_WINDOWS\r
if (vstXml == nullptr)\r
- vstXml = XmlDocument::parse (getDLLResource (file, "VSTXML", 1));\r
+ vstXml.reset (XmlDocument::parse (getDLLResource (file, "VSTXML", 1)));\r
#endif\r
}\r
\r
\r
String getName (int maximumStringLength) const override\r
{\r
+ if (name.isEmpty())\r
+ return pluginInstance.getTextForOpcode (getParameterIndex(),\r
+ plugInOpcodeGetParameterName);\r
+\r
if (name.length() <= maximumStringLength)\r
return name;\r
\r
\r
String getLabel() const override\r
{\r
- return label;\r
+ return label.isEmpty() ? pluginInstance.getTextForOpcode (getParameterIndex(),\r
+ plugInOpcodeGetParameterLabel)\r
+ : label;\r
}\r
\r
bool isAutomatable() const override\r
\r
for (int i = 0; i < vstEffect->numParameters; ++i)\r
{\r
- String paramName (getTextForOpcode (i, plugInOpcodeGetParameterName));\r
+ String paramName;\r
Array<String> shortParamNames;\r
float defaultValue = 0;\r
- String label (getTextForOpcode (i, plugInOpcodeGetParameterLabel));\r
+ String label;\r
bool isAutomatable = dispatch (plugInOpcodeIsParameterAutomatable, i, 0, 0, 0) != 0;\r
bool isDiscrete = false;\r
int numSteps = AudioProcessor::getDefaultNumParameterSteps();\r
valueType));\r
}\r
\r
- vstSupportsBypass = pluginCanDo ("bypass");\r
+ vstSupportsBypass = (pluginCanDo ("bypass") > 0);\r
setRateAndBufferSizeDetails (sampleRateToUse, blockSizeToUse);\r
}\r
\r
VstEffectInterface* vstEffect;\r
ModuleHandle::Ptr vstModule;\r
\r
- ScopedPointer<VSTPluginFormat::ExtraFunctions> extraFunctions;\r
+ std::unique_ptr<VSTPluginFormat::ExtraFunctions> extraFunctions;\r
bool usesCocoaNSView = false;\r
\r
private:\r
//==============================================================================\r
struct VST2BypassParameter : Parameter\r
{\r
- VST2BypassParameter (VSTPluginInstance& effectToUse) : parent (effectToUse) {}\r
+ VST2BypassParameter (VSTPluginInstance& effectToUse)\r
+ : parent (effectToUse),\r
+ onStrings (TRANS("on"), TRANS("yes"), TRANS("true")),\r
+ offStrings (TRANS("off"), TRANS("no"), TRANS("false")),\r
+ values (TRANS("Off"), TRANS("On"))\r
+ {\r
+ }\r
\r
void setValue (float newValue) override\r
{\r
\r
VSTPluginInstance& parent;\r
bool currentValue = false;\r
- StringArray onStrings { TRANS("on"), TRANS("yes"), TRANS("true") };\r
- StringArray offStrings { TRANS("off"), TRANS("no"), TRANS("false") };\r
- StringArray values { TRANS("Off"), TRANS("On") };\r
+ StringArray onStrings, offStrings, values;\r
};\r
\r
//==============================================================================\r
\r
AudioBuffer<double> tmpBufferDouble;\r
HeapBlock<double*> channelBufferDouble;\r
- ScopedPointer<VST2BypassParameter> bypassParam;\r
+ std::unique_ptr<VST2BypassParameter> bypassParam;\r
\r
- ScopedPointer<VSTXMLInfo> xmlInfo;\r
+ std::unique_ptr<VSTXMLInfo> xmlInfo;\r
\r
static pointer_sized_int handleCanDo (const char* name)\r
{\r
};\r
\r
friend struct CarbonWrapperComponent;\r
- ScopedPointer<CarbonWrapperComponent> carbonWrapper;\r
+ std::unique_ptr<CarbonWrapperComponent> carbonWrapper;\r
#endif\r
\r
- ScopedPointer<AutoResizingNSViewComponentWithParent> cocoaWrapper;\r
+ std::unique_ptr<AutoResizingNSViewComponentWithParent> cocoaWrapper;\r
\r
void resized() override\r
{\r
desc.fileOrIdentifier = fileOrIdentifier;\r
desc.uid = 0;\r
\r
- ScopedPointer<VSTPluginInstance> instance (createAndUpdateDesc (*this, desc));\r
+ std::unique_ptr<VSTPluginInstance> instance (createAndUpdateDesc (*this, desc));\r
\r
if (instance == nullptr)\r
return;\r
\r
aboutToScanVSTShellPlugin (desc);\r
\r
- ScopedPointer<VSTPluginInstance> shellInstance (createAndUpdateDesc (*this, desc));\r
+ std::unique_ptr<VSTPluginInstance> shellInstance (createAndUpdateDesc (*this, desc));\r
\r
if (shellInstance != nullptr)\r
{\r
void* userData,\r
void (*callback) (void*, AudioPluginInstance*, const String&))\r
{\r
- ScopedPointer<VSTPluginInstance> result;\r
+ std::unique_ptr<VSTPluginInstance> result;\r
\r
if (fileMightContainThisPluginType (desc.fileOrIdentifier))\r
{\r
\r
if (module->open())\r
{\r
- ScopedPointer<VSTPluginInstance> result (VSTPluginInstance::create (module, initialSampleRate, initialBufferSize));\r
+ std::unique_ptr<VSTPluginInstance> result (VSTPluginInstance::create (module, initialSampleRate, initialBufferSize));\r
\r
if (result != nullptr)\r
if (result->initialiseEffect (initialSampleRate, initialBufferSize))\r
\r
void VSTPluginFormat::setExtraFunctions (AudioPluginInstance* plugin, ExtraFunctions* functions)\r
{\r
- ScopedPointer<ExtraFunctions> f (functions);\r
+ std::unique_ptr<ExtraFunctions> f (functions);\r
\r
if (auto* vst = dynamic_cast<VSTPluginInstance*> (plugin))\r
std::swap (vst->extraFunctions, f);\r
\r
#if JUCE_IOS\r
#define JUCE_IOS_MAC_VIEW UIView\r
- typedef UIViewComponent ViewComponentBaseClass;\r
+ using ViewComponentBaseClass = UIViewComponent;\r
#else\r
#define JUCE_IOS_MAC_VIEW NSView\r
- typedef NSViewComponent ViewComponentBaseClass;\r
+ using ViewComponentBaseClass = NSViewComponent;\r
#endif\r
\r
//==============================================================================\r
\r
ID: juce_audio_processors\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE audio processor classes\r
- description: Classes for loading and playing VST, AU, or internally-generated audio processors.\r
+ description: Classes for loading and playing VST, AU, LADSPA, or internally-generated audio processors.\r
website: http://www.juce.com/juce\r
license: GPL/Commercial\r
\r
/** Config: JUCE_PLUGINHOST_VST\r
Enables the VST audio plugin hosting classes.\r
\r
- @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_VST3\r
+ @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_VST3, JUCE_PLUGINHOST_LADSPA\r
*/\r
#ifndef JUCE_PLUGINHOST_VST\r
#define JUCE_PLUGINHOST_VST 0\r
Enables the VST3 audio plugin hosting classes. This requires the Steinberg VST3 SDK to be\r
installed on your machine.\r
\r
- @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_AU\r
+ @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_AU, JUCE_PLUGINHOST_LADSPA\r
*/\r
#ifndef JUCE_PLUGINHOST_VST3\r
#define JUCE_PLUGINHOST_VST3 0\r
/** Config: JUCE_PLUGINHOST_AU\r
Enables the AudioUnit plugin hosting classes. This is Mac-only, of course.\r
\r
- @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_VST3\r
+ @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_VST3, JUCE_PLUGINHOST_LADSPA\r
*/\r
#ifndef JUCE_PLUGINHOST_AU\r
#define JUCE_PLUGINHOST_AU 0\r
#endif\r
\r
-#if ! (JUCE_PLUGINHOST_AU || JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3)\r
-// #error "You need to set either the JUCE_PLUGINHOST_AU and/or JUCE_PLUGINHOST_VST and/or JUCE_PLUGINHOST_VST3 flags if you're using this module!"\r
+/** Config: JUCE_PLUGINHOST_LADSPA\r
+ Enables the LADSPA plugin hosting classes. This is Linux-only, of course.\r
+\r
+ @see LADSPAPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_VST3, JUCE_PLUGINHOST_AU\r
+ */\r
+#ifndef JUCE_PLUGINHOST_LADSPA\r
+ #define JUCE_PLUGINHOST_LADSPA 0\r
+#endif\r
+\r
+#if ! (JUCE_PLUGINHOST_AU || JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_LADSPA)\r
+// #error "You need to set either the JUCE_PLUGINHOST_AU and/or JUCE_PLUGINHOST_VST and/or JUCE_PLUGINHOST_VST3 and/or JUCE_PLUGINHOST_LADSPA flags if you're using this module!"\r
#endif\r
\r
#if ! (defined (JUCE_SUPPORT_CARBON) || JUCE_64BIT || JUCE_IOS)\r
{\r
assertOnceOnDeprecatedMethodUse();\r
\r
+ // Currently there is no corresponding method available in the\r
+ // AudioProcessorParameter class, and the previous behaviour of JUCE's\r
+ // plug-in hosting code simply returns a string version of the index; to\r
+ // maintain backwards compatibilty you should perform the operation below\r
+ // this comment. However the caveat is that for plug-ins which change their\r
+ // number of parameters dynamically at runtime you cannot rely upon the\r
+ // returned parameter ID mapping to the correct parameter. A comprehensive\r
+ // solution to this problem requires some additional work in JUCE's hosting\r
+ // code.\r
return String (parameterIndex);\r
}\r
\r
assertOnceOnDeprecatedMethodUse();\r
\r
if (auto* param = getParameters()[parameterIndex])\r
- return param->setValue (newValue);\r
+ param->setValue (newValue);\r
}\r
\r
const String AudioPluginInstance::getParameterName (int parameterIndex)\r
{\r
param->setValueNotifyingHost (newValue);\r
}\r
- else\r
+ else if (isPositiveAndBelow (parameterIndex, getNumParameters()))\r
{\r
setParameter (parameterIndex, newValue);\r
sendParamChangeMessageToListeners (parameterIndex, newValue);\r
if (auto* p = managedParameters[index])\r
return p->getName (maximumStringLength);\r
\r
- return getParameterName (index).substring (0, maximumStringLength);\r
+ return isPositiveAndBelow (index, getNumParameters()) ? getParameterName (index).substring (0, maximumStringLength)\r
+ : String();\r
}\r
\r
const String AudioProcessor::getParameterText (int index)\r
ScopedValueSetter<bool> sv (textRecursionCheck, true, false);\r
#endif\r
\r
- return getParameterText (index, 1024);\r
+ return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index, 1024)\r
+ : String();\r
}\r
\r
String AudioProcessor::getParameterText (int index, int maximumStringLength)\r
if (auto* p = managedParameters[index])\r
return p->getText (p->getValue(), maximumStringLength);\r
\r
- return getParameterText (index).substring (0, maximumStringLength);\r
+ return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index).substring (0, maximumStringLength)\r
+ : String();\r
}\r
\r
#if JUCE_GCC\r
/** Constructor for AudioProcessors which use layout maps\r
If your AudioProcessor uses layout maps then use this constructor.\r
*/\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
AudioProcessor (const std::initializer_list<const short[2]>& channelLayoutList)\r
: AudioProcessor (busesPropertiesFromLayoutArray (layoutListToArray (channelLayoutList)))\r
{\r
}\r
- #else\r
- template <int numLayouts>\r
- AudioProcessor (const short (&channelLayoutList) [numLayouts][2])\r
- : AudioProcessor (busesPropertiesFromLayoutArray (layoutListToArray (channelLayoutList)))\r
- {\r
- }\r
- #endif\r
\r
public:\r
//==============================================================================\r
}\r
@endcode\r
*/\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
static bool containsLayout (const BusesLayout& layouts, const std::initializer_list<const short[2]>& channelLayoutList)\r
{\r
return containsLayout (layouts, layoutListToArray (channelLayoutList));\r
}\r
- #endif\r
\r
template <int numLayouts>\r
static bool containsLayout (const BusesLayout& layouts, const short (&channelLayoutList) [numLayouts][2])\r
return layouts;\r
}\r
\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
static Array<InOutChannelPair> layoutListToArray (const std::initializer_list<const short[2]>& configuration)\r
{\r
Array<InOutChannelPair> layouts;\r
\r
return layouts;\r
}\r
- #endif\r
\r
//==============================================================================\r
static BusesProperties busesPropertiesFromLayoutArray (const Array<InOutChannelPair>&);\r
*/\r
void setBoundsConstrained (Rectangle<int> newBounds);\r
\r
- ScopedPointer<ResizableCornerComponent> resizableCorner;\r
+ std::unique_ptr<ResizableCornerComponent> resizableCorner;\r
\r
private:\r
//==============================================================================\r
void attachConstrainer (ComponentBoundsConstrainer*);\r
\r
//==============================================================================\r
- ScopedPointer<AudioProcessorEditorListener> resizeListener;\r
+ std::unique_ptr<AudioProcessorEditorListener> resizeListener;\r
bool resizable;\r
ComponentBoundsConstrainer defaultConstrainer;\r
ComponentBoundsConstrainer* constrainer = {};\r
}\r
\r
//==============================================================================\r
- typedef AudioProcessorGraph::NodeID NodeID;\r
+ using NodeID = AudioProcessorGraph::NodeID;\r
\r
AudioProcessorGraph& graph;\r
RenderSequence& sequence;\r
return false;\r
}\r
\r
-\r
bool AudioProcessorGraph::canConnect (Node* source, int sourceChannel, Node* dest, int destChannel) const noexcept\r
{\r
bool sourceIsMIDI = sourceChannel == midiChannelIndex;\r
//==============================================================================\r
void AudioProcessorGraph::clearRenderingSequence()\r
{\r
- ScopedPointer<RenderSequenceFloat> oldSequenceF;\r
- ScopedPointer<RenderSequenceDouble> oldSequenceD;\r
+ std::unique_ptr<RenderSequenceFloat> oldSequenceF;\r
+ std::unique_ptr<RenderSequenceDouble> oldSequenceD;\r
\r
{\r
const ScopedLock sl (getCallbackLock());\r
\r
void AudioProcessorGraph::buildRenderingSequence()\r
{\r
- ScopedPointer<RenderSequenceFloat> newSequenceF (new RenderSequenceFloat());\r
- ScopedPointer<RenderSequenceDouble> newSequenceD (new RenderSequenceDouble());\r
+ std::unique_ptr<RenderSequenceFloat> newSequenceF (new RenderSequenceFloat());\r
+ std::unique_ptr<RenderSequenceDouble> newSequenceD (new RenderSequenceDouble());\r
\r
{\r
MessageManagerLock mml;\r
RenderSequenceBuilder<RenderSequenceDouble> builderD (*this, *newSequenceD);\r
}\r
\r
- newSequenceF->prepareBuffers (getBlockSize());\r
- newSequenceD->prepareBuffers (getBlockSize());\r
+ {\r
+ const ScopedLock sl (getCallbackLock());\r
+ newSequenceF->prepareBuffers (getBlockSize());\r
+ newSequenceD->prepareBuffers (getBlockSize());\r
+ }\r
\r
if (anyNodesNeedPreparing())\r
{\r
void AudioProcessorGraph::getStateInformation (juce::MemoryBlock&) {}\r
void AudioProcessorGraph::setStateInformation (const void*, int) {}\r
\r
-template <typename Type>\r
-static void processBlockForBuffer (AudioBuffer<Type>& buffer, MidiBuffer& midiMessages,\r
+template <typename FloatType, typename SequenceType>\r
+static void processBlockForBuffer (AudioBuffer<FloatType>& buffer, MidiBuffer& midiMessages,\r
AudioProcessorGraph& graph,\r
- GraphRenderSequence<Type>* renderSequence,\r
+ std::unique_ptr<SequenceType>& renderSequence,\r
Atomic<int>& isPrepared)\r
{\r
if (graph.isNonRealtime())\r
~AudioProcessorGraph();\r
\r
/** Each node in the graph has a UID of this type. */\r
- typedef uint32 NodeID;\r
+ using NodeID = uint32;\r
\r
//==============================================================================\r
/** A special index that represents the midi channel of a node.\r
\r
//==============================================================================\r
/** A convenient typedef for referring to a pointer to a node object. */\r
- typedef ReferenceCountedObjectPtr<Node> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<Node>;\r
\r
private:\r
//==============================================================================\r
bool operator== (const Connection&) const noexcept;\r
};\r
\r
- const ScopedPointer<AudioProcessor> processor;\r
+ const std::unique_ptr<AudioProcessor> processor;\r
Array<Connection> inputs, outputs;\r
bool isPrepared = false, bypassed = false;\r
\r
\r
struct RenderSequenceFloat;\r
struct RenderSequenceDouble;\r
- ScopedPointer<RenderSequenceFloat> renderSequenceFloat;\r
- ScopedPointer<RenderSequenceDouble> renderSequenceDouble;\r
+ std::unique_ptr<RenderSequenceFloat> renderSequenceFloat;\r
+ std::unique_ptr<RenderSequenceDouble> renderSequenceDouble;\r
\r
friend class AudioGraphIOProcessor;\r
\r
private:\r
//==============================================================================\r
friend class AudioProcessor;\r
+ friend class LegacyAudioParameter;\r
AudioProcessor* processor = nullptr;\r
int parameterIndex = -1;\r
CriticalSection listenerLock;\r
{\r
\r
class ParameterListener : private AudioProcessorParameter::Listener,\r
+ private AudioProcessorListener,\r
private Timer\r
{\r
public:\r
- ParameterListener (AudioProcessorParameter& param)\r
- : parameter (param)\r
+ ParameterListener (AudioProcessor& p, AudioProcessorParameter& param)\r
+ : processor (p), parameter (param)\r
{\r
- parameter.addListener (this);\r
+ if (LegacyAudioParameter::isLegacy (¶meter))\r
+ processor.addListener (this);\r
+ else\r
+ parameter.addListener (this);\r
\r
startTimer (100);\r
}\r
\r
virtual ~ParameterListener()\r
{\r
- parameter.removeListener (this);\r
+ if (LegacyAudioParameter::isLegacy (¶meter))\r
+ processor.removeListener (this);\r
+ else\r
+ parameter.removeListener (this);\r
}\r
\r
AudioProcessorParameter& getParameter() noexcept\r
virtual void handleNewParameterValue() = 0;\r
\r
private:\r
+ //==============================================================================\r
void parameterValueChanged (int, float) override\r
{\r
parameterValueHasChanged = 1;\r
\r
void parameterGestureChanged (int, bool) override {}\r
\r
+ //==============================================================================\r
+ void audioProcessorParameterChanged (AudioProcessor*, int index, float) override\r
+ {\r
+ if (index == parameter.getParameterIndex())\r
+ parameterValueHasChanged = 1;\r
+ }\r
+\r
+ void audioProcessorChanged (AudioProcessor*) override {}\r
+\r
+ //==============================================================================\r
void timerCallback() override\r
{\r
if (parameterValueHasChanged.compareAndSetBool (0, 1))\r
}\r
}\r
\r
+ AudioProcessor& processor;\r
AudioProcessorParameter& parameter;\r
Atomic<int> parameterValueHasChanged { 0 };\r
\r
private ParameterListener\r
{\r
public:\r
- BooleanParameterComponent (AudioProcessorParameter& param)\r
- : ParameterListener (param)\r
+ BooleanParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
+ : ParameterListener (processor, param)\r
{\r
// Set the initial value.\r
handleNewParameterValue();\r
private ParameterListener\r
{\r
public:\r
- SwitchParameterComponent (AudioProcessorParameter& param)\r
- : ParameterListener (param)\r
+ SwitchParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
+ : ParameterListener (processor, param)\r
{\r
auto* leftButton = buttons.add (new TextButton());\r
auto* rightButton = buttons.add (new TextButton());\r
private ParameterListener\r
{\r
public:\r
- ChoiceParameterComponent (AudioProcessorParameter& param)\r
- : ParameterListener (param),\r
+ ChoiceParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
+ : ParameterListener (processor, param),\r
parameterValues (getParameter().getAllValueStrings())\r
{\r
box.addItemList (parameterValues, 1);\r
private ParameterListener\r
{\r
public:\r
- SliderParameterComponent (AudioProcessorParameter& param)\r
- : ParameterListener (param)\r
+ SliderParameterComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
+ : ParameterListener (processor, param)\r
{\r
if (getParameter().getNumSteps() != AudioProcessor::getDefaultNumParameterSteps())\r
slider.setRange (0.0, 1.0, 1.0 / (getParameter().getNumSteps() - 1.0));\r
class ParameterDisplayComponent : public Component\r
{\r
public:\r
- ParameterDisplayComponent (AudioProcessorParameter& param)\r
+ ParameterDisplayComponent (AudioProcessor& processor, AudioProcessorParameter& param)\r
: parameter (param)\r
{\r
parameterName.setText (parameter.getName (128), dontSendNotification);\r
// marking a parameter as boolean. If you want consistency across\r
// all formats then it might be best to use a\r
// SwitchParameterComponent instead.\r
- parameterComp.reset (new BooleanParameterComponent (param));\r
+ parameterComp.reset (new BooleanParameterComponent (processor, param));\r
}\r
else if (param.getNumSteps() == 2)\r
{\r
// Most hosts display any parameter with just two steps as a switch.\r
- parameterComp.reset (new SwitchParameterComponent (param));\r
+ parameterComp.reset (new SwitchParameterComponent (processor, param));\r
}\r
else if (! param.getAllValueStrings().isEmpty())\r
{\r
// If we have a list of strings to represent the different states a\r
// parameter can be in then we should present a dropdown allowing a\r
// user to pick one of them.\r
- parameterComp.reset (new ChoiceParameterComponent (param));\r
+ parameterComp.reset (new ChoiceParameterComponent (processor, param));\r
}\r
else\r
{\r
// Everything else can be represented as a slider.\r
- parameterComp.reset (new SliderParameterComponent (param));\r
+ parameterComp.reset (new SliderParameterComponent (processor, param));\r
}\r
\r
- addAndMakeVisible (parameterComp);\r
+ addAndMakeVisible (parameterComp.get());\r
\r
setSize (400, 40);\r
}\r
private:\r
AudioProcessorParameter& parameter;\r
Label parameterName, parameterLabel;\r
- ScopedPointer<Component> parameterComp;\r
+ std::unique_ptr<Component> parameterComp;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ParameterDisplayComponent)\r
};\r
class ParametersPanel : public Component\r
{\r
public:\r
- ParametersPanel (const Array<AudioProcessorParameter*>& parameters)\r
+ ParametersPanel (AudioProcessor& processor, const Array<AudioProcessorParameter*>& parameters)\r
{\r
for (auto* param : parameters)\r
if (param->isAutomatable())\r
- addAndMakeVisible (paramComponents.add (new ParameterDisplayComponent (*param)));\r
+ addAndMakeVisible (paramComponents.add (new ParameterDisplayComponent (processor, *param)));\r
\r
if (auto* comp = paramComponents[0])\r
setSize (comp->getWidth(), comp->getHeight() * paramComponents.size());\r
\r
owner.setOpaque (true);\r
\r
- view.setViewedComponent (new ParametersPanel (juceParameters.params));\r
+ view.setViewedComponent (new ParametersPanel (*p, juceParameters.params));\r
owner.addAndMakeVisible (view);\r
\r
view.setScrollBarsShown (true, false);\r
private:\r
//==============================================================================\r
struct Pimpl;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GenericAudioProcessorEditor)\r
};\r
const KnownPluginList::SortMethod sortMethod)\r
{\r
String lastType;\r
- ScopedPointer<KnownPluginList::PluginTree> current (new KnownPluginList::PluginTree());\r
+ std::unique_ptr<KnownPluginList::PluginTree> current (new KnownPluginList::PluginTree());\r
\r
for (auto* pd : sorted)\r
{\r
void KnownPluginList::addToMenu (PopupMenu& menu, const SortMethod sortMethod,\r
const String& currentlyTickedPluginID) const\r
{\r
- ScopedPointer<PluginTree> tree (createTree (sortMethod));\r
+ std::unique_ptr<PluginTree> tree (createTree (sortMethod));\r
PluginTreeUtils::addToMenu (*tree, menu, types, currentlyTickedPluginID);\r
}\r
\r
//==============================================================================\r
OwnedArray<PluginDescription> types;\r
StringArray blacklist;\r
- ScopedPointer<CustomScanner> scanner;\r
+ std::unique_ptr<CustomScanner> scanner;\r
CriticalSection scanLock, typesArrayLock;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KnownPluginList)\r
AudioPluginFormat& formatToScan;\r
StringArray filesOrIdentifiersToScan;\r
PropertiesFile* propertiesToUse;\r
- ScopedPointer<PluginDirectoryScanner> scanner;\r
+ std::unique_ptr<PluginDirectoryScanner> scanner;\r
AlertWindow pathChooserWindow, progressWindow;\r
FileSearchPathListComponent pathList;\r
String pluginBeingScanned;\r
double progress;\r
int numThreads;\r
bool allowAsync, finished;\r
- ScopedPointer<ThreadPool> pool;\r
+ std::unique_ptr<ThreadPool> pool;\r
\r
static void startScanCallback (int result, AlertWindow* alert, Scanner* scanner)\r
{\r
int numThreads;\r
\r
class TableModel;\r
- ScopedPointer<TableListBoxModel> tableModel;\r
+ std::unique_ptr<TableListBoxModel> tableModel;\r
\r
class Scanner;\r
friend class Scanner;\r
friend struct ContainerDeletePolicy<Scanner>;\r
- ScopedPointer<Scanner> currentScanner;\r
+ std::unique_ptr<Scanner> currentScanner;\r
\r
void scanFinished (const StringArray&);\r
static void optionsMenuStaticCallback (int, PluginListComponent*);\r
isDiscreteParam (discrete),\r
isBooleanParam (boolean)\r
{\r
+ value = defaultValue;\r
state.addListener (this);\r
- needsUpdate.set (1);\r
}\r
\r
~Parameter()\r
listeners.call ([=] (AudioProcessorValueTreeState::Listener& l) { l.parameterChanged (paramID, value); });\r
listenersNeedCalling = false;\r
\r
- needsUpdate.set (1);\r
+ needsUpdate = true;\r
}\r
}\r
\r
\r
void copyValueToValueTree()\r
{\r
- if (state.isValid())\r
- state.setPropertyExcludingListener (this, owner.valuePropertyID, value, owner.undoManager);\r
+ if (auto* valueProperty = state.getPropertyPointer (owner.valuePropertyID))\r
+ {\r
+ if ((float) *valueProperty != value)\r
+ {\r
+ ScopedValueSetter<bool> svs (ignoreParameterChangedCallbacks, true);\r
+ state.setProperty (owner.valuePropertyID, value, owner.undoManager);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ state.setProperty (owner.valuePropertyID, value, nullptr);\r
+ }\r
}\r
\r
void valueTreePropertyChanged (ValueTree&, const Identifier& property) override\r
{\r
+ if (ignoreParameterChangedCallbacks)\r
+ return;\r
+\r
if (property == owner.valuePropertyID)\r
updateFromValueTree();\r
}\r
std::function<float (const String&)> textToValueFunction;\r
NormalisableRange<float> range;\r
float value, defaultValue;\r
- Atomic<int> needsUpdate;\r
+ std::atomic<bool> needsUpdate { true };\r
bool listenersNeedCalling;\r
const bool isMetaParam, isAutomatableParam, isDiscreteParam, isBooleanParam;\r
+ bool ignoreParameterChangedCallbacks = false;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Parameter)\r
};\r
if (Parameter* p = Parameter::getParameterForID (processor, paramID))\r
return p->state.getPropertyAsValue (valuePropertyID, undoManager);\r
\r
- return Value();\r
+ return {};\r
}\r
\r
NormalisableRange<float> AudioProcessorValueTreeState::getParameterRange (StringRef paramID) const noexcept\r
{\r
ScopedLock lock (valueTreeChanging);\r
\r
+ flushParameterValuesToValueTree();\r
+\r
return state.createCopy();\r
}\r
\r
ScopedLock lock (valueTreeChanging);\r
\r
state = newState;\r
+\r
+ if (undoManager != nullptr)\r
+ undoManager->clearUndoHistory();\r
}\r
\r
ValueTree AudioProcessorValueTreeState::getOrCreateChildValueTree (const String& paramID)\r
if (! v.isValid())\r
{\r
v = ValueTree (valueType);\r
- v.setProperty (idPropertyID, paramID, undoManager);\r
- state.appendChild (v, undoManager);\r
+ v.setProperty (idPropertyID, paramID, nullptr);\r
+ state.appendChild (v, nullptr);\r
}\r
\r
return v;\r
{\r
ScopedLock lock (valueTreeChanging);\r
\r
- auto anythingUpdated = false;\r
+ bool anythingUpdated = false;\r
\r
for (auto* ap : processor.getParameters())\r
{\r
jassert (dynamic_cast<Parameter*> (ap) != nullptr);\r
auto* p = static_cast<Parameter*> (ap);\r
\r
- if (p->needsUpdate.compareAndSetBool (0, 1))\r
+ bool needsUpdateTestValue = true;\r
+\r
+ if (p->needsUpdate.compare_exchange_strong (needsUpdateTestValue, false))\r
{\r
p->copyValueToValueTree();\r
anythingUpdated = true;\r
void beginParameterChange()\r
{\r
if (AudioProcessorParameter* p = state.getParameter (paramID))\r
+ {\r
+ if (state.undoManager != nullptr)\r
+ state.undoManager->beginNewTransaction();\r
+\r
p->beginChangeGesture();\r
+ }\r
}\r
\r
void endParameterChange()\r
{\r
const ScopedLock selfCallbackLock (selfCallbackMutex);\r
\r
- if ((! ignoreCallbacks) && (! ModifierKeys::getCurrentModifiers().isRightButtonDown()))\r
+ if ((! ignoreCallbacks) && (! ModifierKeys::currentModifiers.isRightButtonDown()))\r
setNewUnnormalisedValue ((float) s->getValue());\r
}\r
\r
private:\r
struct Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SliderAttachment)\r
};\r
\r
private:\r
struct Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComboBoxAttachment)\r
};\r
\r
private:\r
struct Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonAttachment)\r
};\r
\r
\r
class Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioCDBurner)\r
};\r
File volumeDir;\r
Array<File> tracks;\r
int currentReaderTrack;\r
- ScopedPointer<AudioFormatReader> reader;\r
+ std::unique_ptr<AudioFormatReader> reader;\r
AudioCDReader (const File& volume);\r
\r
#elif JUCE_WINDOWS\r
\r
g.setFont (height * 0.6f);\r
g.setColour (findColour (ListBox::textColourId, true).withMultipliedAlpha (enabled ? 1.0f : 0.6f));\r
- g.drawText (item, x, 0, width - x - 2, height, Justification::centredLeft, true);\r
+ g.drawText (item, x + 5, 0, width - x - 5, height, Justification::centredLeft, true);\r
}\r
}\r
\r
\r
int getTickX() const\r
{\r
- return getRowHeight() + 5;\r
+ return getRowHeight();\r
}\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInputSelectorComponentListBox)\r
AudioIODeviceType& type;\r
const AudioDeviceSetupDetails setup;\r
\r
- ScopedPointer<ComboBox> outputDeviceDropDown, inputDeviceDropDown, sampleRateDropDown, bufferSizeDropDown;\r
- ScopedPointer<Label> outputDeviceLabel, inputDeviceLabel, sampleRateLabel, bufferSizeLabel, inputChanLabel, outputChanLabel;\r
- ScopedPointer<TextButton> testButton;\r
- ScopedPointer<Component> inputLevelMeter;\r
- ScopedPointer<TextButton> showUIButton, showAdvancedSettingsButton, resetDeviceButton;\r
+ std::unique_ptr<ComboBox> outputDeviceDropDown, inputDeviceDropDown, sampleRateDropDown, bufferSizeDropDown;\r
+ std::unique_ptr<Label> outputDeviceLabel, inputDeviceLabel, sampleRateLabel, bufferSizeLabel, inputChanLabel, outputChanLabel;\r
+ std::unique_ptr<TextButton> testButton;\r
+ std::unique_ptr<Component> inputLevelMeter;\r
+ std::unique_ptr<TextButton> showUIButton, showAdvancedSettingsButton, resetDeviceButton;\r
\r
void showCorrectDeviceName (ComboBox* box, bool isInput)\r
{\r
};\r
\r
private:\r
- ScopedPointer<ChannelSelectorListBox> inputChanList, outputChanList;\r
+ std::unique_ptr<ChannelSelectorListBox> inputChanList, outputChanList;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDeviceSettingsPanel)\r
};\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<ComboBox> deviceTypeDropDown;\r
- ScopedPointer<Label> deviceTypeDropDownLabel;\r
- ScopedPointer<Component> audioDeviceSettingsComp;\r
+ std::unique_ptr<ComboBox> deviceTypeDropDown;\r
+ std::unique_ptr<Label> deviceTypeDropDownLabel;\r
+ std::unique_ptr<Component> audioDeviceSettingsComp;\r
String audioDeviceSettingsCompType;\r
int itemHeight;\r
const int minOutputChannels, maxOutputChannels, minInputChannels, maxInputChannels;\r
\r
class MidiInputSelectorComponentListBox;\r
friend struct ContainerDeletePolicy<MidiInputSelectorComponentListBox>;\r
- ScopedPointer<MidiInputSelectorComponentListBox> midiInputsList;\r
- ScopedPointer<ComboBox> midiOutputSelector;\r
- ScopedPointer<Label> midiInputsLabel, midiOutputLabel;\r
- ScopedPointer<TextButton> bluetoothButton;\r
+ std::unique_ptr<MidiInputSelectorComponentListBox> midiInputsList;\r
+ std::unique_ptr<ComboBox> midiOutputSelector;\r
+ std::unique_ptr<Label> midiInputsLabel, midiOutputLabel;\r
+ std::unique_ptr<TextButton> bluetoothButton;\r
\r
void handleBluetoothButton();\r
void updateDeviceType();\r
\r
private:\r
AudioThumbnail& owner;\r
- ScopedPointer<InputSource> source;\r
- ScopedPointer<AudioFormatReader> reader;\r
+ std::unique_ptr<InputSource> source;\r
+ std::unique_ptr<AudioFormatReader> reader;\r
CriticalSection readerLock;\r
uint32 lastReaderUseTime = 0;\r
\r
friend struct ContainerDeletePolicy<ThumbData>;\r
friend struct ContainerDeletePolicy<CachedWindow>;\r
\r
- ScopedPointer<LevelDataSource> source;\r
- ScopedPointer<CachedWindow> window;\r
+ std::unique_ptr<LevelDataSource> source;\r
+ std::unique_ptr<CachedWindow> window;\r
OwnedArray<ThumbData> channels;\r
\r
int32 samplesPerThumbSample = 0;\r
}\r
}\r
\r
+void MidiKeyboardComponent::setScrollButtonWidth (int widthInPixels)\r
+{\r
+ jassert (widthInPixels > 0);\r
+\r
+ if (scrollButtonWidth != widthInPixels)\r
+ {\r
+ scrollButtonWidth = widthInPixels;\r
+ resized();\r
+ }\r
+}\r
+\r
void MidiKeyboardComponent::setOrientation (Orientation newOrientation)\r
{\r
if (orientation != newOrientation)\r
{\r
if (getKeyPos (note).contains (pos.x - xOffset))\r
{\r
- mousePositionVelocity = pos.y / blackNoteLength;\r
+ mousePositionVelocity = jmax (0.0f, pos.y / blackNoteLength);\r
return note;\r
}\r
}\r
if (getKeyPos (note).contains (pos.x - xOffset))\r
{\r
auto whiteNoteLength = (orientation == horizontalKeyboard) ? getHeight() : getWidth();\r
- mousePositionVelocity = pos.y / (float) whiteNoteLength;\r
+ mousePositionVelocity = jmax (0.0f, pos.y / (float) whiteNoteLength);\r
return note;\r
}\r
}\r
\r
if (canScroll)\r
{\r
- auto scrollButtonW = jmin (12, w / 2);\r
+ auto scrollButtonW = jmin (scrollButtonWidth, w / 2);\r
auto r = getLocalBounds();\r
\r
if (orientation == horizontalKeyboard)\r
/** Returns the width that was set by setKeyWidth(). */\r
float getKeyWidth() const noexcept { return keyWidth; }\r
\r
+ /** Changes the width used to draw the buttons that scroll the keyboard up/down in octaves. */\r
+ void setScrollButtonWidth (int widthInPixels);\r
+\r
+ /** Returns the width that was set by setScrollButtonWidth(). */\r
+ int getScrollButtonWidth() const noexcept { return scrollButtonWidth; }\r
+\r
/** Changes the keyboard's current direction. */\r
void setOrientation (Orientation newOrientation);\r
\r
float blackNoteWidthRatio = 0.7f;\r
float xOffset = 0;\r
float keyWidth = 16.0f;\r
+ int scrollButtonWidth = 12;\r
Orientation orientation;\r
\r
int midiChannel = 1, midiInChannelMask = 0xffff;\r
int rangeStart = 0, rangeEnd = 127;\r
float firstKey = 12 * 4.0f;\r
bool canScroll = true, useMousePositionForVelocity = true, shouldCheckMousePos = false;\r
- ScopedPointer<Button> scrollDown, scrollUp;\r
+ std::unique_ptr<Button> scrollDown, scrollUp;\r
\r
Array<KeyPress> keyPresses;\r
Array<int> keyPressNotes;\r
\r
ID: juce_audio_utils\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE extra audio utility classes\r
description: Classes for audio-related GUI and miscellaneous tasks.\r
website: http://www.juce.com/juce\r
const Rectangle<int>& boundsToUse)\r
: bounds (boundsToUse)\r
{\r
- ScopedPointer<ModalComponentManager::Callback> exitCallback (exitCallbackToUse);\r
+ std::unique_ptr<ModalComponentManager::Callback> exitCallback (exitCallbackToUse);\r
\r
AndroidBluetoothMidiInterface::startStopScan (true);\r
\r
bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallbackPtr,\r
Rectangle<int>* btBounds)\r
{\r
- ScopedPointer<ModalComponentManager::Callback> exitCallback (exitCallbackPtr);\r
+ std::unique_ptr<ModalComponentManager::Callback> exitCallback (exitCallbackPtr);\r
auto boundsToUse = (btBounds != nullptr ? *btBounds : Rectangle<int> {});\r
\r
if (! RuntimePermissions::isGranted (RuntimePermissions::bluetoothMidi))\r
const Rectangle<int>& boundsToUse)\r
: bounds (boundsToUse)\r
{\r
- ScopedPointer<ModalComponentManager::Callback> exitCallback (exitCallbackToUse);\r
+ std::unique_ptr<ModalComponentManager::Callback> exitCallback (exitCallbackToUse);\r
\r
setAlwaysOnTop (true);\r
setVisible (true);\r
bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
Rectangle<int>* btBounds)\r
{\r
- ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+ std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
auto boundsToUse = (btBounds != nullptr ? *btBounds : Rectangle<int> {});\r
\r
if (isAvailable())\r
bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
Rectangle<int>*)\r
{\r
- ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+ std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
return false;\r
}\r
\r
bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
Rectangle<int>*)\r
{\r
- ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+ std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
// not implemented on Linux yet!\r
// You should check whether the dialogue is available on your system\r
// using isAvailable() before calling open().\r
source->releaseResources();\r
}\r
\r
- ScopedPointer<AudioSource> source;\r
+ std::unique_ptr<AudioSource> source;\r
int readPosition, lengthInFrames;\r
};\r
\r
{\r
if (DRDevice* dev = [[DRDevice devices] objectAtIndex: static_cast<NSUInteger> (deviceIndex)])\r
{\r
- device = new OpenDiskDevice (dev);\r
+ device.reset (new OpenDiskDevice (dev));\r
lastState = getDiskState();\r
startTimer (1000);\r
}\r
objectForKey: DRDeviceMediaBlocksFreeKey] intValue];\r
}\r
\r
- ScopedPointer<OpenDiskDevice> device;\r
+ std::unique_ptr<OpenDiskDevice> device;\r
\r
private:\r
DiskState lastState;\r
\r
AudioCDBurner* AudioCDBurner::openDevice (const int deviceIndex)\r
{\r
- ScopedPointer<AudioCDBurner> b (new AudioCDBurner (deviceIndex));\r
+ std::unique_ptr<AudioCDBurner> b (new AudioCDBurner (deviceIndex));\r
\r
if (b->pimpl->device == nil)\r
b = nullptr;\r
// Returns NULL on success, otherwise a const char* representing an error.\r
static const char* getTrackOffsets (XmlDocument& xmlDocument, Array<int>& offsets)\r
{\r
- const ScopedPointer<XmlElement> xml (xmlDocument.getDocumentElement());\r
+ const std::unique_ptr<XmlElement> xml (xmlDocument.getDocumentElement());\r
if (xml == nullptr)\r
return "Couldn't parse XML in file";\r
\r
BufferedInputStream* const bin = new BufferedInputStream (in, 65536, true);\r
\r
AiffAudioFormat format;\r
- reader = format.createReaderFor (bin, true);\r
+ reader.reset (format.createReaderFor (bin, true));\r
\r
if (reader == nullptr)\r
currentReaderTrack = -1;\r
bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
Rectangle<int>*)\r
{\r
- ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+ std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
// Do not call this on OSX. Instead, you should pair Bluetooth MIDI devices\r
// using the "Audio MIDI Setup" app (located in /Applications/Utilities).\r
jassertfalse;\r
\r
AudioCDBurner* AudioCDBurner::openDevice (const int deviceIndex)\r
{\r
- ScopedPointer<AudioCDBurner> b (new AudioCDBurner (deviceIndex));\r
+ std::unique_ptr<AudioCDBurner> b (new AudioCDBurner (deviceIndex));\r
\r
if (b->pimpl == 0)\r
b = nullptr;\r
pimpl->shouldCancel = false;\r
\r
UINT_PTR cookie;\r
- HRESULT hr = pimpl->discMaster->ProgressAdvise ((AudioCDBurner::Pimpl*) pimpl, &cookie);\r
+ HRESULT hr = pimpl->discMaster->ProgressAdvise ((AudioCDBurner::Pimpl*) pimpl.get(), &cookie);\r
\r
hr = pimpl->discMaster->RecordDisc (performFakeBurnForTesting,\r
ejectDiscAfterwards);\r
if (audioSource == 0)\r
return false;\r
\r
- ScopedPointer<AudioSource> source (audioSource);\r
+ std::unique_ptr<AudioSource> source (audioSource);\r
\r
long bytesPerBlock;\r
HRESULT hr = pimpl->redbook->GetAudioBlockSize (&bytesPerBlock);\r
BYTE readType;\r
\r
private:\r
- ScopedPointer<CDController> controller;\r
+ std::unique_ptr<CDController> controller;\r
\r
bool testController (int readType, CDController* newController, CDReadBuffer& bufferToUse);\r
};\r
\r
bool CDDeviceHandle::testController (const int type, CDController* const newController, CDReadBuffer& rb)\r
{\r
- controller = newController;\r
+ controller.reset (newController);\r
readType = (BYTE) type;\r
\r
controller->deviceInfo = this;\r
\r
if (h != INVALID_HANDLE_VALUE)\r
{\r
- ScopedPointer<AudioCDReader> cd (new AudioCDReader (new CDDeviceWrapper (list [deviceIndex], h)));\r
+ std::unique_ptr<AudioCDReader> cd (new AudioCDReader (new CDDeviceWrapper (list [deviceIndex], h)));\r
\r
if (cd->lengthInSamples > 0)\r
return cd.release();\r
bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,\r
Rectangle<int>*)\r
{\r
- ScopedPointer<ModalComponentManager::Callback> cb (exitCallback);\r
+ std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);\r
// not implemented on Windows yet!\r
// You should check whether the dialogue is available on your system\r
// using isAvailable() before calling open().\r
}\r
\r
private:\r
- ScopedPointer<PositionableAudioSource> source;\r
+ std::unique_ptr<PositionableAudioSource> source;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioSourceOwningTransportSource)\r
};\r
{ fixedVelocityValue, 127, 1, 127, false, "Fixed Velocity Value", ConfigType::integer, {}, "5D Touch" },\r
{ pianoMode, 0, 0, 1, false, "Piano Mode", ConfigType::boolean, {}, "Play mode" },\r
{ glideLock, 0, 0, 127, false, "Glide Rate", ConfigType::integer, {}, "Play mode" },\r
- { glideLockEnable, 0, 0, 1, false, "Glidelock Enable", ConfigType::boolean, {}, "Play mode" },\r
+ { glideLockEnable, 0, 0, 1, false, "Glide Lock Enable", ConfigType::boolean, {}, "Play mode" },\r
{ mode, 4, 1, 5, false, "Mode", ConfigType::integer, {}, "Play mode" },\r
{ volume, 100, 0, 127, false, "Volume", ConfigType::integer, {}, "Play mode" },\r
{ scale, 0, 0, 18, false, "Scale", ConfigType::integer, {}, "Play mode" }, // NOTE: Should be options\r
\r
#include "juce_blocks_basics.h"\r
\r
-#if (! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) || (! defined (JUCE_HAS_CONSTEXPR))\r
+#if ! JUCE_HAS_CONSTEXPR\r
#ifndef JUCE_DEMO_RUNNER\r
- #error "juce_blocks_basics module requires your compiler to have a newer version of the standard library"\r
+ #error "The juce_blocks_basics module requires a compiler that supports constexpr"\r
#endif\r
#else\r
\r
\r
ID: juce_blocks_basics\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: Provides low-level control over ROLI BLOCKS devices\r
description: JUCE wrapper for low-level control over ROLI BLOCKS devices.\r
website: http://developer.roli.com\r
#include <juce_events/juce_events.h>\r
#include <juce_audio_devices/juce_audio_devices.h>\r
\r
-#if (! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) || (! defined (JUCE_HAS_CONSTEXPR))\r
+#if ! JUCE_HAS_CONSTEXPR\r
#ifndef JUCE_DEMO_RUNNER\r
- #error "juce_blocks_basics module requires your compiler to have a newer version of the standard library"\r
+ #error "The juce_blocks_basics module requires a compiler that supports constexpr"\r
#endif\r
#else\r
\r
return BlocksProtocol::ledProgramLittleFootFunctions;\r
}\r
\r
-static bool blocksMatch (const Block::Array& list1, const Block::Array& list2) noexcept\r
+template <typename ListType>\r
+static bool collectionsMatch (const ListType& list1, const ListType& list2) noexcept\r
{\r
if (list1.size() != list2.size())\r
return false;\r
\r
bool BlockTopology::operator== (const BlockTopology& other) const noexcept\r
{\r
- return connections == other.connections && blocksMatch (blocks, other.blocks);\r
+ return collectionsMatch (connections, other.connections) && collectionsMatch (blocks, other.blocks);\r
}\r
\r
bool BlockTopology::operator!= (const BlockTopology& other) const noexcept\r
//==========================================================================\r
struct Internal;\r
struct DetectorHolder;\r
- juce::ScopedPointer<DetectorHolder> detector;\r
+ std::unique_ptr<DetectorHolder> detector;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PhysicalTopologySource)\r
};\r
\r
RuleBasedTopologySource::RuleBasedTopologySource (TopologySource& d)\r
{\r
- internal = new Internal (*this, d);\r
+ internal.reset (new Internal (*this, d));\r
}\r
\r
RuleBasedTopologySource::~RuleBasedTopologySource()\r
private:\r
//==========================================================================\r
struct Internal;\r
- juce::ScopedPointer<Internal> internal;\r
+ std::unique_ptr<Internal> internal;\r
};\r
\r
} // namespace juce\r
\r
#include "b2ChainShape.h"\r
#include "b2EdgeShape.h"\r
-#include <new>\r
-#include <cstring>\r
+\r
using namespace std;\r
\r
b2ChainShape::~b2ChainShape()\r
*/\r
\r
#include "b2CircleShape.h"\r
-#include <new>\r
+\r
using namespace std;\r
\r
b2Shape* b2CircleShape::Clone(b2BlockAllocator* allocator) const\r
*/\r
\r
#include "b2EdgeShape.h"\r
-#include <new>\r
+\r
using namespace std;\r
\r
void b2EdgeShape::Set(const b2Vec2& v1, const b2Vec2& v2)\r
*/\r
\r
#include "b2PolygonShape.h"\r
-#include <new>\r
\r
b2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const\r
{\r
*/\r
\r
#include "b2BroadPhase.h"\r
-#include <cstring>\r
+\r
using namespace std;\r
\r
b2BroadPhase::b2BroadPhase()\r
#define B2_COLLISION_H\r
\r
#include "../Common/b2Math.h"\r
-#include <climits>\r
\r
/// @file\r
/// Structures and functions used for computing contact points, distance\r
*/\r
\r
#include "b2BlockAllocator.h"\r
-#include <cstdlib>\r
-#include <climits>\r
-#include <cstring>\r
-#include <memory>\r
+\r
using namespace std;\r
\r
int32 b2BlockAllocator::s_blockSizes[b2_blockSizes] =\r
\r
#include "b2Settings.h"\r
\r
-#include <cmath>\r
-#include <cfloat>\r
-#include <cstddef>\r
-#include <limits>\r
-\r
/// This function is used to ensure that a floating point number is\r
/// not a NaN or infinity.\r
inline bool b2IsValid(float32 x)\r
*/\r
\r
#include "b2Settings.h"\r
-#include <cstdlib>\r
-#include <cstdio>\r
-#include <cstdarg>\r
\r
b2Version b2_version = {2, 2, 1};\r
\r
#ifndef B2_SETTINGS_H\r
#define B2_SETTINGS_H\r
\r
-#include <cassert>\r
-#include <cmath>\r
-\r
#define B2_NOT_USED(x) ((void)(x))\r
-#define b2Assert(A) assert(A)\r
+#define b2Assert(A) jassert(A)\r
\r
typedef float float32;\r
typedef double float64;\r
\r
#include "b2Timer.h"\r
\r
-#if defined(_WIN32)\r
-\r
-float64 b2Timer::s_invFrequency = 0.0f;\r
-\r
-#include <windows.h>\r
-\r
-b2Timer::b2Timer()\r
-{\r
- LARGE_INTEGER largeInteger;\r
-\r
- if (s_invFrequency == 0.0f)\r
- {\r
- QueryPerformanceFrequency(&largeInteger);\r
- s_invFrequency = float64(largeInteger.QuadPart);\r
- if (s_invFrequency > 0.0f)\r
- {\r
- s_invFrequency = 1000.0f / s_invFrequency;\r
- }\r
- }\r
-\r
- QueryPerformanceCounter(&largeInteger);\r
- m_start = float64(largeInteger.QuadPart);\r
-}\r
-\r
-void b2Timer::Reset()\r
-{\r
- LARGE_INTEGER largeInteger;\r
- QueryPerformanceCounter(&largeInteger);\r
- m_start = float64(largeInteger.QuadPart);\r
-}\r
-\r
-float32 b2Timer::GetMilliseconds() const\r
-{\r
- LARGE_INTEGER largeInteger;\r
- QueryPerformanceCounter(&largeInteger);\r
- float64 count = float64(largeInteger.QuadPart);\r
- float32 ms = float32(s_invFrequency * (count - m_start));\r
- return ms;\r
-}\r
-\r
-#elif defined(__linux__) || defined (__APPLE__)\r
-\r
-#include <sys/time.h>\r
-\r
b2Timer::b2Timer()\r
{\r
Reset();\r
\r
void b2Timer::Reset()\r
{\r
- timeval t;\r
- gettimeofday(&t, 0);\r
- m_start_sec = t.tv_sec;\r
- m_start_msec = t.tv_usec * 0.001f;\r
-}\r
-\r
-float32 b2Timer::GetMilliseconds() const\r
-{\r
- timeval t;\r
- gettimeofday(&t, 0);\r
- return (t.tv_sec - m_start_sec) * 1000 + t.tv_usec * 0.001f - m_start_msec;\r
-}\r
-\r
-#else\r
-\r
-b2Timer::b2Timer()\r
-{\r
-}\r
-\r
-void b2Timer::Reset()\r
-{\r
+ juceStartTime = juce::Time::getCurrentTime();\r
}\r
\r
float32 b2Timer::GetMilliseconds() const\r
{\r
- return 0.0f;\r
+ return static_cast<float32> ((juce::Time::getCurrentTime() - juceStartTime).inMilliseconds());\r
}\r
-\r
-#endif\r
float32 GetMilliseconds() const;\r
\r
private:\r
-\r
-#if defined(_WIN32)\r
- float64 m_start;\r
- static float64 s_invFrequency;\r
-#elif defined(__linux__) || defined (__APPLE__)\r
- unsigned long m_start_sec;\r
- unsigned long m_start_msec;\r
-#endif\r
+ juce::Time juceStartTime;\r
};\r
\r
#endif\r
\r
#include "../Common/b2Math.h"\r
#include "../Collision/Shapes/b2Shape.h"\r
-#include <memory>\r
\r
class b2Fixture;\r
class b2Joint;\r
\r
#include "juce_box2d.h"\r
\r
-typedef juce::int8 int8;\r
-typedef juce::int16 int16;\r
-typedef juce::int32 int32;\r
-typedef juce::uint8 uint8;\r
-typedef juce::uint16 uint16;\r
-typedef juce::uint32 uint32;\r
+#include <cstdarg>\r
\r
+using int8 = juce::int8;\r
+using int16 = juce::int16;\r
+using int32 = juce::int32;\r
+using uint8 = juce::uint8;\r
+using uint16 = juce::uint16;\r
+using uint32 = juce::uint32;\r
\r
#include "box2d/Collision/b2BroadPhase.cpp"\r
#include "box2d/Collision/b2CollideCircle.cpp"\r
\r
ID: juce_box2d\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE wrapper for the Box2D physics engine\r
description: The Box2D physics engine and some utility classes.\r
website: http://www.juce.com/juce\r
#pragma GCC diagnostic ignored "-Wconversion"\r
#endif\r
\r
+#include <climits>\r
+#include <cfloat>\r
+\r
#include "box2d/Box2D.h"\r
\r
#ifdef __GNUC__\r
class Array\r
{\r
private:\r
- typedef typename TypeHelpers::ParameterType<ElementType>::type ParameterType;\r
+ using ParameterType = typename TypeHelpers::ParameterType<ElementType>::type;\r
\r
public:\r
//==============================================================================\r
addAssumingCapacityIsReady (static_cast<ElementType&&> (firstNewElement), otherElements...);\r
}\r
\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
template <typename TypeToCreateFrom>\r
Array (const std::initializer_list<TypeToCreateFrom>& items)\r
{\r
addArray (items);\r
}\r
- #endif\r
\r
/** Destructor. */\r
~Array()\r
}\r
}\r
\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
template <typename TypeToCreateFrom>\r
void addArray (const std::initializer_list<TypeToCreateFrom>& items)\r
{\r
++numUsed;\r
}\r
}\r
- #endif\r
\r
/** Adds elements from a null-terminated array of pointers to the end of this array.\r
\r
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return data; }\r
\r
/** Returns the type of scoped lock to use for locking this array */\r
- typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;\r
+ using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;\r
\r
\r
//==============================================================================\r
DynamicObject (const DynamicObject&);\r
~DynamicObject();\r
\r
- typedef ReferenceCountedObjectPtr<DynamicObject> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<DynamicObject>;\r
\r
//==============================================================================\r
/** Returns true if the object has a property with this name.\r
class DefaultElementComparator\r
{\r
private:\r
- typedef typename TypeHelpers::ParameterType<ElementType>::type ParameterType;\r
+ using ParameterType = typename TypeHelpers::ParameterType<ElementType>::type;\r
\r
public:\r
static int compareElements (ParameterType first, ParameterType second)\r
/** Generates a simple hash from a variant. */\r
static int generateHash (const var& key, int upperLimit) noexcept { return generateHash (key.toString(), upperLimit); }\r
/** Generates a simple hash from a void ptr. */\r
- static int generateHash (const void* key, int upperLimit) noexcept { return generateHash ((pointer_sized_uint) key, upperLimit); }\r
+ static int generateHash (const void* key, int upperLimit) noexcept { return generateHash ((uint64) (pointer_sized_uint) key, upperLimit); }\r
+ /** Generates a simple hash from a UUID. */\r
+ static int generateHash (const Uuid& key, int upperLimit) noexcept { return generateHash (key.hash(), upperLimit); }\r
};\r
\r
\r
class HashMap\r
{\r
private:\r
- typedef typename TypeHelpers::ParameterType<KeyType>::type KeyTypeParameter;\r
- typedef typename TypeHelpers::ParameterType<ValueType>::type ValueTypeParameter;\r
+ using KeyTypeParameter = typename TypeHelpers::ParameterType<KeyType>::type;\r
+ using ValueTypeParameter = typename TypeHelpers::ParameterType<ValueType>::type;\r
\r
public:\r
//==============================================================================\r
\r
while (h != nullptr)\r
{\r
- const ScopedPointer<HashEntry> deleter (h);\r
+ const std::unique_ptr<HashEntry> deleter (h);\r
h = h->nextEntry;\r
}\r
\r
{\r
if (entry->key == keyToRemove)\r
{\r
- const ScopedPointer<HashEntry> deleter (entry);\r
+ const std::unique_ptr<HashEntry> deleter (entry);\r
\r
entry = entry->nextEntry;\r
\r
{\r
if (entry->value == valueToRemove)\r
{\r
- const ScopedPointer<HashEntry> deleter (entry);\r
+ const std::unique_ptr<HashEntry> deleter (entry);\r
\r
entry = entry->nextEntry;\r
\r
template <typename Callback>\r
void call (Callback&& callback)\r
{\r
+ typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
for (Iterator<DummyBailOutChecker, ThisType> iter (*this); iter.next();)\r
callback (*iter.getListener());\r
}\r
template <typename Callback>\r
void callExcluding (ListenerClass* listenerToExclude, Callback&& callback)\r
{\r
+ typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
for (Iterator<DummyBailOutChecker, ThisType> iter (*this); iter.next();)\r
{\r
auto* l = iter.getListener();\r
template <typename Callback, typename BailOutCheckerType>\r
void callChecked (const BailOutCheckerType& bailOutChecker, Callback&& callback)\r
{\r
+ typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
for (Iterator<BailOutCheckerType, ThisType> iter (*this); iter.next (bailOutChecker);)\r
callback (*iter.getListener());\r
}\r
const BailOutCheckerType& bailOutChecker,\r
Callback&& callback)\r
{\r
+ typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
for (Iterator<BailOutCheckerType, ThisType> iter (*this); iter.next (bailOutChecker);)\r
{\r
auto* l = iter.getListener();\r
bool shouldBailOut() const noexcept { return false; }\r
};\r
\r
- typedef ListenerList<ListenerClass, ArrayType> ThisType;\r
- typedef ListenerClass ListenerType;\r
+ using ThisType = ListenerList<ListenerClass, ArrayType>;\r
+ using ListenerType = ListenerClass;\r
\r
//==============================================================================\r
/** Iterates the listeners in a ListenerList. */\r
template <typename... MethodArgs, typename... Args>\r
void call (void (ListenerClass::*callbackFunction) (MethodArgs...), Args&&... args)\r
{\r
+ typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
for (Iterator<DummyBailOutChecker, ThisType> iter (*this); iter.next();)\r
(iter.getListener()->*callbackFunction) (static_cast<typename TypeHelpers::ParameterType<Args>::type> (args)...);\r
}\r
void (ListenerClass::*callbackFunction) (MethodArgs...),\r
Args&&... args)\r
{\r
+ typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
for (Iterator<DummyBailOutChecker, ThisType> iter (*this); iter.next();)\r
if (iter.getListener() != listenerToExclude)\r
(iter.getListener()->*callbackFunction) (static_cast<typename TypeHelpers::ParameterType<Args>::type> (args)...);\r
void (ListenerClass::*callbackFunction) (MethodArgs...),\r
Args&&... args)\r
{\r
+ typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
for (Iterator<BailOutCheckerType, ThisType> iter (*this); iter.next (bailOutChecker);)\r
(iter.getListener()->*callbackFunction) (static_cast<typename TypeHelpers::ParameterType<Args>::type> (args)...);\r
}\r
void (ListenerClass::*callbackFunction) (MethodArgs...),\r
Args&&... args)\r
{\r
+ typename ArrayType::ScopedLockType lock (listeners.getLock());\r
+\r
for (Iterator<BailOutCheckerType, ThisType> iter (*this); iter.next (bailOutChecker);)\r
if (iter.getListener() != listenerToExclude)\r
(iter.getListener()->*callbackFunction) (static_cast<typename TypeHelpers::ParameterType<Args>::type> (args)...);\r
deleteAllObjects();\r
}\r
\r
- /** Move constructor */\r
+ /** Move constructor. */\r
OwnedArray (OwnedArray&& other) noexcept\r
: data (static_cast<ArrayAllocationBase <ObjectClass*, TypeOfCriticalSectionToUse>&&> (other.data)),\r
numUsed (other.numUsed)\r
other.numUsed = 0;\r
}\r
\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
+ /** Creates an array from a list of objects. */\r
OwnedArray (const std::initializer_list<ObjectClass*>& items)\r
{\r
addArray (items);\r
}\r
- #endif\r
\r
- /** Move assignment operator */\r
+ /** Move assignment operator. */\r
OwnedArray& operator= (OwnedArray&& other) noexcept\r
{\r
const ScopedLockType lock (getLock());\r
{\r
if (indexToChange >= 0)\r
{\r
- ScopedPointer<ObjectClass> toDelete;\r
+ std::unique_ptr<ObjectClass> toDelete;\r
\r
{\r
const ScopedLockType lock (getLock());\r
}\r
}\r
\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
+ /** Adds elements from another array to the end of this array. */\r
template <typename OtherArrayType>\r
void addArray (const std::initializer_list<OtherArrayType>& items)\r
{\r
++numUsed;\r
}\r
}\r
- #endif\r
\r
/** Adds copies of the elements in another array to the end of this array.\r
\r
*/\r
void remove (int indexToRemove, bool deleteObject = true)\r
{\r
- ScopedPointer<ObjectClass> toDelete;\r
+ std::unique_ptr<ObjectClass> toDelete;\r
\r
{\r
const ScopedLockType lock (getLock());\r
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return data; }\r
\r
/** Returns the type of scoped lock to use for locking this array */\r
- typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;\r
+ using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;\r
\r
\r
//==============================================================================\r
class ReferenceCountedArray\r
{\r
public:\r
- typedef ReferenceCountedObjectPtr<ObjectClass> ObjectClassPtr;\r
+ using ObjectClassPtr = ReferenceCountedObjectPtr<ObjectClass>;\r
\r
//==============================================================================\r
/** Creates an empty array.\r
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return data; }\r
\r
/** Returns the type of scoped lock to use for locking this array */\r
- typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;\r
+ using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;\r
\r
\r
//==============================================================================\r
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return data.getLock(); }\r
\r
/** Returns the type of scoped lock to use for locking this array */\r
- typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;\r
+ using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;\r
\r
\r
private:\r
--- /dev/null
+/*\r
+ ==============================================================================\r
+\r
+ This file is part of the JUCE library.\r
+ Copyright (c) 2018 - ROLI Ltd.\r
+\r
+ JUCE is an open source library subject to commercial or open-source\r
+ licensing.\r
+\r
+ The code included in this file is provided under the terms of the ISC license\r
+ http://www.isc.org/downloads/software-support-policy/isc-license. Permission\r
+ To use, copy, modify, and/or distribute this software for any purpose with or\r
+ without fee is hereby granted provided that the above copyright notice and\r
+ this permission notice appear in all copies.\r
+\r
+ JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r
+ EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r
+ DISCLAIMED.\r
+\r
+ ==============================================================================\r
+*/\r
+\r
+namespace juce\r
+{\r
+\r
+#if JUCE_UNIT_TESTS\r
+\r
+class SparseSetTests : public UnitTest\r
+{\r
+public:\r
+ SparseSetTests() : UnitTest ("SparseSet class", "Containers") {}\r
+\r
+ void runTest() override\r
+ {\r
+ beginTest ("basic operations");\r
+ {\r
+ SparseSet<int> set;\r
+\r
+ expect (set.isEmpty());\r
+ expectEquals (set.size(), 0);\r
+ expectEquals (set.getNumRanges(), 0);\r
+ expect (set.getTotalRange().isEmpty());\r
+\r
+ set.addRange ({0, 10});\r
+ expect (! set.isEmpty());\r
+ expectEquals (set.size(), 10);\r
+ expectEquals (set.getNumRanges(), 1);\r
+ expect (! set.getTotalRange().isEmpty());\r
+ expect (set.getRange (0) == Range<int> (0, 10));\r
+\r
+ expectEquals (set[0], 0);\r
+ expectEquals (set[5], 5);\r
+ expectEquals (set[9], 9);\r
+ // Index out of range yields a default value for a type\r
+ expectEquals (set[10], 0);\r
+ expect (set.contains (0));\r
+ expect (set.contains (9));\r
+ expect (! set.contains (10));\r
+ }\r
+\r
+ beginTest ("adding ranges");\r
+ {\r
+ SparseSet<int> set;\r
+\r
+ // Adding same range twice should yield just a single range\r
+ set.addRange ({0, 10});\r
+ set.addRange ({0, 10});\r
+ expectEquals (set.getNumRanges(), 1);\r
+ expect (set.getRange (0) == Range<int> (0, 10));\r
+\r
+ // Adding already included range does not increase num ranges\r
+ set.addRange ({0, 2});\r
+ expectEquals (set.getNumRanges(), 1);\r
+ set.addRange ({8, 10});\r
+ expectEquals (set.getNumRanges(), 1);\r
+ set.addRange ({2, 5});\r
+ expectEquals (set.getNumRanges(), 1);\r
+\r
+ // Adding non adjacent range includes total number of ranges\r
+ set.addRange ({-10, -5});\r
+ expectEquals (set.getNumRanges(), 2);\r
+ expect (set.getRange (0) == Range<int> (-10, -5));\r
+ expect (set.getRange (1) == Range<int> (0, 10));\r
+ expect (set.getTotalRange() == Range<int> (-10, 10));\r
+\r
+ set.addRange ({15, 20});\r
+ expectEquals (set.getNumRanges(), 3);\r
+ expect (set.getRange (0) == Range<int> (-10, -5));\r
+ expect (set.getRange (1) == Range<int> (0, 10));\r
+ expect (set.getRange (2) == Range<int> (15, 20));\r
+ expect (set.getTotalRange() == Range<int> (-10, 20));\r
+\r
+ // Adding adjacent ranges merges them.\r
+ set.addRange ({-5, -3});\r
+ expectEquals (set.getNumRanges(), 3);\r
+ expect (set.getRange (0) == Range<int> (-10, -3));\r
+ expect (set.getRange (1) == Range<int> (0, 10));\r
+ expect (set.getRange (2) == Range<int> (15, 20));\r
+ expect (set.getTotalRange() == Range<int> (-10, 20));\r
+\r
+ set.addRange ({20, 25});\r
+ expectEquals (set.getNumRanges(), 3);\r
+ expect (set.getRange (0) == Range<int> (-10, -3));\r
+ expect (set.getRange (1) == Range<int> (0, 10));\r
+ expect (set.getRange (2) == Range<int> (15, 25));\r
+ expect (set.getTotalRange() == Range<int> (-10, 25));\r
+\r
+ // Adding range containing other ranges merges them\r
+ set.addRange ({-50, 50});\r
+ expectEquals (set.getNumRanges(), 1);\r
+ expect (set.getRange (0) == Range<int> (-50, 50));\r
+ expect (set.getTotalRange() == Range<int> (-50, 50));\r
+ }\r
+\r
+ beginTest ("removing ranges");\r
+ {\r
+ SparseSet<int> set;\r
+\r
+ set.addRange ({-20, -10});\r
+ set.addRange ({0, 10});\r
+ set.addRange ({20, 30});\r
+ expectEquals (set.getNumRanges(), 3);\r
+\r
+ // Removing ranges not included in the set has no effect\r
+ set.removeRange ({-5, 5});\r
+ expectEquals (set.getNumRanges(), 3);\r
+\r
+ // Removing partially overlapping range\r
+ set.removeRange ({-15, 5});\r
+ expectEquals (set.getNumRanges(), 3);\r
+ expect (set.getRange (0) == Range<int> (-20, -15));\r
+ expect (set.getRange (1) == Range<int> (5, 10));\r
+ expect (set.getRange (2) == Range<int> (20, 30));\r
+\r
+ // Removing subrange of existing range\r
+ set.removeRange ({20, 22});\r
+ expectEquals (set.getNumRanges(), 3);\r
+ expect (set.getRange (2) == Range<int> (22, 30));\r
+\r
+ set.removeRange ({28, 30});\r
+ expectEquals (set.getNumRanges(), 3);\r
+ expect (set.getRange (2) == Range<int> (22, 28));\r
+\r
+ set.removeRange ({24, 26});\r
+ expectEquals (set.getNumRanges(), 4);\r
+ expect (set.getRange (0) == Range<int> (-20, -15));\r
+ expect (set.getRange (1) == Range<int> (5, 10));\r
+ expect (set.getRange (2) == Range<int> (22, 24));\r
+ expect (set.getRange (3) == Range<int> (26, 28));\r
+ }\r
+\r
+ beginTest ("XORing ranges");\r
+ {\r
+ SparseSet<int> set;\r
+ set.addRange ({0, 10});\r
+\r
+ set.invertRange ({0, 10});\r
+ expectEquals (set.getNumRanges(), 0);\r
+ set.invertRange ({0, 10});\r
+ expectEquals (set.getNumRanges(), 1);\r
+\r
+ set.invertRange ({4, 6});\r
+ expectEquals (set.getNumRanges(), 2);\r
+ expect (set.getRange (0) == Range<int> (0, 4));\r
+ expect (set.getRange (1) == Range<int> (6, 10));\r
+\r
+ set.invertRange ({-2, 2});\r
+ expectEquals (set.getNumRanges(), 3);\r
+ expect (set.getRange (0) == Range<int> (-2, 0));\r
+ expect (set.getRange (1) == Range<int> (2, 4));\r
+ expect (set.getRange (2) == Range<int> (6, 10));\r
+ }\r
+\r
+ beginTest ("range contains & overlaps checks");\r
+ {\r
+ SparseSet<int> set;\r
+ set.addRange ({0, 10});\r
+\r
+ expect (set.containsRange (Range<int> (0, 2)));\r
+ expect (set.containsRange (Range<int> (8, 10)));\r
+ expect (set.containsRange (Range<int> (0, 10)));\r
+\r
+ expect (! set.containsRange (Range<int> (-2, 0)));\r
+ expect (! set.containsRange (Range<int> (-2, 10)));\r
+ expect (! set.containsRange (Range<int> (10, 12)));\r
+ expect (! set.containsRange (Range<int> (0, 12)));\r
+\r
+ expect (set.overlapsRange (Range<int> (0, 2)));\r
+ expect (set.overlapsRange (Range<int> (8, 10)));\r
+ expect (set.overlapsRange (Range<int> (0, 10)));\r
+\r
+ expect (! set.overlapsRange (Range<int> (-2, 0)));\r
+ expect ( set.overlapsRange (Range<int> (-2, 10)));\r
+ expect (! set.overlapsRange (Range<int> (10, 12)));\r
+ expect ( set.overlapsRange (Range<int> (0, 12)));\r
+ }\r
+ }\r
+};\r
+\r
+static SparseSetTests sparseSetTests;\r
+\r
+#endif\r
+\r
+} // namespace juce\r
if (r.getStart() >= rangeToRemove.getEnd())\r
continue;\r
\r
- if (r.contains (rangeToRemove))\r
+ if (rangeToRemove.contains (r))\r
{\r
- auto start = r.withEnd (rangeToRemove.getStart());\r
- r.setStart (rangeToRemove.getEnd());\r
- ranges.insert (i, start);\r
+ ranges.remove (i);\r
}\r
- else if (rangeToRemove.contains (r))\r
+ else if (r.contains (rangeToRemove))\r
{\r
- ranges.remove (i);\r
+ auto r1 = r.withEnd (rangeToRemove.getStart());\r
+ auto r2 = r.withStart (rangeToRemove.getEnd());\r
+\r
+ // this should be covered in if (rangeToRemove.contains (r))\r
+ jassert (! r1.isEmpty() || ! r2.isEmpty());\r
+\r
+ r = r1;\r
+\r
+ if (r.isEmpty())\r
+ r = r2;\r
+\r
+ if (! r1.isEmpty() && ! r2.isEmpty())\r
+ ranges.insert (i + 1, r2);\r
}\r
- else if (rangeToRemove.getEnd() > r.getStart())\r
+ else if (rangeToRemove.getEnd() > r.getEnd())\r
{\r
- r.setStart (rangeToRemove.getEnd());\r
+ r.setEnd (rangeToRemove.getStart());\r
}\r
else\r
{\r
- r.setEnd (rangeToRemove.getStart());\r
+ r.setStart (rangeToRemove.getEnd());\r
}\r
}\r
}\r
var::var (const VariantType& t) noexcept : type (&t) {}\r
var::~var() noexcept { type->cleanUp (value); }\r
\r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const var var::null;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const var var::null);\r
\r
//==============================================================================\r
var::var (const var& valueToCopy) : type (valueToCopy.type)\r
*/\r
static var readFromStream (InputStream& input);\r
\r
- #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
- /** This was a static empty var object, but is now deprecated as it's too easy to accidentally\r
- use it indirectly during a static constructor, leading to hard-to-find order-of-initialisation\r
- problems.\r
- @deprecated If you need a default-constructed var, just use var() or {}.\r
- The only time you might miss having var::null available might be if you need to return an\r
- empty var from a function by reference, but if you need to do that, it's easy enough to use\r
- a function-local static var and return that, avoiding any order-of-initialisation issues.\r
+ /* This was a static empty var object, but is now deprecated as it's too easy to accidentally\r
+ use it indirectly during a static constructor, leading to hard-to-find order-of-initialisation\r
+ problems.\r
+ @deprecated If you need a default-constructed var, just use var() or {}.\r
+ The only time you might miss having var::null available might be if you need to return an\r
+ empty var from a function by reference, but if you need to do that, it's easy enough to use\r
+ a function-local static var and return that, avoiding any order-of-initialisation issues.\r
*/\r
- static const var null;\r
- #endif\r
+ JUCE_DEPRECATED_STATIC (static const var null);\r
\r
private:\r
//==============================================================================\r
private:\r
friend class DirectoryIterator;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NativeIterator)\r
};\r
const int whatToLookFor;\r
const bool isRecursive;\r
bool hasBeenAdvanced = false;\r
- ScopedPointer<DirectoryIterator> subIterator;\r
+ std::unique_ptr<DirectoryIterator> subIterator;\r
File currentFile;\r
\r
static StringArray parseWildcards (const String& pattern);\r
return *this;\r
}\r
\r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const File File::nonexistent;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const File File::nonexistent);\r
\r
//==============================================================================\r
static String removeEllipsis (const String& path)\r
//==============================================================================\r
FileInputStream* File::createInputStream() const\r
{\r
- ScopedPointer<FileInputStream> fin (new FileInputStream (*this));\r
+ std::unique_ptr<FileInputStream> fin (new FileInputStream (*this));\r
\r
if (fin->openedOk())\r
return fin.release();\r
\r
FileOutputStream* File::createOutputStream (size_t bufferSize) const\r
{\r
- ScopedPointer<FileOutputStream> out (new FileOutputStream (*this, bufferSize));\r
+ std::unique_ptr<FileOutputStream> out (new FileOutputStream (*this, bufferSize));\r
\r
return out->failedToOpen() ? nullptr\r
: out.release();\r
return tempFile.overwriteTargetFileWithTemporary();\r
}\r
\r
-bool File::appendText (const String& text,\r
- const bool asUnicode,\r
- const bool writeUnicodeHeaderBytes) const\r
+bool File::appendText (const String& text, bool asUnicode, bool writeHeaderBytes, const char* lineFeed) const\r
{\r
FileOutputStream out (*this);\r
\r
if (out.failedToOpen())\r
return false;\r
\r
- return out.writeText (text, asUnicode, writeUnicodeHeaderBytes);\r
+ return out.writeText (text, asUnicode, writeHeaderBytes, lineFeed);\r
}\r
\r
-bool File::replaceWithText (const String& textToWrite,\r
- const bool asUnicode,\r
- const bool writeUnicodeHeaderBytes) const\r
+bool File::replaceWithText (const String& textToWrite, bool asUnicode, bool writeHeaderBytes, const char* lineFeed) const\r
{\r
TemporaryFile tempFile (*this, TemporaryFile::useHiddenFile);\r
- tempFile.getFile().appendText (textToWrite, asUnicode, writeUnicodeHeaderBytes);\r
+ tempFile.getFile().appendText (textToWrite, asUnicode, writeHeaderBytes, lineFeed);\r
return tempFile.overwriteTargetFileWithTemporary();\r
}\r
\r
nativePathOfTarget.toWideCharPointer(),\r
targetFile.isDirectory() ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0) != FALSE;\r
#else\r
+ ignoreUnused (nativePathOfTarget);\r
jassertfalse; // symbolic links not supported on this platform!\r
return false;\r
#endif\r
It can also write the 'ff fe' unicode header bytes before the text to indicate\r
the endianness of the file.\r
\r
- Any single \\n characters in the string are replaced with \\r\\n before it is written.\r
+ If lineEndings is nullptr, then line endings in the text won't be modified. If you\r
+ pass "\\n" or "\\r\\n" then this function will replace any existing line feeds.\r
\r
@see replaceWithText\r
*/\r
bool appendText (const String& textToAppend,\r
bool asUnicode = false,\r
- bool writeUnicodeHeaderBytes = false) const;\r
+ bool writeUnicodeHeaderBytes = false,\r
+ const char* lineEndings = "\r\n") const;\r
\r
/** Replaces this file's contents with a given text string.\r
\r
*/\r
bool replaceWithText (const String& textToWrite,\r
bool asUnicode = false,\r
- bool writeUnicodeHeaderBytes = false) const;\r
+ bool writeUnicodeHeaderBytes = false,\r
+ const char* lineEndings = "\r\n") const;\r
\r
/** Attempts to scan the contents of this file and compare it to another file, returning\r
true if this is possible and they match byte-for-byte.\r
bool foldersFirst;\r
};\r
\r
- #if (! defined(DOXYGEN)) && (! defined (JUCE_GCC))\r
- // Deprecated: use File::getSeparatorChar() and File::getSeparatorString() instead!\r
- JUCE_DEPRECATED (static const juce_wchar separator);\r
- JUCE_DEPRECATED (static const StringRef separatorString);\r
- #endif\r
-\r
- //==============================================================================\r
- #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
- /** This was a static empty File object, but is now deprecated as it's too easy to accidentally\r
- use it indirectly during a static constructor, leading to hard-to-find order-of-initialisation\r
- problems.\r
- @deprecated If you need a default-constructed File object, just use File() or {}.\r
+ /* These static objects are deprecated because it's too easy to accidentally use them indirectly\r
+ during a static constructor, which leads to very obscure order-of-initialisation bugs.\r
+ Use File::getSeparatorChar() and File::getSeparatorString(), and instead of File::nonexistent,\r
+ just use File() or {}.\r
*/\r
- static const File nonexistent;\r
- #endif\r
+ JUCE_DEPRECATED_STATIC (static const juce_wchar separator);\r
+ JUCE_DEPRECATED_STATIC (static const StringRef separatorString);\r
+ JUCE_DEPRECATED_STATIC (static const File nonexistent);\r
\r
private:\r
//==============================================================================\r
TemporaryFile temp (myTargetFile);\r
\r
// create a stream to the temporary file, and write some data to it...\r
- ScopedPointer<FileOutputStream> out (temp.getFile().createOutputStream());\r
+ std::unique_ptr<FileOutputStream> out (temp.getFile().createOutputStream());\r
\r
if (out != nullptr)\r
{\r
\r
Time timeout;\r
\r
- typedef const var::NativeFunctionArgs& Args;\r
- typedef const char* TokenType;\r
+ using Args = const var::NativeFunctionArgs&;\r
+ using TokenType = const char*;\r
\r
void execute (const String& code)\r
{\r
ExpressionTreeBuilder tb (code);\r
- ScopedPointer<BlockStatement> (tb.parseStatementList())->perform (Scope (nullptr, this, this), nullptr);\r
+ std::unique_ptr<BlockStatement> (tb.parseStatementList())->perform (Scope (nullptr, this, this), nullptr);\r
}\r
\r
var evaluate (const String& code)\r
ResultCode perform (const Scope& s, var*) const override { getResult (s); return ok; }\r
};\r
\r
- typedef ScopedPointer<Expression> ExpPtr;\r
+ using ExpPtr = std::unique_ptr<Expression>;\r
\r
struct BlockStatement : public Statement\r
{\r
}\r
\r
ExpPtr condition;\r
- ScopedPointer<Statement> trueBranch, falseBranch;\r
+ std::unique_ptr<Statement> trueBranch, falseBranch;\r
};\r
\r
struct VarStatement : public Statement\r
return ok;\r
}\r
\r
- ScopedPointer<Statement> initialiser, iterator, body;\r
+ std::unique_ptr<Statement> initialiser, iterator, body;\r
ExpPtr condition;\r
bool isDoLoop;\r
};\r
struct DivideOp : public BinaryOperator\r
{\r
DivideOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::divide) {}\r
- var getWithDoubles (double a, double b) const override { return b != 0.0 ? a / b : std::numeric_limits<double>::infinity(); }\r
- var getWithInts (int64 a, int64 b) const override { return b != 0 ? var (a / (double) b) : var (std::numeric_limits<double>::infinity()); }\r
+ var getWithDoubles (double a, double b) const override { return b != 0 ? a / b : std::numeric_limits<double>::infinity(); }\r
+ var getWithInts (int64 a, int64 b) const override { return b != 0 ? var (a / (double) b) : var (std::numeric_limits<double>::infinity()); }\r
};\r
\r
struct ModuloOp : public BinaryOperator\r
{\r
ModuloOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::modulo) {}\r
- var getWithInts (int64 a, int64 b) const override { return b != 0 ? var (a % b) : var (std::numeric_limits<double>::infinity()); }\r
+ var getWithDoubles (double a, double b) const override { return b != 0 ? fmod (a, b) : std::numeric_limits<double>::infinity(); }\r
+ var getWithInts (int64 a, int64 b) const override { return b != 0 ? var (a % b) : var (std::numeric_limits<double>::infinity()); }\r
};\r
\r
struct BitwiseOrOp : public BinaryOperator\r
\r
String functionCode;\r
Array<Identifier> parameters;\r
- ScopedPointer<Statement> body;\r
+ std::unique_ptr<Statement> body;\r
};\r
\r
//==============================================================================\r
\r
BlockStatement* parseStatementList()\r
{\r
- ScopedPointer<BlockStatement> b (new BlockStatement (location));\r
+ std::unique_ptr<BlockStatement> b (new BlockStatement (location));\r
\r
while (currentType != TokenTypes::closeBrace && currentType != TokenTypes::eof)\r
b->statements.add (parseStatement());\r
BlockStatement* parseBlock()\r
{\r
match (TokenTypes::openBrace);\r
- ScopedPointer<BlockStatement> b (parseStatementList());\r
+ std::unique_ptr<BlockStatement> b (parseStatementList());\r
match (TokenTypes::closeBrace);\r
return b.release();\r
}\r
\r
Statement* parseIf()\r
{\r
- ScopedPointer<IfStatement> s (new IfStatement (location));\r
+ std::unique_ptr<IfStatement> s (new IfStatement (location));\r
match (TokenTypes::openParen);\r
s->condition.reset (parseExpression());\r
match (TokenTypes::closeParen);\r
\r
Statement* parseVar()\r
{\r
- ScopedPointer<VarStatement> s (new VarStatement (location));\r
+ std::unique_ptr<VarStatement> s (new VarStatement (location));\r
s->name = parseIdentifier();\r
s->initialiser.reset (matchIf (TokenTypes::assign) ? parseExpression() : new Expression (location));\r
\r
if (matchIf (TokenTypes::comma))\r
{\r
- ScopedPointer<BlockStatement> block (new BlockStatement (location));\r
+ std::unique_ptr<BlockStatement> block (new BlockStatement (location));\r
block->statements.add (s.release());\r
block->statements.add (parseVar());\r
return block.release();\r
\r
Statement* parseForLoop()\r
{\r
- ScopedPointer<LoopStatement> s (new LoopStatement (location, false));\r
+ std::unique_ptr<LoopStatement> s (new LoopStatement (location, false));\r
match (TokenTypes::openParen);\r
s->initialiser.reset (parseStatement());\r
\r
\r
Statement* parseDoOrWhileLoop (bool isDoLoop)\r
{\r
- ScopedPointer<LoopStatement> s (new LoopStatement (location, isDoLoop));\r
+ std::unique_ptr<LoopStatement> s (new LoopStatement (location, isDoLoop));\r
s->initialiser.reset (new Statement (location));\r
s->iterator.reset (new Statement (location));\r
\r
if (currentType == TokenTypes::identifier)\r
functionName = parseIdentifier();\r
\r
- ScopedPointer<FunctionObject> fo (new FunctionObject());\r
+ std::unique_ptr<FunctionObject> fo (new FunctionObject());\r
parseFunctionParamsAndBody (*fo);\r
fo->functionCode = String (functionStart, location.location);\r
return var (fo.release());\r
\r
Expression* parseFunctionCall (FunctionCall* call, ExpPtr& function)\r
{\r
- ScopedPointer<FunctionCall> s (call);\r
+ std::unique_ptr<FunctionCall> s (call);\r
s->object.reset (function.release());\r
match (TokenTypes::openParen);\r
\r
\r
if (matchIf (TokenTypes::openBracket))\r
{\r
- ScopedPointer<ArraySubscript> s (new ArraySubscript (location));\r
+ std::unique_ptr<ArraySubscript> s (new ArraySubscript (location));\r
s->object.reset (input.release());\r
s->index.reset (parseExpression());\r
match (TokenTypes::closeBracket);\r
\r
if (matchIf (TokenTypes::openBrace))\r
{\r
- ScopedPointer<ObjectDeclaration> e (new ObjectDeclaration (location));\r
+ std::unique_ptr<ObjectDeclaration> e (new ObjectDeclaration (location));\r
\r
while (currentType != TokenTypes::closeBrace)\r
{\r
\r
if (matchIf (TokenTypes::openBracket))\r
{\r
- ScopedPointer<ArrayDeclaration> e (new ArrayDeclaration (location));\r
+ std::unique_ptr<ArrayDeclaration> e (new ArrayDeclaration (location));\r
\r
while (currentType != TokenTypes::closeBracket)\r
{\r
\r
Expression* parseTypeof()\r
{\r
- ScopedPointer<FunctionCall> f (new FunctionCall (location));\r
+ std::unique_ptr<FunctionCall> f (new FunctionCall (location));\r
f->object.reset (new UnqualifiedName (location, "typeof"));\r
f->arguments.add (parseUnary());\r
return f.release();\r
\r
Expression* parseTernaryOperator (ExpPtr& condition)\r
{\r
- ScopedPointer<ConditionalOp> e (new ConditionalOp (location));\r
+ std::unique_ptr<ConditionalOp> e (new ConditionalOp (location));\r
e->condition.reset (condition.release());\r
e->trueBranch.reset (parseExpression());\r
match (TokenTypes::colon);\r
#include "containers/juce_AbstractFifo.cpp"\r
#include "containers/juce_NamedValueSet.cpp"\r
#include "containers/juce_PropertySet.cpp"\r
+#include "containers/juce_SparseSet.cpp"\r
#include "containers/juce_Variant.cpp"\r
#include "files/juce_DirectoryIterator.cpp"\r
#include "files/juce_File.cpp"\r
\r
ID: juce_core\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE core classes\r
description: The essential set of basic JUCE classes, as required by all the other JUCE modules. Includes text, container, memory, threading and i/o functionality.\r
website: http://www.juce.com/juce\r
#include "text/juce_LocalisedStrings.h"\r
#include "text/juce_Base64.h"\r
#include "misc/juce_Result.h"\r
+#include "misc/juce_Uuid.h"\r
#include "containers/juce_Variant.h"\r
#include "containers/juce_NamedValueSet.h"\r
#include "containers/juce_DynamicObject.h"\r
#include "maths/juce_Expression.h"\r
#include "maths/juce_Random.h"\r
#include "misc/juce_RuntimePermissions.h"\r
-#include "misc/juce_Uuid.h"\r
#include "misc/juce_WindowsRegistry.h"\r
#include "threads/juce_ChildProcess.h"\r
#include "threads/juce_DynamicLibrary.h"\r
//==============================================================================\r
struct Expression::Helpers\r
{\r
- typedef ReferenceCountedObjectPtr<Term> TermPtr;\r
+ using TermPtr = ReferenceCountedObjectPtr<Term>;\r
\r
- static void checkRecursionDepth (const int depth)\r
+ static void checkRecursionDepth (int depth)\r
{\r
if (depth > 256)\r
throw EvaluationError ("Recursive symbol references");\r
if (readOperator ("(")) // method call...\r
{\r
Function* const f = new Function (identifier);\r
- ScopedPointer<Term> func (f); // (can't use ScopedPointer<Function> in MSVC)\r
+ std::unique_ptr<Term> func (f); // (can't use std::unique_ptr<Function> in MSVC)\r
\r
TermPtr param (readExpression());\r
\r
\r
Expression Expression::adjustedToGiveNewResult (const double targetValue, const Expression::Scope& scope) const\r
{\r
- ScopedPointer<Term> newTerm (term->clone());\r
+ std::unique_ptr<Term> newTerm (term->clone());\r
\r
Helpers::Constant* termToAdjust = Helpers::findTermToAdjust (newTerm.get(), true);\r
\r
// Definitions for the int8, int16, int32, int64 and pointer_sized_int types.\r
\r
/** A platform-independent 8-bit signed integer type. */\r
-typedef signed char int8;\r
+using int8 = signed char;\r
/** A platform-independent 8-bit unsigned integer type. */\r
-typedef unsigned char uint8;\r
+using uint8 = unsigned char;\r
/** A platform-independent 16-bit signed integer type. */\r
-typedef signed short int16;\r
+using int16 = signed short;\r
/** A platform-independent 16-bit unsigned integer type. */\r
-typedef unsigned short uint16;\r
+using uint16 = unsigned short;\r
/** A platform-independent 32-bit signed integer type. */\r
-typedef signed int int32;\r
+using int32 = signed int;\r
/** A platform-independent 32-bit unsigned integer type. */\r
typedef unsigned int uint32;\r
\r
#if JUCE_MSVC\r
/** A platform-independent 64-bit integer type. */\r
- typedef __int64 int64;\r
+ using int64 = __int64;\r
/** A platform-independent 64-bit unsigned integer type. */\r
- typedef unsigned __int64 uint64;\r
+ using uint64 = unsigned __int64;\r
#else\r
/** A platform-independent 64-bit integer type. */\r
- typedef long long int64;\r
+ using int64 = long long;\r
/** A platform-independent 64-bit unsigned integer type. */\r
- typedef unsigned long long uint64;\r
+ using uint64 = unsigned long long;\r
#endif\r
\r
#ifndef DOXYGEN\r
\r
#if JUCE_64BIT\r
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
- typedef int64 pointer_sized_int;\r
+ using pointer_sized_int = int64;\r
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
- typedef uint64 pointer_sized_uint;\r
+ using pointer_sized_uint = uint64;\r
#elif JUCE_MSVC\r
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
- typedef _W64 int pointer_sized_int;\r
+ using pointer_sized_int = _W64 int;\r
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
- typedef _W64 unsigned int pointer_sized_uint;\r
+ using pointer_sized_uint = _W64 unsigned int;\r
#else\r
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
- typedef int pointer_sized_int;\r
+ using pointer_sized_int = int;\r
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */\r
- typedef unsigned int pointer_sized_uint;\r
+ using pointer_sized_uint = unsigned int;\r
#endif\r
\r
#if JUCE_WINDOWS && ! JUCE_MINGW\r
- typedef pointer_sized_int ssize_t;\r
+ using ssize_t = pointer_sized_int;\r
#endif\r
\r
//==============================================================================\r
\r
@tags{Core}\r
*/\r
- template <typename Type> struct ParameterType { typedef const Type& type; };\r
+ template <typename Type> struct ParameterType { using type = const Type&; };\r
\r
#if ! DOXYGEN\r
- template <typename Type> struct ParameterType <Type&> { typedef Type& type; };\r
- template <typename Type> struct ParameterType <Type*> { typedef Type* type; };\r
- template <> struct ParameterType <char> { typedef char type; };\r
- template <> struct ParameterType <unsigned char> { typedef unsigned char type; };\r
- template <> struct ParameterType <short> { typedef short type; };\r
- template <> struct ParameterType <unsigned short> { typedef unsigned short type; };\r
- template <> struct ParameterType <int> { typedef int type; };\r
- template <> struct ParameterType <unsigned int> { typedef unsigned int type; };\r
- template <> struct ParameterType <long> { typedef long type; };\r
- template <> struct ParameterType <unsigned long> { typedef unsigned long type; };\r
- template <> struct ParameterType <int64> { typedef int64 type; };\r
- template <> struct ParameterType <uint64> { typedef uint64 type; };\r
- template <> struct ParameterType <bool> { typedef bool type; };\r
- template <> struct ParameterType <float> { typedef float type; };\r
- template <> struct ParameterType <double> { typedef double type; };\r
+ template <typename Type> struct ParameterType <Type&> { using type = Type&; };\r
+ template <typename Type> struct ParameterType <Type*> { using type = Type*; };\r
+ template <> struct ParameterType <char> { using type = char; };\r
+ template <> struct ParameterType <unsigned char> { using type = unsigned char; };\r
+ template <> struct ParameterType <short> { using type = short; };\r
+ template <> struct ParameterType <unsigned short> { using type = unsigned short; };\r
+ template <> struct ParameterType <int> { using type = int; };\r
+ template <> struct ParameterType <unsigned int> { using type = unsigned int; };\r
+ template <> struct ParameterType <long> { using type = long; };\r
+ template <> struct ParameterType <unsigned long> { using type = unsigned long; };\r
+ template <> struct ParameterType <int64> { using type = int64; };\r
+ template <> struct ParameterType <uint64> { using type = uint64; };\r
+ template <> struct ParameterType <bool> { using type = bool; };\r
+ template <> struct ParameterType <float> { using type = float; };\r
+ template <> struct ParameterType <double> { using type = double; };\r
#endif\r
\r
/** These templates are designed to take a type, and if it's a double, they return a double\r
\r
@tags{Core}\r
*/\r
- template <typename Type> struct SmallestFloatType { typedef float type; };\r
+ template <typename Type> struct SmallestFloatType { using type = float; };\r
\r
#if ! DOXYGEN\r
- template <> struct SmallestFloatType <double> { typedef double type; };\r
+ template <> struct SmallestFloatType <double> { using type = double; };\r
#endif\r
\r
/** These templates are designed to take an integer type, and return an unsigned int\r
template <int bytes> struct UnsignedTypeWithSize {};\r
\r
#if ! DOXYGEN\r
- template <> struct UnsignedTypeWithSize<1> { typedef uint8 type; };\r
- template <> struct UnsignedTypeWithSize<2> { typedef uint16 type; };\r
- template <> struct UnsignedTypeWithSize<4> { typedef uint32 type; };\r
- template <> struct UnsignedTypeWithSize<8> { typedef uint64 type; };\r
+ template <> struct UnsignedTypeWithSize<1> { using type = uint8; };\r
+ template <> struct UnsignedTypeWithSize<2> { using type = uint16; };\r
+ template <> struct UnsignedTypeWithSize<4> { using type = uint32; };\r
+ template <> struct UnsignedTypeWithSize<8> { using type = uint64; };\r
#endif\r
}\r
\r
{\r
auto clampedValue = jlimit (static_cast<ValueType> (0), static_cast<ValueType> (1), value);\r
\r
- // If you his this assertion then either your normalisation function is not working\r
+ // If you hit this assertion then either your normalisation function is not working\r
// correctly or your input is out of the expected bounds.\r
jassert (clampedValue == value);\r
\r
return clampedValue;\r
}\r
\r
- typedef std::function<ValueType(ValueType, ValueType, ValueType)> ConverstionFunction;\r
+ using ConverstionFunction = std::function<ValueType(ValueType, ValueType, ValueType)>;\r
+\r
ConverstionFunction convertFrom0To1Function = {},\r
convertTo0To1Function = {},\r
snapToLegalValueFunction = {};\r
#ifndef DOXYGEN\r
namespace AtomicHelpers\r
{\r
- template <typename T> struct DiffTypeHelper { typedef T Type; };\r
- template <typename T> struct DiffTypeHelper<T*> { typedef std::ptrdiff_t Type; };\r
+ template <typename T> struct DiffTypeHelper { using Type = T; };\r
+ template <typename T> struct DiffTypeHelper<T*> { using Type = std::ptrdiff_t; };\r
}\r
#endif\r
\r
-#if JUCE_ATOMIC_AVAILABLE\r
- //==============================================================================\r
- /**\r
- A simple wrapper around std::atomic.\r
+//==============================================================================\r
+/**\r
+ A simple wrapper around std::atomic.\r
\r
- @tags{Core}\r
- */\r
- template <typename Type>\r
- struct Atomic final\r
- {\r
- typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType;\r
-\r
- /** Creates a new value, initialised to zero. */\r
- Atomic() noexcept : value (0) {}\r
-\r
- /** Creates a new value, with a given initial value. */\r
- Atomic (Type initialValue) noexcept : value (initialValue) {}\r
-\r
- /** Copies another value (atomically). */\r
- Atomic (const Atomic& other) noexcept : value (other.get()) {}\r
-\r
- /** Destructor. */\r
- ~Atomic() noexcept\r
- {\r
- #if __cpp_lib_atomic_is_always_lock_free\r
- static_assert (std::atomic<Type>::is_always_lock_free,\r
- "This class can only be used for lock-free types");\r
- #endif\r
- }\r
-\r
- /** Atomically reads and returns the current value. */\r
- Type get() const noexcept { return value.load(); }\r
-\r
- /** Atomically sets the current value. */\r
- void set (Type newValue) noexcept { value = newValue; }\r
-\r
- /** Atomically sets the current value, returning the value that was replaced. */\r
- Type exchange (Type newValue) noexcept { return value.exchange (newValue); }\r
-\r
- /** Atomically compares this value with a target value, and if it is equal, sets\r
- this to be equal to a new value.\r
-\r
- This operation is the atomic equivalent of doing this:\r
- @code\r
- bool compareAndSetBool (Type newValue, Type valueToCompare)\r
- {\r
- if (get() == valueToCompare)\r
- {\r
- set (newValue);\r
- return true;\r
- }\r
-\r
- return false;\r
- }\r
- @endcode\r
-\r
- Internally, this method calls std::atomic::compare_exchange_strong with\r
- memory_order_seq_cst (the strictest std::memory_order).\r
-\r
- @returns true if the comparison was true and the value was replaced; false if\r
- the comparison failed and the value was left unchanged.\r
- @see compareAndSetValue\r
- */\r
- bool compareAndSetBool (Type newValue, Type valueToCompare) noexcept\r
- {\r
- return value.compare_exchange_strong (valueToCompare, newValue);\r
- }\r
-\r
- /** Copies another value into this one (atomically). */\r
- Atomic<Type>& operator= (const Atomic& other) noexcept\r
- {\r
- value = other.value.load();\r
- return *this;\r
- }\r
-\r
- /** Copies another value into this one (atomically). */\r
- Atomic<Type>& operator= (Type newValue) noexcept\r
- {\r
- value = newValue;\r
- return *this;\r
- }\r
-\r
- /** Atomically adds a number to this value, returning the new value. */\r
- Type operator+= (DiffType amountToAdd) noexcept { return value += amountToAdd; }\r
-\r
- /** Atomically subtracts a number from this value, returning the new value. */\r
- Type operator-= (DiffType amountToSubtract) noexcept { return value -= amountToSubtract; }\r
-\r
- /** Atomically increments this value, returning the new value. */\r
- Type operator++() noexcept { return ++value; }\r
-\r
- /** Atomically decrements this value, returning the new value. */\r
- Type operator--() noexcept { return --value; }\r
-\r
- /** Implements a memory read/write barrier.\r
-\r
- Internally this calls std::atomic_thread_fence with\r
- memory_order_seq_cst (the strictest std::memory_order).\r
- */\r
- void memoryBarrier() noexcept { atomic_thread_fence (std::memory_order_seq_cst); }\r
-\r
- /** The std::atomic object that this class operates on. */\r
- std::atomic<Type> value;\r
-\r
- //==============================================================================\r
- #ifndef DOXYGEN\r
- /* This method has been deprecated as there is no equivalent method in\r
- std::atomic. Use compareAndSetBool instead.\r
- */\r
- JUCE_DEPRECATED (Type compareAndSetValue (Type, Type) noexcept);\r
- #endif\r
- };\r
-\r
-#else\r
-\r
- #if JUCE_MSVC\r
- JUCE_COMPILER_WARNING ("You must use a version of MSVC which supports std::atomic")\r
- #endif\r
-\r
- #if JUCE_IOS || JUCE_ANDROID // (64-bit ops will compile but not link)\r
- #define JUCE_64BIT_ATOMICS_UNAVAILABLE 1\r
- #endif\r
-\r
- #ifndef DOXYGEN\r
- template <typename Type> class AtomicBase;\r
- #endif\r
-\r
- //==============================================================================\r
- /**\r
- Simple class to hold a primitive value and perform atomic operations on it.\r
-\r
- The type used must be a 32 or 64 bit primitive, like an int, pointer, etc.\r
- There are methods to perform most of the basic atomic operations.\r
-\r
- @tags{Core}\r
- */\r
- template <typename Type>\r
- class Atomic final : public AtomicBase<Type>\r
- {\r
- public:\r
- /** Resulting type when subtracting the underlying Type. */\r
- typedef typename AtomicBase<Type>::DiffType DiffType;\r
-\r
- /** Creates a new value, initialised to zero. */\r
- inline Atomic() noexcept {}\r
-\r
- /** Creates a new value, with a given initial value. */\r
- inline explicit Atomic (const Type initialValue) noexcept : AtomicBase<Type> (initialValue) {}\r
-\r
- /** Copies another value (atomically). */\r
- inline Atomic (const Atomic& other) noexcept : AtomicBase<Type> (other) {}\r
-\r
- /** Destructor. */\r
- inline ~Atomic() noexcept\r
- {\r
- static_assert (sizeof (Type) == 4 || sizeof (Type) == 8,\r
- "Atomic can only be used for types which are 32 or 64 bits in size");\r
- }\r
-\r
- /** Atomically reads and returns the current value. */\r
- inline Type get() const noexcept { return AtomicBase<Type>::get(); }\r
-\r
- /** Copies another value into this one (atomically). */\r
- inline Atomic& operator= (const Atomic& other) noexcept { AtomicBase<Type>::operator= (other); return *this; }\r
-\r
- /** Copies another value into this one (atomically). */\r
- inline Atomic& operator= (const Type newValue) noexcept { AtomicBase<Type>::operator= (newValue); return *this; }\r
-\r
- /** Atomically sets the current value. */\r
- inline void set (Type newValue) noexcept { exchange (newValue); }\r
-\r
- /** Atomically sets the current value, returning the value that was replaced. */\r
- inline Type exchange (Type v) noexcept { return AtomicBase<Type>::exchange (v); }\r
-\r
- /** Atomically adds a number to this value, returning the new value. */\r
- Type operator+= (DiffType amountToAdd) noexcept;\r
-\r
- /** Atomically subtracts a number from this value, returning the new value. */\r
- Type operator-= (DiffType amountToSubtract) noexcept;\r
-\r
- /** Atomically increments this value, returning the new value. */\r
- Type operator++() noexcept;\r
-\r
- /** Atomically decrements this value, returning the new value. */\r
- Type operator--() noexcept;\r
-\r
- /** Atomically compares this value with a target value, and if it is equal, sets\r
- this to be equal to a new value.\r
-\r
- This operation is the atomic equivalent of doing this:\r
- @code\r
- bool compareAndSetBool (Type newValue, Type valueToCompare)\r
- {\r
- if (get() == valueToCompare)\r
- {\r
- set (newValue);\r
- return true;\r
- }\r
-\r
- return false;\r
- }\r
- @endcode\r
-\r
- @returns true if the comparison was true and the value was replaced; false if\r
- the comparison failed and the value was left unchanged.\r
- @see compareAndSetValue\r
- */\r
- inline bool compareAndSetBool (Type newValue, Type valueToCompare) noexcept { return AtomicBase<Type>::compareAndSetBool (newValue, valueToCompare); }\r
-\r
- /** Atomically compares this value with a target value, and if it is equal, sets\r
- this to be equal to a new value.\r
-\r
- This operation is the atomic equivalent of doing this:\r
- @code\r
- Type compareAndSetValue (Type newValue, Type valueToCompare)\r
- {\r
- Type oldValue = get();\r
- if (oldValue == valueToCompare)\r
- set (newValue);\r
-\r
- return oldValue;\r
- }\r
- @endcode\r
-\r
- @returns the old value before it was changed.\r
- @see compareAndSetBool\r
- */\r
- inline Type compareAndSetValue (Type newValue, Type valueToCompare) noexcept { return AtomicBase<Type>::compareAndSetValue (newValue, valueToCompare); }\r
-\r
- /** Implements a memory read/write barrier. */\r
- static inline void memoryBarrier() noexcept { AtomicBase<Type>::memoryBarrier(); }\r
- };\r
-\r
- #if ! DOXYGEN\r
-\r
- //==============================================================================\r
- // Internal implementation follows\r
- //==============================================================================\r
- template <typename Type>\r
- class AtomicBase\r
- {\r
- public:\r
- typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType;\r
-\r
- inline AtomicBase() noexcept : value (0) {}\r
- inline explicit AtomicBase (const Type v) noexcept : value (v) {}\r
- inline AtomicBase (const AtomicBase& other) noexcept : value (other.get()) {}\r
- Type get() const noexcept;\r
- inline AtomicBase& operator= (const AtomicBase<Type>& other) noexcept { exchange (other.get()); return *this; }\r
- inline AtomicBase& operator= (const Type newValue) noexcept { exchange (newValue); return *this; }\r
- void set (Type newValue) noexcept { exchange (newValue); }\r
- Type exchange (Type) noexcept;\r
- bool compareAndSetBool (Type, Type) noexcept;\r
- Type compareAndSetValue (Type, Type) noexcept;\r
- static void memoryBarrier() noexcept;\r
-\r
- //==============================================================================\r
- #if JUCE_64BIT\r
- JUCE_ALIGN (8)\r
- #else\r
- JUCE_ALIGN (4)\r
- #endif\r
-\r
- /** The raw value that this class operates on.\r
- This is exposed publicly in case you need to manipulate it directly\r
- for performance reasons.\r
+ @tags{Core}\r
+*/\r
+template <typename Type>\r
+struct Atomic final\r
+{\r
+ typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType;\r
+\r
+ /** Creates a new value, initialised to zero. */\r
+ Atomic() noexcept : value (0) {}\r
+\r
+ /** Creates a new value, with a given initial value. */\r
+ Atomic (Type initialValue) noexcept : value (initialValue) {}\r
+\r
+ /** Copies another value (atomically). */\r
+ Atomic (const Atomic& other) noexcept : value (other.get()) {}\r
+\r
+ /** Destructor. */\r
+ ~Atomic() noexcept\r
+ {\r
+ #if __cpp_lib_atomic_is_always_lock_free\r
+ static_assert (std::atomic<Type>::is_always_lock_free,\r
+ "This class can only be used for lock-free types");\r
+ #endif\r
+ }\r
+\r
+ /** Atomically reads and returns the current value. */\r
+ Type get() const noexcept { return value.load(); }\r
+\r
+ /** Atomically sets the current value. */\r
+ void set (Type newValue) noexcept { value = newValue; }\r
+\r
+ /** Atomically sets the current value, returning the value that was replaced. */\r
+ Type exchange (Type newValue) noexcept { return value.exchange (newValue); }\r
+\r
+ /** Atomically compares this value with a target value, and if it is equal, sets\r
+ this to be equal to a new value.\r
+\r
+ This operation is the atomic equivalent of doing this:\r
+ @code\r
+ bool compareAndSetBool (Type newValue, Type valueToCompare)\r
+ {\r
+ if (get() == valueToCompare)\r
+ {\r
+ set (newValue);\r
+ return true;\r
+ }\r
+\r
+ return false;\r
+ }\r
+ @endcode\r
+\r
+ Internally, this method calls std::atomic::compare_exchange_strong with\r
+ memory_order_seq_cst (the strictest std::memory_order).\r
+\r
+ @returns true if the comparison was true and the value was replaced; false if\r
+ the comparison failed and the value was left unchanged.\r
+ @see compareAndSetValue\r
+ */\r
+ bool compareAndSetBool (Type newValue, Type valueToCompare) noexcept\r
+ {\r
+ return value.compare_exchange_strong (valueToCompare, newValue);\r
+ }\r
+\r
+ /** Copies another value into this one (atomically). */\r
+ Atomic<Type>& operator= (const Atomic& other) noexcept\r
+ {\r
+ value = other.value.load();\r
+ return *this;\r
+ }\r
+\r
+ /** Copies another value into this one (atomically). */\r
+ Atomic<Type>& operator= (Type newValue) noexcept\r
+ {\r
+ value = newValue;\r
+ return *this;\r
+ }\r
+\r
+ /** Atomically adds a number to this value, returning the new value. */\r
+ Type operator+= (DiffType amountToAdd) noexcept { return value += amountToAdd; }\r
+\r
+ /** Atomically subtracts a number from this value, returning the new value. */\r
+ Type operator-= (DiffType amountToSubtract) noexcept { return value -= amountToSubtract; }\r
+\r
+ /** Atomically increments this value, returning the new value. */\r
+ Type operator++() noexcept { return ++value; }\r
+\r
+ /** Atomically decrements this value, returning the new value. */\r
+ Type operator--() noexcept { return --value; }\r
+\r
+ /** Implements a memory read/write barrier.\r
+\r
+ Internally this calls std::atomic_thread_fence with\r
+ memory_order_seq_cst (the strictest std::memory_order).\r
*/\r
- volatile Type value;\r
-\r
- protected:\r
- template <typename Dest, typename Source>\r
- static inline Dest castTo (Source value) noexcept { union { Dest d; Source s; } u; u.s = value; return u.d; }\r
-\r
- static inline Type castFrom32Bit (int32 value) noexcept { return castTo <Type, int32> (value); }\r
- static inline Type castFrom64Bit (int64 value) noexcept { return castTo <Type, int64> (value); }\r
- static inline int32 castTo32Bit (Type value) noexcept { return castTo <int32, Type> (value); }\r
- static inline int64 castTo64Bit (Type value) noexcept { return castTo <int64, Type> (value); }\r
-\r
- Type operator++ (int); // better to just use pre-increment with atomics..\r
- Type operator-- (int);\r
-\r
- /** This templated negate function will negate pointers as well as integers */\r
- template <typename ValueType>\r
- inline ValueType negateValue (ValueType n) noexcept\r
- {\r
- return sizeof (ValueType) == 1 ? (ValueType) -(signed char) n\r
- : (sizeof (ValueType) == 2 ? (ValueType) -(short) n\r
- : (sizeof (ValueType) == 4 ? (ValueType) -(int) n\r
- : ((ValueType) -(int64) n)));\r
- }\r
-\r
- /** This templated negate function will negate pointers as well as integers */\r
- template <typename PointerType>\r
- inline PointerType* negateValue (PointerType* n) noexcept\r
- {\r
- return reinterpret_cast<PointerType*> (-reinterpret_cast<pointer_sized_int> (n));\r
- }\r
- };\r
-\r
- //==============================================================================\r
- // Specialisation for void* which does not include the pointer arithmetic\r
- template <>\r
- class Atomic<void*> : public AtomicBase<void*>\r
- {\r
- public:\r
- inline Atomic() noexcept {}\r
- inline explicit Atomic (void* const initialValue) noexcept : AtomicBase<void*> (initialValue) {}\r
- inline Atomic (const Atomic<void*>& other) noexcept : AtomicBase<void*> (other) {}\r
- inline void* get() const noexcept { return AtomicBase<void*>::get(); }\r
- inline Atomic& operator= (const Atomic& other) noexcept { AtomicBase<void*>::operator= (other); return *this; }\r
- inline Atomic& operator= (void* const newValue) noexcept { AtomicBase<void*>::operator= (newValue); return *this; }\r
- inline void set (void* newValue) noexcept { exchange (newValue); }\r
- inline void* exchange (void* v) noexcept { return AtomicBase<void*>::exchange (v); }\r
- inline bool compareAndSetBool (void* newValue, void* valueToCompare) noexcept { return AtomicBase<void*>::compareAndSetBool (newValue, valueToCompare); }\r
- inline void* compareAndSetValue (void* newValue, void* valueToCompare) noexcept { return AtomicBase<void*>::compareAndSetValue (newValue, valueToCompare); }\r
- static inline void memoryBarrier() noexcept { AtomicBase<void*>::memoryBarrier(); }\r
- };\r
-\r
- template <typename Type>\r
- struct AtomicIncrementDecrement\r
- {\r
- static inline Type inc (AtomicBase<Type>& a) noexcept\r
- {\r
- return sizeof (Type) == 4 ? (Type) __sync_add_and_fetch (& (a.value), (Type) 1)\r
- : (Type) __sync_add_and_fetch ((int64_t*) & (a.value), 1);\r
- }\r
-\r
- static inline Type dec (AtomicBase<Type>& a) noexcept\r
- {\r
- return sizeof (Type) == 4 ? (Type) __sync_add_and_fetch (& (a.value), (Type) -1)\r
- : (Type) __sync_add_and_fetch ((int64_t*) & (a.value), -1);\r
- }\r
- };\r
-\r
- template <typename Type>\r
- struct AtomicIncrementDecrement<Type*>\r
- {\r
- static inline Type* inc (Atomic<Type*>& a) noexcept { return a.operator+= (1); }\r
- static inline Type* dec (Atomic<Type*>& a) noexcept { return a.operator-= (1); }\r
- };\r
-\r
- //==============================================================================\r
- template <typename Type>\r
- inline Type AtomicBase<Type>::get() const noexcept\r
- {\r
- return sizeof (Type) == 4 ? castFrom32Bit ((int32) __sync_add_and_fetch ((volatile int32*) &value, 0))\r
- : castFrom64Bit ((int64) __sync_add_and_fetch ((volatile int64*) &value, 0));\r
- }\r
-\r
- template <typename Type>\r
- inline Type AtomicBase<Type>::exchange (const Type newValue) noexcept\r
- {\r
- Type currentVal = get();\r
- while (! compareAndSetBool (newValue, currentVal)) { currentVal = get(); }\r
- return currentVal;\r
- }\r
-\r
- template <typename Type>\r
- inline Type Atomic<Type>::operator+= (const DiffType amountToAdd) noexcept\r
- {\r
- Type amount = (Type() + amountToAdd);\r
- return (Type) __sync_add_and_fetch (& (AtomicBase<Type>::value), amount);\r
- }\r
-\r
- template <typename Type>\r
- inline Type Atomic<Type>::operator-= (const DiffType amountToSubtract) noexcept\r
- {\r
- return operator+= (AtomicBase<Type>::negateValue (amountToSubtract));\r
- }\r
-\r
- template <typename Type>\r
- inline Type Atomic<Type>::operator++() noexcept { return AtomicIncrementDecrement<Type>::inc (*this); }\r
-\r
- template <typename Type>\r
- inline Type Atomic<Type>::operator--() noexcept { return AtomicIncrementDecrement<Type>::dec (*this); }\r
-\r
- template <typename Type>\r
- inline bool AtomicBase<Type>::compareAndSetBool (const Type newValue, const Type valueToCompare) noexcept\r
- {\r
- return sizeof (Type) == 4 ? __sync_bool_compare_and_swap ((volatile int32*) &value, castTo32Bit (valueToCompare), castTo32Bit (newValue))\r
- : __sync_bool_compare_and_swap ((volatile int64*) &value, castTo64Bit (valueToCompare), castTo64Bit (newValue));\r
- }\r
-\r
- template <typename Type>\r
- inline Type AtomicBase<Type>::compareAndSetValue (const Type newValue, const Type valueToCompare) noexcept\r
- {\r
- return sizeof (Type) == 4 ? castFrom32Bit ((int32) __sync_val_compare_and_swap ((volatile int32*) &value, castTo32Bit (valueToCompare), castTo32Bit (newValue)))\r
- : castFrom64Bit ((int64) __sync_val_compare_and_swap ((volatile int64*) &value, castTo64Bit (valueToCompare), castTo64Bit (newValue)));\r
- }\r
-\r
- template <typename Type>\r
- inline void AtomicBase<Type>::memoryBarrier() noexcept { __sync_synchronize(); }\r
-\r
- #endif // ! DOXYGEN\r
-\r
-#endif\r
+ void memoryBarrier() noexcept { atomic_thread_fence (std::memory_order_seq_cst); }\r
+\r
+ /** The std::atomic object that this class operates on. */\r
+ std::atomic<Type> value;\r
+\r
+ //==============================================================================\r
+ #ifndef DOXYGEN\r
+ /* This method has been deprecated as there is no equivalent method in\r
+ std::atomic. Use compareAndSetBool instead.\r
+ */\r
+ JUCE_DEPRECATED (Type compareAndSetValue (Type, Type) noexcept);\r
+ #endif\r
+};\r
\r
} // namespace juce\r
at an earlier point in the program, and simply not been detected until now.\r
\r
Most errors like this are caused by using old-fashioned, non-RAII techniques for\r
- your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,\r
+ your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays,\r
ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!\r
*/\r
jassertfalse;\r
the 'OwnerClass' template parameter - the name should have been printed by the line above.\r
\r
If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for\r
- your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,\r
+ your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays,\r
ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!\r
*/\r
jassertfalse;\r
\r
/** Delete an object pointer, and sets the pointer to null.\r
\r
- Remember that it's not good c++ practice to use delete directly - always try to use a ScopedPointer\r
+ Remember that it's not good c++ practice to use delete directly - always try to use a std::unique_ptr\r
or other automatic lifetime-management system rather than resorting to deleting raw pointers!\r
*/\r
template <typename Type>\r
\r
// This is a neat way of declaring a typedef for a pointer class,\r
// rather than typing out the full templated name each time..\r
- typedef ReferenceCountedObjectPtr<MyClass> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<MyClass>;\r
};\r
\r
MyClass::Ptr p = new MyClass();\r
@code\r
struct MyClass : public ReferenceCountedObject\r
{\r
- typedef ReferenceCountedObjectPtr<MyClass> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<MyClass>;\r
...\r
}\r
@endcode\r
\r
@tags{Core}\r
*/\r
-template <class ReferenceCountedObjectClass>\r
+template <class ObjectType>\r
class ReferenceCountedObjectPtr\r
{\r
public:\r
/** The class being referenced by this pointer. */\r
- typedef ReferenceCountedObjectClass ReferencedType;\r
+ using ReferencedType = ObjectType;\r
\r
//==============================================================================\r
/** Creates a pointer to a null object. */\r
*/\r
template <typename Convertible>\r
ReferenceCountedObjectPtr (const ReferenceCountedObjectPtr<Convertible>& other) noexcept\r
- : referencedObject (static_cast<ReferencedType*> (other.get()))\r
+ : referencedObject (other.get())\r
{\r
incIfNotNull (referencedObject);\r
}\r
template <typename Convertible>\r
ReferenceCountedObjectPtr& operator= (const ReferenceCountedObjectPtr<Convertible>& other)\r
{\r
- return operator= (static_cast<ReferencedType*> (other.get()));\r
+ return operator= (other.get());\r
}\r
\r
/** Changes this pointer to point at a different object.\r
The reference count of the old object is decremented, and it might be\r
deleted if it hits zero. The new object's count is incremented.\r
*/\r
- ReferenceCountedObjectPtr& operator= (ReferencedType* const newObject)\r
+ ReferenceCountedObjectPtr& operator= (ReferencedType* newObject)\r
{\r
if (referencedObject != newObject)\r
{\r
\r
//==============================================================================\r
/** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator== (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object1, ReferenceCountedObjectClass* const object2) noexcept\r
+template <typename ObjectType>\r
+bool operator== (const ReferenceCountedObjectPtr<ObjectType>& object1, ObjectType* const object2) noexcept\r
{\r
return object1.get() == object2;\r
}\r
\r
/** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator== (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object1, const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object2) noexcept\r
+template <typename ObjectType>\r
+bool operator== (const ReferenceCountedObjectPtr<ObjectType>& object1, const ReferenceCountedObjectPtr<ObjectType>& object2) noexcept\r
{\r
return object1.get() == object2.get();\r
}\r
\r
/** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator== (ReferenceCountedObjectClass* object1, const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object2) noexcept\r
+template <typename ObjectType>\r
+bool operator== (ObjectType* object1, const ReferenceCountedObjectPtr<ObjectType>& object2) noexcept\r
{\r
return object1 == object2.get();\r
}\r
\r
/** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator!= (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object1, const ReferenceCountedObjectClass* object2) noexcept\r
+template <typename ObjectType>\r
+bool operator!= (const ReferenceCountedObjectPtr<ObjectType>& object1, const ObjectType* object2) noexcept\r
{\r
return object1.get() != object2;\r
}\r
\r
/** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator!= (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object1, const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object2) noexcept\r
+template <typename ObjectType>\r
+bool operator!= (const ReferenceCountedObjectPtr<ObjectType>& object1, const ReferenceCountedObjectPtr<ObjectType>& object2) noexcept\r
{\r
return object1.get() != object2.get();\r
}\r
\r
/** Compares two ReferenceCountedObjectPtrs. */\r
-template <typename ReferenceCountedObjectClass>\r
-bool operator!= (ReferenceCountedObjectClass* object1, const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& object2) noexcept\r
+template <typename ObjectType>\r
+bool operator!= (ObjectType* object1, const ReferenceCountedObjectPtr<ObjectType>& object2) noexcept\r
{\r
return object1 != object2.get();\r
}\r
\r
//==============================================================================\r
/**\r
- This class holds a pointer which is automatically deleted when this object goes\r
- out of scope.\r
+ This class is deprecated. You should use std::unique_ptr instead.\r
+\r
+\r
+ A ScopedPointer holds a pointer that is automatically deleted when the ScopedPointer\r
+ goes out of scope.\r
\r
Once a pointer has been passed to a ScopedPointer, it will make sure that the pointer\r
gets deleted when the ScopedPointer is deleted. Using the ScopedPointer on the stack or\r
If you need to get a pointer out of a ScopedPointer without it being deleted, you\r
can use the release() method.\r
\r
- Something to note is the main difference between this class and the std::auto_ptr class,\r
- which is that ScopedPointer provides a cast-to-object operator, whereas std::auto_ptr\r
- requires that you always call get() to retrieve the pointer. The advantages of providing\r
- the cast is that you don't need to call get(), so can use the ScopedPointer in pretty much\r
- exactly the same way as a raw pointer. The disadvantage is that the compiler is free to\r
- use the cast in unexpected and sometimes dangerous ways - in particular, it becomes difficult\r
- to return a ScopedPointer as the result of a function. To avoid this causing errors,\r
- ScopedPointer contains an overloaded constructor that should cause a syntax error in these\r
- circumstances, but it does mean that instead of returning a ScopedPointer from a function,\r
- you'd need to return a raw pointer (or use a std::auto_ptr instead).\r
-\r
@tags{Core}\r
*/\r
template <class ObjectType>\r
struct SharedObjectHolder\r
{\r
SpinLock lock;\r
- ScopedPointer<SharedObjectType> sharedInstance;\r
+ std::unique_ptr<SharedObjectType> sharedInstance;\r
int refCount;\r
};\r
\r
const SpinLock::ScopedLockType sl (holder.lock);\r
\r
if (++(holder.refCount) == 1)\r
- holder.sharedInstance = new SharedObjectType();\r
+ holder.sharedInstance.reset (new SharedObjectType());\r
\r
- sharedObject = holder.sharedInstance;\r
+ sharedObject = holder.sharedInstance.get();\r
}\r
\r
// There's no need to assign to a SharedResourcePointer because every\r
class WeakReference\r
{\r
public:\r
- /** Creates a null SafePointer. */\r
+ /** Creates a null WeakReference. */\r
inline WeakReference() noexcept {}\r
\r
/** Creates a WeakReference that points at the given object. */\r
readExternalStorage = 3,\r
\r
/** Permission to write to external storage such as SD cards */\r
- writeExternalStorage = 4\r
+ writeExternalStorage = 4,\r
+\r
+ /** Permission to use camera */\r
+ camera = 5\r
};\r
\r
//==============================================================================\r
\r
int operator()(int i) const { return bigData->sum() + i; }\r
\r
- ScopedPointer<BigData> bigData { new BigData() };\r
+ std::unique_ptr<BigData> bigData { new BigData() };\r
};\r
}\r
\r
{\r
beginTest ("move constructor");\r
\r
- ScopedPointer<std::function<int()>> fStackTmp (new std::function<int()> (fStack));\r
+ std::unique_ptr<std::function<int()>> fStackTmp (new std::function<int()> (fStack));\r
std::function<int()> f1 (static_cast<std::function<int()>&&> (*fStackTmp));\r
\r
fStackTmp.reset();\r
expectEquals (f1(), 3);\r
\r
- ScopedPointer<std::function<int()>> fHeapTmp (new std::function<int()> (fHeap));\r
+ std::unique_ptr<std::function<int()>> fHeapTmp (new std::function<int()> (fHeap));\r
std::function<int()> f2 (static_cast<std::function<int()>&&> (*fHeapTmp));\r
if (*fHeapTmp)\r
expect (false);\r
fHeapTmp.reset();\r
expectEquals (f2(), FunctionTestsHelpers::BigData::bigDataSum);\r
\r
- ScopedPointer<std::function<int()>> fEmptyTmp (new std::function<int()>());\r
+ std::unique_ptr<std::function<int()>> fEmptyTmp (new std::function<int()>());\r
std::function<int()> f3 (static_cast<std::function<int()>&&> (*fEmptyTmp));\r
fEmptyTmp.reset();\r
if (f3)\r
beginTest ("move assignment");\r
\r
std::function<int()> f1 (fHeap);\r
- ScopedPointer<std::function<int()>> fStackTmp (new std::function<int()> (fStack));\r
+ std::unique_ptr<std::function<int()>> fStackTmp (new std::function<int()> (fStack));\r
f1 = static_cast<std::function<int()>&&> (*fStackTmp);\r
\r
fStackTmp.reset();\r
expectEquals (f1(), 3);\r
\r
std::function<int()> f2 (fStack);\r
- ScopedPointer<std::function<int()>> fHeapTmp (new std::function<int()> (fHeap));\r
+ std::unique_ptr<std::function<int()>> fHeapTmp (new std::function<int()> (fHeap));\r
f2 = static_cast<std::function<int()>&&> (*fHeapTmp);\r
if (*fHeapTmp)\r
expect (false);\r
expectEquals (f2(), FunctionTestsHelpers::BigData::bigDataSum);\r
\r
std::function<int()> f3 (fHeap);\r
- ScopedPointer<std::function<int()>> fEmptyTmp (new std::function<int()>());\r
+ std::unique_ptr<std::function<int()>> fEmptyTmp (new std::function<int()>());\r
f3 = static_cast<std::function<int()>&&> (*fEmptyTmp);\r
fEmptyTmp.reset();\r
if (f3)\r
uint8 Uuid::getClockSeqLow() const noexcept { return uuid[9]; }\r
uint64 Uuid::getNode() const noexcept { return (((uint64) ByteOrder::bigEndianShort (uuid + 10)) << 32) + ByteOrder::bigEndianInt (uuid + 12); }\r
\r
+uint64 Uuid::hash() const noexcept\r
+{\r
+ uint64 result = 0;\r
+\r
+ for (auto n : uuid)\r
+ result = ((uint64) 101) * result + n;\r
+\r
+ return result;\r
+}\r
+\r
} // namespace juce\r
+\r
+#if ! DOXYGEN\r
+namespace std\r
+{\r
+ template <> struct hash<juce::Uuid>\r
+ {\r
+ size_t operator() (const juce::Uuid& u) const noexcept { return (size_t) u.hash(); }\r
+ };\r
+}\r
+#endif\r
/** Returns the node section of the UUID. */\r
uint64 getNode() const noexcept;\r
\r
+ /** Returns a hash of the UUID. */\r
+ uint64 hash() const noexcept;\r
+\r
//==============================================================================\r
/** Returns a pointer to the internal binary representation of the ID.\r
\r
--- /dev/null
+$$CameraApi21\r
+ //==============================================================================\r
+ public class CameraDeviceStateCallback extends CameraDevice.StateCallback\r
+ {\r
+ private native void cameraDeviceStateClosed (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateDisconnected (long host, CameraDevice camera);\r
+ private native void cameraDeviceStateError (long host, CameraDevice camera, int error);\r
+ private native void cameraDeviceStateOpened (long host, CameraDevice camera);\r
+\r
+ CameraDeviceStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateClosed (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onDisconnected (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateDisconnected (host, camera);\r
+ }\r
+\r
+ @Override\r
+ public void onError (CameraDevice camera, int error)\r
+ {\r
+ cameraDeviceStateError (host, camera, error);\r
+ }\r
+\r
+ @Override\r
+ public void onOpened (CameraDevice camera)\r
+ {\r
+ cameraDeviceStateOpened (host, camera);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionStateCallback extends CameraCaptureSession.StateCallback\r
+ {\r
+ private native void cameraCaptureSessionActive (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionClosed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigureFailed (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionConfigured (long host, CameraCaptureSession session);\r
+ private native void cameraCaptureSessionReady (long host, CameraCaptureSession session);\r
+\r
+ CameraCaptureSessionStateCallback (long hostToUse)\r
+ {\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onActive (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionActive (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onClosed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionClosed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigureFailed (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigureFailed (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onConfigured (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionConfigured (host, session);\r
+ }\r
+\r
+ @Override\r
+ public void onReady (CameraCaptureSession session)\r
+ {\r
+ cameraCaptureSessionReady (host, session);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class CameraCaptureSessionCaptureCallback extends CameraCaptureSession.CaptureCallback\r
+ {\r
+ private native void cameraCaptureSessionCaptureCompleted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result);\r
+ private native void cameraCaptureSessionCaptureFailed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureFailure failure);\r
+ private native void cameraCaptureSessionCaptureProgressed (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult);\r
+ private native void cameraCaptureSessionCaptureStarted (long host, boolean isPreview, CameraCaptureSession session, CaptureRequest request, long timestamp, long frameNumber);\r
+ private native void cameraCaptureSessionCaptureSequenceAborted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId);\r
+ private native void cameraCaptureSessionCaptureSequenceCompleted (long host, boolean isPreview, CameraCaptureSession session, int sequenceId, long frameNumber);\r
+\r
+ CameraCaptureSessionCaptureCallback (long hostToUse, boolean shouldBePreview)\r
+ {\r
+ host = hostToUse;\r
+ preview = shouldBePreview;\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureCompleted (CameraCaptureSession session, CaptureRequest request,\r
+ TotalCaptureResult result)\r
+ {\r
+ cameraCaptureSessionCaptureCompleted (host, preview, session, request, result);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureFailed (CameraCaptureSession session, CaptureRequest request, CaptureFailure failure)\r
+ {\r
+ cameraCaptureSessionCaptureFailed (host, preview, session, request, failure);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureProgressed (CameraCaptureSession session, CaptureRequest request,\r
+ CaptureResult partialResult)\r
+ {\r
+ cameraCaptureSessionCaptureProgressed (host, preview, session, request, partialResult);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceAborted (CameraCaptureSession session, int sequenceId)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceAborted (host, preview, session, sequenceId);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureSequenceCompleted (CameraCaptureSession session, int sequenceId, long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureSequenceCompleted (host, preview, session, sequenceId, frameNumber);\r
+ }\r
+\r
+ @Override\r
+ public void onCaptureStarted (CameraCaptureSession session, CaptureRequest request, long timestamp,\r
+ long frameNumber)\r
+ {\r
+ cameraCaptureSessionCaptureStarted (host, preview, session, request, timestamp, frameNumber);\r
+ }\r
+\r
+ private long host;\r
+ private boolean preview;\r
+ }\r
+\r
+ //==============================================================================\r
+ public class JuceOrientationEventListener extends OrientationEventListener\r
+ {\r
+ private native void deviceOrientationChanged (long host, int orientation);\r
+\r
+ public JuceOrientationEventListener (long hostToUse, Context context, int rate)\r
+ {\r
+ super (context, rate);\r
+\r
+ host = hostToUse;\r
+ }\r
+\r
+ @Override\r
+ public void onOrientationChanged (int orientation)\r
+ {\r
+ deviceOrientationChanged (host, orientation);\r
+ }\r
+\r
+ private long host;\r
+ }\r
+\r
+CameraApi21$$\r
import android.content.res.Configuration;\r
import android.content.pm.PackageInfo;\r
import android.content.pm.PackageManager;\r
+$$JuceAndroidCameraImports$$ // If you get an error here, you need to re-save your project with the Projucer!\r
import android.net.http.SslError;\r
import android.net.Uri;\r
import android.os.Bundle;\r
private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2;\r
private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3;\r
private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4;\r
+ private static final int JUCE_PERMISSIONS_CAMERA = 5;\r
\r
private static String getAndroidPermissionName (int permissionID)\r
{\r
// use string value as this is not defined in SDKs < 16\r
case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE";\r
case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE;\r
+ case JUCE_PERMISSIONS_CAMERA: return Manifest.permission.CAMERA;\r
}\r
\r
// unknown permission ID!\r
setVolumeControlStream (AudioManager.STREAM_MUSIC);\r
\r
permissionCallbackPtrMap = new HashMap<Integer, Long>();\r
+ appPausedResumedListeners = new HashMap<Long, AppPausedResumedListener>();\r
}\r
\r
@Override\r
{\r
suspendApp();\r
\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appPaused();\r
+\r
try\r
{\r
Thread.sleep (1000); // This is a bit of a hack to avoid some hard-to-track-down\r
super.onResume();\r
resumeApp();\r
\r
- // Ensure that navigation/status bar visibility is correctly restored.\r
- for (int i = 0; i < viewHolder.getChildCount(); ++i)\r
- {\r
- if (viewHolder.getChildAt (i) instanceof ComponentPeerView)\r
- ((ComponentPeerView) viewHolder.getChildAt (i)).appResumed();\r
- }\r
+ Long[] keys = appPausedResumedListeners.keySet().toArray (new Long[appPausedResumedListeners.keySet().size()]);\r
+\r
+ for (Long k : keys)\r
+ appPausedResumedListeners.get (k).appResumed();\r
}\r
\r
@Override\r
{\r
ComponentPeerView v = new ComponentPeerView (this, opaque, host);\r
viewHolder.addView (v);\r
+ addAppPausedResumedListener (v, host);\r
return v;\r
}\r
\r
public final void deleteView (ComponentPeerView view)\r
{\r
+ removeAppPausedResumedListener (view, view.host);\r
+\r
view.host = 0;\r
\r
ViewGroup group = (ViewGroup) (view.getParent());\r
\r
public native void alertDismissed (long callback, int id);\r
\r
+ //==============================================================================\r
+ public interface AppPausedResumedListener\r
+ {\r
+ void appPaused();\r
+ void appResumed();\r
+ }\r
+\r
+ private Map<Long, AppPausedResumedListener> appPausedResumedListeners;\r
+\r
+ public void addAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.put (new Long (listenerHost), l);\r
+ }\r
+\r
+ public void removeAppPausedResumedListener (AppPausedResumedListener l, long listenerHost)\r
+ {\r
+ appPausedResumedListeners.remove (new Long (listenerHost));\r
+ }\r
+\r
//==============================================================================\r
public final class ComponentPeerView extends ViewGroup\r
- implements View.OnFocusChangeListener\r
+ implements View.OnFocusChangeListener, AppPausedResumedListener\r
{\r
public ComponentPeerView (Context context, boolean opaque_, long host)\r
{\r
}\r
\r
//==============================================================================\r
+ private native void handleAppPaused (long host);\r
private native void handleAppResumed (long host);\r
\r
+ @Override\r
+ public void appPaused()\r
+ {\r
+ if (host == 0)\r
+ return;\r
+\r
+ handleAppPaused (host);\r
+ }\r
+\r
+ @Override\r
public void appResumed()\r
{\r
if (host == 0)\r
return;\r
\r
+ // Ensure that navigation/status bar visibility is correctly restored.\r
handleAppResumed (host);\r
}\r
}\r
private final Object hostLock = new Object();\r
}\r
\r
+ $$JuceAndroidCameraCode$$ // If you get an error here, you need to re-save your project with the Projucer!\r
+\r
//==============================================================================\r
public static final String getLocaleValue (boolean isRegion)\r
{\r
}\r
};\r
\r
-//==============================================================================\r
-namespace\r
-{\r
- inline String juceString (JNIEnv* env, jstring s)\r
- {\r
- if (s == 0)\r
- return {};\r
-\r
- const char* const utf8 = env->GetStringUTFChars (s, nullptr);\r
- CharPointer_UTF8 utf8CP (utf8);\r
- const String result (utf8CP);\r
- env->ReleaseStringUTFChars (s, utf8);\r
- return result;\r
- }\r
-\r
- inline String juceString (jstring s)\r
- {\r
- return juceString (getEnv(), s);\r
- }\r
-\r
- inline LocalRef<jstring> javaString (const String& s)\r
- {\r
- return LocalRef<jstring> (getEnv()->NewStringUTF (s.toUTF8()));\r
- }\r
-\r
- inline LocalRef<jstring> javaStringFromChar (const juce_wchar c)\r
- {\r
- char utf8[8] = { 0 };\r
- CharPointer_UTF8 (utf8).write (c);\r
- return LocalRef<jstring> (getEnv()->NewStringUTF (utf8));\r
- }\r
-}\r
-\r
//==============================================================================\r
class JNIClassBase\r
{\r
METHOD (deleteView, "deleteView", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH "$ComponentPeerView;)V") \\r
METHOD (createNativeSurfaceView, "createNativeSurfaceView", "(J)L" JUCE_ANDROID_ACTIVITY_CLASSPATH "$NativeSurfaceView;") \\r
METHOD (finish, "finish", "()V") \\r
+ METHOD (getWindowManager, "getWindowManager", "()Landroid/view/WindowManager;") \\r
METHOD (setRequestedOrientation, "setRequestedOrientation", "(I)V") \\r
METHOD (getClipboardContent, "getClipboardContent", "()Ljava/lang/String;") \\r
METHOD (setClipboardContent, "setClipboardContent", "(Ljava/lang/String;)V") \\r
METHOD (startActivity, "startActivity", "(Landroid/content/Intent;)V") \\r
METHOD (startActivityForResult, "startActivityForResult", "(Landroid/content/Intent;I)V") \\r
METHOD (getContentResolver, "getContentResolver", "()Landroid/content/ContentResolver;") \\r
+ METHOD (addAppPausedResumedListener, "addAppPausedResumedListener", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH "$AppPausedResumedListener;J)V") \\r
+ METHOD (removeAppPausedResumedListener, "removeAppPausedResumedListener", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH "$AppPausedResumedListener;J)V")\r
\r
DECLARE_JNI_CLASS (JuceAppActivity, JUCE_ANDROID_ACTIVITY_CLASSPATH);\r
#undef JNI_CLASS_MEMBERS\r
\r
//==============================================================================\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
- STATICMETHOD (createBitmap, "createBitmap", "(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;") \\r
- METHOD (setPixel, "setPixel", "(III)V")\r
+ STATICMETHOD (createBitmap, "createBitmap", "(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;") \\r
+ STATICMETHOD (createBitmapFrom, "createBitmap", "(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;") \\r
+ METHOD (compress, "compress", "(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z") \\r
+ METHOD (getHeight, "getHeight", "()I") \\r
+ METHOD (getWidth, "getWidth", "()I") \\r
+ METHOD (recycle, "recycle", "()V") \\r
+ METHOD (setPixel, "setPixel", "(III)V")\r
\r
DECLARE_JNI_CLASS (AndroidBitmap, "android/graphics/Bitmap");\r
#undef JNI_CLASS_MEMBERS\r
DECLARE_JNI_CLASS (AndroidBitmapConfig, "android/graphics/Bitmap$Config");\r
#undef JNI_CLASS_MEMBERS\r
\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ STATICMETHOD (decodeByteArray, "decodeByteArray", "([BII)Landroid/graphics/Bitmap;")\r
+\r
+DECLARE_JNI_CLASS (AndroidBitmapFactory, "android/graphics/BitmapFactory");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
STATICMETHOD (dumpReferenceTables, "dumpReferenceTables", "()V")\r
\r
\r
#define JUCE_LOG_JNI_REFERENCES_TABLE getEnv()->CallStaticVoidMethod (AndroidDebug, AndroidDebug.dumpReferenceTables);\r
\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getRotation, "getRotation", "()I")\r
+\r
+DECLARE_JNI_CLASS (AndroidDisplay, "android/view/Display");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "()V") \\r
+ METHOD (constructorWithLooper, "<init>", "(Landroid/os/Looper;)V") \\r
+ METHOD (post, "post", "(Ljava/lang/Runnable;)Z") \\r
+ METHOD (postDelayed, "postDelayed", "(Ljava/lang/Runnable;J)Z") \\r
+\r
+DECLARE_JNI_CLASS (AndroidHandler, "android/os/Handler");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(Ljava/lang/String;)V") \\r
+ METHOD (getLooper, "getLooper", "()Landroid/os/Looper;") \\r
+ METHOD (join, "join", "()V") \\r
+ METHOD (quitSafely, "quitSafely", "()Z") \\r
+ METHOD (start, "start", "()V")\r
+\r
+DECLARE_JNI_CLASS (AndroidHandlerThread, "android/os/HandlerThread");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
STATICMETHOD (createChooser, "createChooser", "(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;") \\r
METHOD (addCategory, "addCategory", "(Ljava/lang/String;)Landroid/content/Intent;") \\r
#undef JNI_CLASS_MEMBERS\r
\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
- METHOD (constructor, "<init>", "()V") \\r
- METHOD (setValues, "setValues", "([F)V") \\r
+ METHOD (constructor, "<init>", "()V") \\r
+ METHOD (postRotate, "postRotate", "(FFF)Z") \\r
+ METHOD (postScale, "postScale", "(FFFF)Z") \\r
+ METHOD (postTranslate, "postTranslate", "(FF)Z") \\r
+ METHOD (setValues, "setValues", "([F)V")\r
\r
DECLARE_JNI_CLASS (AndroidMatrix, "android/graphics/Matrix");\r
#undef JNI_CLASS_MEMBERS\r
DECLARE_JNI_CLASS (AndroidPendingIntent, "android/app/PendingIntent");\r
#undef JNI_CLASS_MEMBERS\r
\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (toString, "toString", "()Ljava/lang/String;")\r
+\r
+DECLARE_JNI_CLASS (AndroidRange, "android/util/Range");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
METHOD (constructor, "<init>", "(IIII)V") \\r
FIELD (left, "left", "I") \\r
FIELD (top, "top", "I") \\r
FIELD (bottom, "bottom", "I") \\r
\r
-DECLARE_JNI_CLASS (AndroidRectClass, "android/graphics/Rect");\r
+DECLARE_JNI_CLASS (AndroidRect, "android/graphics/Rect");\r
#undef JNI_CLASS_MEMBERS\r
\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
DECLARE_JNI_CLASS (AndroidResources, "android/content/res/Resources")\r
#undef JNI_CLASS_MEMBERS\r
\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getHeight, "getHeight", "()I") \\r
+ METHOD (getWidth, "getWidth", "()I")\r
+\r
+DECLARE_JNI_CLASS (AndroidSize, "android/util/Size");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
STATICMETHOD (parse, "parse", "(Ljava/lang/String;)Landroid/net/Uri;") \\r
METHOD (toString, "toString", "()Ljava/lang/String;")\r
DECLARE_JNI_CLASS (AndroidViewGroup, "android/view/ViewGroup")\r
#undef JNI_CLASS_MEMBERS\r
\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getDefaultDisplay, "getDefaultDisplay", "()Landroid/view/Display;")\r
+\r
+DECLARE_JNI_CLASS (AndroidWindowManager, "android/view/WindowManager");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
//==============================================================================\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
METHOD (constructor, "<init>", "(I)V") \\r
#undef JNI_CLASS_MEMBERS\r
\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ STATICMETHOD (valueOf, "valueOf", "(Z)Ljava/lang/Boolean;") \\r
METHOD (booleanValue, "booleanValue", "()Z")\r
\r
DECLARE_JNI_CLASS (JavaBoolean, "java/lang/Boolean");\r
DECLARE_JNI_CLASS (JavaBundle, "android/os/Bundle");\r
#undef JNI_CLASS_MEMBERS\r
\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (get, "get", "([B)Ljava/nio/ByteBuffer;") \\r
+ METHOD (remaining, "remaining", "()I")\r
+\r
+DECLARE_JNI_CLASS (JavaByteBuffer, "java/nio/ByteBuffer");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
METHOD (toString, "toString", "()Ljava/lang/String;")\r
\r
#undef JNI_CLASS_MEMBERS\r
\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ STATICMETHOD (forName, "forName", "(Ljava/lang/String;)Ljava/lang/Class;") \\r
METHOD (getName, "getName", "()Ljava/lang/String;") \\r
METHOD (getModifiers, "getModifiers", "()I") \\r
METHOD (isAnnotation, "isAnnotation", "()Z") \\r
\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
STATICMETHOD (parseInt, "parseInt", "(Ljava/lang/String;I)I") \\r
- STATICMETHOD (valueOf, "valueOf", "(I)Ljava/lang/Integer;")\r
+ STATICMETHOD (valueOf, "valueOf", "(I)Ljava/lang/Integer;") \\r
+ METHOD (intValue, "intValue", "()I")\r
\r
DECLARE_JNI_CLASS (JavaInteger, "java/lang/Integer");\r
#undef JNI_CLASS_MEMBERS\r
DECLARE_JNI_CLASS (JavaIterator, "java/util/Iterator");\r
#undef JNI_CLASS_MEMBERS\r
\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (get, "get", "(I)Ljava/lang/Object;") \\r
+ METHOD (size, "size", "()I")\r
+\r
+DECLARE_JNI_CLASS (JavaList, "java/util/List");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
METHOD (constructor, "<init>", "(J)V")\r
\r
DECLARE_JNI_CLASS (JavaString, "java/lang/String");\r
#undef JNI_CLASS_MEMBERS\r
\r
+//==============================================================================\r
+namespace\r
+{\r
+ inline String juceString (JNIEnv* env, jstring s)\r
+ {\r
+ if (s == 0)\r
+ return {};\r
+\r
+ const char* const utf8 = env->GetStringUTFChars (s, nullptr);\r
+ CharPointer_UTF8 utf8CP (utf8);\r
+ const String result (utf8CP);\r
+ env->ReleaseStringUTFChars (s, utf8);\r
+ return result;\r
+ }\r
+\r
+ inline String juceString (jstring s)\r
+ {\r
+ return juceString (getEnv(), s);\r
+ }\r
+\r
+ inline LocalRef<jstring> javaString (const String& s)\r
+ {\r
+ return LocalRef<jstring> (getEnv()->NewStringUTF (s.toUTF8()));\r
+ }\r
+\r
+ inline LocalRef<jstring> javaStringFromChar (const juce_wchar c)\r
+ {\r
+ char utf8[8] = { 0 };\r
+ CharPointer_UTF8 (utf8).write (c);\r
+ return LocalRef<jstring> (getEnv()->NewStringUTF (utf8));\r
+ }\r
+\r
+ inline LocalRef<jobjectArray> juceStringArrayToJava (const StringArray& juceArray)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ LocalRef<jobjectArray> result (env->NewObjectArray ((jsize) juceArray.size(),\r
+ JavaString,\r
+ javaString ("").get()));\r
+\r
+ for (int i = 0; i < juceArray.size(); ++i)\r
+ env->SetObjectArrayElement (result, i, javaString (juceArray [i]).get());\r
+\r
+ return result;\r
+ }\r
+\r
+ inline StringArray javaStringArrayToJuce (const LocalRef<jobjectArray>& javaArray)\r
+ {\r
+ if (javaArray.get() == nullptr)\r
+ return {};\r
+\r
+ auto* env = getEnv();\r
+\r
+ StringArray result;\r
+\r
+ for (int i = 0; i < env->GetArrayLength (javaArray.get()); ++i)\r
+ {\r
+ LocalRef<jstring> javaString ((jstring) env->GetObjectArrayElement (javaArray.get(), i));\r
+ result.add (juceString (javaString.get()));\r
+ }\r
+\r
+ return result;\r
+ }\r
+}\r
+\r
//==============================================================================\r
class AndroidInterfaceImplementer;\r
\r
\r
URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool usePostRequest)\r
{\r
- ScopedPointer<BackgroundDownloadTask> downloadTask = new BackgroundDownloadTask (*this, targetLocation, extraHeaders, listener, usePostRequest);\r
+ std::unique_ptr<BackgroundDownloadTask> downloadTask (new BackgroundDownloadTask (*this, targetLocation, extraHeaders, listener, usePostRequest));\r
\r
if (downloadTask->initOK() && downloadTask->connect())\r
return downloadTask.release();\r
private:\r
WebInputStream& owner;\r
URL url;\r
- ScopedPointer<URLConnectionState> connection;\r
+ std::unique_ptr<URLConnectionState> connection;\r
String headers;\r
MemoryBlock postData;\r
int64 position = 0;\r
ObjectType* object;\r
};\r
\r
+//==============================================================================\r
+struct NSObjectDeleter\r
+{\r
+ void operator()(NSObject* object) const\r
+ {\r
+ [object release];\r
+ }\r
+};\r
+\r
//==============================================================================\r
template <typename SuperclassType>\r
struct ObjCClass\r
Pimpl (const String& pipePath, bool createPipe)\r
: pipeInName (pipePath + "_in"),\r
pipeOutName (pipePath + "_out"),\r
- pipeIn (-1), pipeOut (-1),\r
- createdFifoIn (false),\r
- createdFifoOut (false),\r
- createdPipe (createPipe),\r
- stopReadOperation (false)\r
+ createdPipe (createPipe)\r
{\r
signal (SIGPIPE, signalHandler);\r
juce_siginterrupt (SIGPIPE, 1);\r
\r
int read (char* destBuffer, int maxBytesToRead, int timeOutMilliseconds)\r
{\r
- const uint32 timeoutEnd = getTimeoutEnd (timeOutMilliseconds);\r
+ auto timeoutEnd = getTimeoutEnd (timeOutMilliseconds);\r
\r
if (pipeIn == -1)\r
{\r
\r
while (bytesRead < maxBytesToRead)\r
{\r
- const int bytesThisTime = maxBytesToRead - bytesRead;\r
- const int numRead = (int) ::read (pipeIn, destBuffer, (size_t) bytesThisTime);\r
+ auto bytesThisTime = maxBytesToRead - bytesRead;\r
+ auto numRead = (int) ::read (pipeIn, destBuffer, (size_t) bytesThisTime);\r
\r
if (numRead <= 0)\r
{\r
- if (errno != EWOULDBLOCK || stopReadOperation || hasExpired (timeoutEnd))\r
+ if (errno != EWOULDBLOCK || stopReadOperation.load() || hasExpired (timeoutEnd))\r
return -1;\r
\r
const int maxWaitingTime = 30;\r
\r
int write (const char* sourceBuffer, int numBytesToWrite, int timeOutMilliseconds)\r
{\r
- const uint32 timeoutEnd = getTimeoutEnd (timeOutMilliseconds);\r
+ auto timeoutEnd = getTimeoutEnd (timeOutMilliseconds);\r
\r
if (pipeOut == -1)\r
{\r
\r
while (bytesWritten < numBytesToWrite && ! hasExpired (timeoutEnd))\r
{\r
- const int bytesThisTime = numBytesToWrite - bytesWritten;\r
- const int numWritten = (int) ::write (pipeOut, sourceBuffer, (size_t) bytesThisTime);\r
+ auto bytesThisTime = numBytesToWrite - bytesWritten;\r
+ auto numWritten = (int) ::write (pipeOut, sourceBuffer, (size_t) bytesThisTime);\r
\r
if (numWritten <= 0)\r
return -1;\r
}\r
\r
const String pipeInName, pipeOutName;\r
- int pipeIn, pipeOut;\r
- bool createdFifoIn, createdFifoOut;\r
+ int pipeIn = -1, pipeOut = -1;\r
+ bool createdFifoIn = false, createdFifoOut = false;\r
\r
const bool createdPipe;\r
- bool stopReadOperation;\r
+ std::atomic<bool> stopReadOperation { false };\r
\r
private:\r
static void signalHandler (int) {}\r
\r
- static uint32 getTimeoutEnd (const int timeOutMilliseconds)\r
+ static uint32 getTimeoutEnd (int timeOutMilliseconds)\r
{\r
return timeOutMilliseconds >= 0 ? Time::getMillisecondCounter() + (uint32) timeOutMilliseconds : 0;\r
}\r
\r
- static bool hasExpired (const uint32 timeoutEnd)\r
+ static bool hasExpired (uint32 timeoutEnd)\r
{\r
return timeoutEnd != 0 && Time::getMillisecondCounter() >= timeoutEnd;\r
}\r
\r
- int openPipe (const String& name, int flags, const uint32 timeoutEnd)\r
+ int openPipe (const String& name, int flags, uint32 timeoutEnd)\r
{\r
for (;;)\r
{\r
- const int p = ::open (name.toUTF8(), flags);\r
+ auto p = ::open (name.toUTF8(), flags);\r
\r
- if (p != -1 || hasExpired (timeoutEnd) || stopReadOperation)\r
+ if (p != -1 || hasExpired (timeoutEnd) || stopReadOperation.load())\r
return p;\r
\r
Thread::sleep (2);\r
}\r
}\r
\r
- static void waitForInput (const int handle, const int timeoutMsecs) noexcept\r
+ static void waitForInput (int handle, int timeoutMsecs) noexcept\r
{\r
struct timeval timeout;\r
timeout.tv_sec = timeoutMsecs / 1000;\r
}\r
}\r
\r
-bool NamedPipe::openInternal (const String& pipeName, const bool createPipe, bool mustNotExist)\r
+bool NamedPipe::openInternal (const String& pipeName, bool createPipe, bool mustNotExist)\r
{\r
#if JUCE_IOS\r
pimpl.reset (new Pimpl (File::getSpecialLocation (File::tempDirectory)\r
.getChildFile (File::createLegalFileName (pipeName)).getFullPathName(), createPipe));\r
#else\r
- String file (pipeName);\r
+ auto file = pipeName;\r
\r
if (! File::isAbsolutePath (file))\r
file = "/tmp/" + File::createLegalFileName (file);\r
void CriticalSection::exit() const noexcept { pthread_mutex_unlock (&lock); }\r
\r
//==============================================================================\r
-WaitableEvent::WaitableEvent (const bool useManualReset) noexcept\r
+WaitableEvent::WaitableEvent (bool useManualReset) noexcept\r
: triggered (false), manualReset (useManualReset)\r
{\r
pthread_cond_init (&condition, 0);\r
pthread_mutex_destroy (&mutex);\r
}\r
\r
-bool WaitableEvent::wait (const int timeOutMillisecs) const noexcept\r
+bool WaitableEvent::wait (int timeOutMillisecs) const noexcept\r
{\r
pthread_mutex_lock (&mutex);\r
\r
bool Process::setMaxNumberOfFileHandles (int newMaxNumber) noexcept\r
{\r
rlimit lim;\r
+\r
if (getrlimit (RLIMIT_NOFILE, &lim) == 0)\r
{\r
if (newMaxNumber <= 0 && lim.rlim_cur == RLIM_INFINITY && lim.rlim_max == RLIM_INFINITY)\r
return true;\r
\r
- if (lim.rlim_cur >= (rlim_t) newMaxNumber)\r
+ if (newMaxNumber > 0 && lim.rlim_cur >= (rlim_t) newMaxNumber)\r
return true;\r
}\r
\r
{\r
HeapBlock<char> heapBuffer;\r
\r
- char localBuffer [1024];\r
- char* cwd = getcwd (localBuffer, sizeof (localBuffer) - 1);\r
+ char localBuffer[1024];\r
+ auto cwd = getcwd (localBuffer, sizeof (localBuffer) - 1);\r
size_t bufferSize = 4096;\r
\r
while (cwd == nullptr && errno == ERANGE)\r
}\r
\r
#if JUCE_ANDROID\r
- typedef unsigned long juce_sigactionflags_type;\r
+ using juce_sigactionflags_type = unsigned long;\r
#else\r
- typedef int juce_sigactionflags_type;\r
+ using juce_sigactionflags_type = int;\r
#endif\r
\r
//==============================================================================\r
namespace\r
{\r
#if JUCE_LINUX || (JUCE_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)\r
- typedef struct stat64 juce_statStruct;\r
- #define JUCE_STAT stat64\r
+ using juce_statStruct = struct stat64;\r
+ #define JUCE_STAT stat64\r
#else\r
- typedef struct stat juce_statStruct;\r
- #define JUCE_STAT stat\r
+ using juce_statStruct = struct stat;\r
+ #define JUCE_STAT stat\r
#endif\r
\r
bool juce_stat (const String& fileName, juce_statStruct& info)\r
static int64 getCreationTime (const juce_statStruct& s) noexcept { return (int64) s.st_ctime; }\r
#endif\r
\r
- void updateStatInfoForFile (const String& path, bool* const isDir, int64* const fileSize,\r
- Time* const modTime, Time* const creationTime, bool* const isReadOnly)\r
+ void updateStatInfoForFile (const String& path, bool* isDir, int64* fileSize,\r
+ Time* modTime, Time* creationTime, bool* isReadOnly)\r
{\r
if (isDir != nullptr || fileSize != nullptr || modTime != nullptr || creationTime != nullptr)\r
{\r
static bool hasEffectiveRootFilePermissions()\r
{\r
#if JUCE_LINUX\r
- return (geteuid() == 0);\r
+ return geteuid() == 0;\r
#else\r
return false;\r
#endif\r
\r
void FileInputStream::openHandle()\r
{\r
- const int f = open (file.getFullPathName().toUTF8(), O_RDONLY, 00644);\r
+ auto f = open (file.getFullPathName().toUTF8(), O_RDONLY, 00644);\r
\r
if (f != -1)\r
fileHandle = fdToVoidPointer (f);\r
close (getFD (fileHandle));\r
}\r
\r
-size_t FileInputStream::readInternal (void* const buffer, const size_t numBytes)\r
+size_t FileInputStream::readInternal (void* buffer, size_t numBytes)\r
{\r
ssize_t result = 0;\r
\r
{\r
if (file.exists())\r
{\r
- const int f = open (file.getFullPathName().toUTF8(), O_RDWR, 00644);\r
+ auto f = open (file.getFullPathName().toUTF8(), O_RDWR, 00644);\r
\r
if (f != -1)\r
{\r
}\r
else\r
{\r
- const int f = open (file.getFullPathName().toUTF8(), O_RDWR + O_CREAT, 00644);\r
+ auto f = open (file.getFullPathName().toUTF8(), O_RDWR + O_CREAT, 00644);\r
\r
if (f != -1)\r
fileHandle = fdToVoidPointer (f);\r
}\r
}\r
\r
-ssize_t FileOutputStream::writeInternal (const void* const data, const size_t numBytes)\r
+ssize_t FileOutputStream::writeInternal (const void* data, size_t numBytes)\r
{\r
- ssize_t result = 0;\r
+ if (fileHandle == 0)\r
+ return 0;\r
\r
- if (fileHandle != 0)\r
- {\r
- result = ::write (getFD (fileHandle), data, numBytes);\r
+ auto result = ::write (getFD (fileHandle), data, numBytes);\r
\r
- if (result == -1)\r
- status = getResultForErrno();\r
- }\r
+ if (result == -1)\r
+ status = getResultForErrno();\r
\r
- return result;\r
+ return (ssize_t) result;\r
}\r
\r
#ifndef JUCE_ANDROID\r
//==============================================================================\r
String SystemStats::getEnvironmentVariable (const String& name, const String& defaultValue)\r
{\r
- if (const char* s = ::getenv (name.toUTF8()))\r
+ if (auto s = ::getenv (name.toUTF8()))\r
return String::fromUTF8 (s);\r
\r
return defaultValue;\r
\r
if (range.getStart() > 0)\r
{\r
- const long pageSize = sysconf (_SC_PAGE_SIZE);\r
+ auto pageSize = sysconf (_SC_PAGE_SIZE);\r
range.setStart (range.getStart() - (range.getStart() % pageSize));\r
}\r
\r
{\r
Dl_info exeInfo;\r
\r
- void* localSymbol = (void*) juce_getExecutableFile;\r
+ auto localSymbol = (void*) juce_getExecutableFile;\r
dladdr (localSymbol, &exeInfo);\r
return CharPointer_UTF8 (exeInfo.dli_fname);\r
}\r
int64 File::getBytesFreeOnVolume() const\r
{\r
struct statfs buf;\r
+\r
if (juce_doStatFS (*this, buf))\r
return (int64) buf.f_bsize * (int64) buf.f_bavail; // Note: this returns space available to non-super user\r
\r
int64 File::getVolumeTotalSize() const\r
{\r
struct statfs buf;\r
+\r
if (juce_doStatFS (*this, buf))\r
return (int64) buf.f_bsize * (int64) buf.f_blocks;\r
\r
{\r
u_int32_t length;\r
attrreference_t mountPointRef;\r
- char mountPointSpace [MAXPATHLEN];\r
+ char mountPointSpace[MAXPATHLEN];\r
} attrBuf;\r
\r
struct attrlist attrList;\r
- zerostruct (attrList); // (can't use "= { 0 }" on this object because it's typedef'ed as a C struct)\r
+ zerostruct (attrList); // (can't use "= {}" on this object because it's a C struct)\r
attrList.bitmapcount = ATTR_BIT_MAP_COUNT;\r
attrList.volattr = ATTR_VOL_INFO | ATTR_VOL_NAME;\r
\r
return String::fromUTF8 (((const char*) &attrBuf.mountPointRef) + attrBuf.mountPointRef.attr_dataoffset,\r
(int) attrBuf.mountPointRef.attr_length);\r
\r
- const File parent (f.getParentDirectory());\r
+ auto parent = f.getParentDirectory();\r
\r
if (f == parent)\r
break;\r
int result = 0;\r
/* int fd = open (getFullPathName().toUTF8(), O_RDONLY | O_NONBLOCK);\r
\r
- char info [512];\r
+ char info[512];\r
\r
#ifndef HDIO_GET_IDENTITY\r
#define HDIO_GET_IDENTITY 0x030d\r
String juce_getOutputFromCommand (const String& command)\r
{\r
// slight bodge here, as we just pipe the output into a temp file and read it...\r
- const File tempFile (File::getSpecialLocation (File::tempDirectory)\r
- .getNonexistentChildFile (String::toHexString (Random::getSystemRandom().nextInt()), ".tmp", false));\r
+ auto tempFile = File::getSpecialLocation (File::tempDirectory)\r
+ .getNonexistentChildFile (String::toHexString (Random::getSystemRandom().nextInt()), ".tmp", false);\r
\r
juce_runSystemCommand (command + " > " + tempFile.getFullPathName());\r
\r
- String result (tempFile.loadFileAsString());\r
+ auto result = tempFile.loadFileAsString();\r
tempFile.deleteFile();\r
return result;\r
}\r
class InterProcessLock::Pimpl\r
{\r
public:\r
- Pimpl (const String&, int)\r
- : handle (1), refCount (1) // On iOS just fake success..\r
- {\r
- }\r
+ Pimpl (const String&, int) {}\r
\r
- int handle, refCount;\r
+ int handle = 1, refCount = 1; // On iOS just fake success..\r
};\r
\r
#else\r
class InterProcessLock::Pimpl\r
{\r
public:\r
- Pimpl (const String& lockName, const int timeOutMillisecs)\r
- : handle (0), refCount (1)\r
+ Pimpl (const String& lockName, int timeOutMillisecs)\r
{\r
#if JUCE_MAC\r
if (! createLockFile (File ("~/Library/Caches/com.juce.locks").getChildFile (lockName), timeOutMillisecs))\r
\r
#else\r
File tempFolder ("/var/tmp");\r
+\r
if (! tempFolder.isDirectory())\r
tempFolder = "/tmp";\r
\r
closeFile();\r
}\r
\r
- bool createLockFile (const File& file, const int timeOutMillisecs)\r
+ bool createLockFile (const File& file, int timeOutMillisecs)\r
{\r
file.create();\r
handle = open (file.getFullPathName().toUTF8(), O_RDWR);\r
fl.l_whence = SEEK_SET;\r
fl.l_type = F_WRLCK;\r
\r
- const int64 endTime = Time::currentTimeMillis() + timeOutMillisecs;\r
+ auto endTime = Time::currentTimeMillis() + timeOutMillisecs;\r
\r
for (;;)\r
{\r
- const int result = fcntl (handle, F_SETLK, &fl);\r
+ auto result = fcntl (handle, F_SETLK, &fl);\r
\r
if (result >= 0)\r
return true;\r
\r
- const int error = errno;\r
+ auto error = errno;\r
\r
if (error != EINTR)\r
{\r
}\r
}\r
\r
- int handle, refCount;\r
+ int handle = 0, refCount = 1;\r
};\r
#endif\r
\r
{\r
}\r
\r
-bool InterProcessLock::enter (const int timeOutMillisecs)\r
+bool InterProcessLock::enter (int timeOutMillisecs)\r
{\r
const ScopedLock sl (lock);\r
\r
if (pthread_attr_init (&attr) == 0)\r
{\r
attrPtr = &attr;\r
-\r
pthread_attr_setstacksize (attrPtr, threadStackSize);\r
}\r
\r
#define SUPPORT_AFFINITIES 1\r
#endif\r
\r
-void JUCE_CALLTYPE Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)\r
+void JUCE_CALLTYPE Thread::setCurrentThreadAffinityMask (uint32 affinityMask)\r
{\r
#if SUPPORT_AFFINITIES\r
cpu_set_t affinity;\r
\r
\r
//==============================================================================\r
-static inline String readPosixConfigFileValue (const char* file, const char* const key)\r
+static inline String readPosixConfigFileValue (const char* file, const char* key)\r
{\r
StringArray lines;\r
File (file).readLines (lines);\r
#error // some crazy 3rd party headers (e.g. zlib) define this function as NULL!\r
#endif\r
\r
- if (childPID != 0)\r
+ if (readHandle == nullptr && childPID != 0)\r
readHandle = fdopen (pipeHandle, "r");\r
\r
if (readHandle != nullptr)\r
//==============================================================================\r
struct HighResolutionTimer::Pimpl\r
{\r
- Pimpl (HighResolutionTimer& t) : owner (t), thread (0), destroyThread (false), isRunning (false)\r
+ Pimpl (HighResolutionTimer& t) : owner (t)\r
{\r
pthread_condattr_t attr;\r
pthread_condattr_init (&attr);\r
}\r
\r
HighResolutionTimer& owner;\r
- int volatile periodMs;\r
+ std::atomic<int> periodMs;\r
\r
private:\r
- pthread_t thread;\r
+ pthread_t thread = {};\r
pthread_cond_t stopCond;\r
pthread_mutex_t timerMutex;\r
-\r
- bool volatile destroyThread;\r
- bool volatile isRunning;\r
+ std::atomic<bool> destroyThread { false }, isRunning { false };\r
\r
static void* timerThread (void* param)\r
{\r
\r
void timerThread()\r
{\r
- int lastPeriod = periodMs;\r
+ auto lastPeriod = periodMs.load();\r
Clock clock (lastPeriod);\r
\r
pthread_mutex_lock (&timerMutex);\r
if (isRunning)\r
owner.hiResTimerCallback();\r
\r
- if (lastPeriod != periodMs)\r
+ auto newPeriod = periodMs.load();\r
+\r
+ if (lastPeriod != newPeriod)\r
{\r
- lastPeriod = periodMs;\r
+ lastPeriod = newPeriod;\r
clock = Clock (lastPeriod);\r
}\r
}\r
\r
periodMs = 0;\r
-\r
pthread_mutex_unlock (&timerMutex);\r
pthread_exit (nullptr);\r
}\r
uint64_t time, delta;\r
mach_timebase_info_data_t timebase;\r
\r
- bool hasExpired(struct timespec& time_left) noexcept\r
+ bool hasExpired (struct timespec& time_left) noexcept\r
{\r
uint64_t now = mach_absolute_time();\r
\r
\r
uint64 time, delta;\r
\r
- bool hasExpired(struct timespec& expiryTime) noexcept\r
+ bool hasExpired (struct timespec& expiryTime) noexcept\r
{\r
struct timespec t;\r
clock_gettime (CLOCK_MONOTONIC, &t);\r
- uint64 now = (uint64) (1000000000 * (int64) t.tv_sec + (int64) t.tv_nsec);\r
+ auto now = (uint64) (1000000000 * (int64) t.tv_sec + (int64) t.tv_nsec);\r
\r
if (now < time)\r
{\r
\r
bool ChildProcess::start (const String& command, int streamFlags)\r
{\r
- activeProcess = new ActiveProcess (command, streamFlags);\r
+ activeProcess.reset (new ActiveProcess (command, streamFlags));\r
\r
if (! activeProcess->ok)\r
activeProcess = nullptr;\r
private:\r
//==============================================================================\r
JUCE_PUBLIC_IN_DLL_BUILD (class Pimpl)\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
String currentPipeName;\r
ReadWriteLock lock;\r
\r
: setOption (handle, IPPROTO_TCP, TCP_NODELAY, (int) 1));\r
}\r
\r
- static void closeSocket (volatile int& handle, CriticalSection& readLock,\r
- bool isListener, int portNumber, bool& connected) noexcept\r
+ static void closeSocket (std::atomic<int>& handle, CriticalSection& readLock,\r
+ bool isListener, int portNumber, std::atomic<bool>& connected) noexcept\r
{\r
- const SocketHandle h = handle;\r
+ const SocketHandle h = handle.load();\r
handle = -1;\r
\r
#if JUCE_WINDOWS\r
}\r
\r
static int readSocket (SocketHandle handle,\r
- void* const destBuffer, const int maxBytesToRead,\r
- bool volatile& connected,\r
+ void* destBuffer, int maxBytesToRead,\r
+ std::atomic<bool>& connected,\r
bool blockUntilSpecifiedAmountHasArrived,\r
CriticalSection& readLock,\r
String* senderIP = nullptr,\r
return (int) bytesRead;\r
}\r
\r
- static int waitForReadiness (const volatile int& handle, CriticalSection& readLock,\r
- const bool forReading, const int timeoutMsecs) noexcept\r
+ static int waitForReadiness (std::atomic<int>& handle, CriticalSection& readLock,\r
+ bool forReading, int timeoutMsecs) noexcept\r
{\r
// avoid race-condition\r
CriticalSection::ScopedTryLockType lock (readLock);\r
if (! lock.isLocked())\r
return -1;\r
\r
- int h = handle;\r
+ int h = handle.load();\r
\r
struct timeval timeout;\r
struct timeval* timeoutp;\r
#endif\r
\r
// we are closing\r
- if (handle < 0)\r
+ if (handle.load() < 0)\r
return -1;\r
\r
{\r
return FD_ISSET (h, forReading ? &rset : &wset) ? 1 : 0;\r
}\r
\r
- static bool setSocketBlockingState (SocketHandle handle, const bool shouldBlock) noexcept\r
+ static bool setSocketBlockingState (SocketHandle handle, bool shouldBlock) noexcept\r
{\r
#if JUCE_WINDOWS\r
u_long nonBlocking = shouldBlock ? 0 : (u_long) 1;\r
#endif\r
}\r
\r
- static addrinfo* getAddressInfo (const bool isDatagram, const String& hostName, int portNumber)\r
+ static addrinfo* getAddressInfo (bool isDatagram, const String& hostName, int portNumber)\r
{\r
struct addrinfo hints;\r
zerostruct (hints);\r
return nullptr;\r
}\r
\r
- static bool connectSocket (int volatile& handle,\r
+ static bool connectSocket (std::atomic<int>& handle,\r
CriticalSection& readLock,\r
const String& hostName,\r
- const int portNumber,\r
- const int timeOutMillisecs) noexcept\r
+ int portNumber,\r
+ int timeOutMillisecs) noexcept\r
{\r
bool success = false;\r
\r
if (errno == EINPROGRESS)\r
#endif\r
{\r
- const volatile int cvHandle = (int) newHandle;\r
+ std::atomic<int> cvHandle { (int) newHandle };\r
\r
if (waitForReadiness (cvHandle, readLock, false, timeOutMillisecs) == 1)\r
success = true;\r
}\r
\r
//==============================================================================\r
-int StreamingSocket::read (void* destBuffer, const int maxBytesToRead, bool shouldBlock)\r
+int StreamingSocket::read (void* destBuffer, int maxBytesToRead, bool shouldBlock)\r
{\r
return (connected && ! isListener) ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead,\r
connected, shouldBlock, readLock)\r
: -1;\r
}\r
\r
-int StreamingSocket::write (const void* sourceBuffer, const int numBytesToWrite)\r
+int StreamingSocket::write (const void* sourceBuffer, int numBytesToWrite)\r
{\r
if (isListener || ! connected)\r
return -1;\r
}\r
\r
//==============================================================================\r
-int StreamingSocket::waitUntilReady (const bool readyForReading,\r
- const int timeoutMsecs) const\r
+int StreamingSocket::waitUntilReady (bool readyForReading, int timeoutMsecs)\r
{\r
return connected ? SocketHelpers::waitForReadiness (handle, readLock, readyForReading, timeoutMsecs)\r
: -1;\r
}\r
\r
//==============================================================================\r
-bool StreamingSocket::bindToPort (const int port)\r
+bool StreamingSocket::bindToPort (int port)\r
{\r
return bindToPort (port, String());\r
}\r
\r
-bool StreamingSocket::bindToPort (const int port, const String& addr)\r
+bool StreamingSocket::bindToPort (int port, const String& addr)\r
{\r
jassert (SocketHelpers::isValidPortNumber (port));\r
\r
return SocketHelpers::getBoundPort (handle);\r
}\r
\r
-bool StreamingSocket::connect (const String& remoteHostName,\r
- const int remotePortNumber,\r
- const int timeOutMillisecs)\r
+bool StreamingSocket::connect (const String& remoteHostName, int remotePortNumber, int timeOutMillisecs)\r
{\r
jassert (SocketHelpers::isValidPortNumber (remotePortNumber));\r
\r
}\r
\r
//==============================================================================\r
-bool StreamingSocket::createListener (const int newPortNumber, const String& localHostName)\r
+bool StreamingSocket::createListener (int newPortNumber, const String& localHostName)\r
{\r
jassert (SocketHelpers::isValidPortNumber (newPortNumber));\r
\r
if (handle < 0)\r
return;\r
\r
- auto copyOfHandle = handle;\r
+ std::atomic<int> handleCopy { handle.load() };\r
handle = -1;\r
- bool connected = false;\r
- SocketHelpers::closeSocket (copyOfHandle, readLock, false, 0, connected);\r
+ std::atomic<bool> connected { false };\r
+ SocketHelpers::closeSocket (handleCopy, readLock, false, 0, connected);\r
}\r
\r
-bool DatagramSocket::bindToPort (const int port)\r
+bool DatagramSocket::bindToPort (int port)\r
{\r
return bindToPort (port, String());\r
}\r
\r
-bool DatagramSocket::bindToPort (const int port, const String& addr)\r
+bool DatagramSocket::bindToPort (int port, const String& addr)\r
{\r
jassert (SocketHelpers::isValidPortNumber (port));\r
\r
}\r
\r
//==============================================================================\r
-int DatagramSocket::waitUntilReady (const bool readyForReading,\r
- const int timeoutMsecs) const\r
+int DatagramSocket::waitUntilReady (bool readyForReading, int timeoutMsecs)\r
{\r
if (handle < 0)\r
return -1;\r
if (handle < 0 || ! isBound)\r
return -1;\r
\r
- bool connected = true;\r
+ std::atomic<bool> connected { true };\r
\r
SocketHelpers::setSocketBlockingState (handle, shouldBlock);\r
return SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead,\r
if (handle < 0 || ! isBound)\r
return -1;\r
\r
- bool connected = true;\r
+ std::atomic<bool> connected { true };\r
\r
SocketHelpers::setSocketBlockingState (handle, shouldBlock);\r
return SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead, connected,\r
If the socket is ready on return, this returns 1. If it times-out before\r
the socket becomes ready, it returns 0. If an error occurs, it returns -1.\r
*/\r
- int waitUntilReady (bool readyForReading,\r
- int timeoutMsecs) const;\r
+ int waitUntilReady (bool readyForReading, int timeoutMsecs);\r
\r
/** Reads bytes from the socket.\r
\r
private:\r
//==============================================================================\r
String hostName;\r
- int volatile portNumber = 0, handle = -1;\r
- bool connected = false, isListener = false;\r
+ std::atomic<int> portNumber { 0 }, handle { -1 };\r
+ std::atomic<bool> connected { false };\r
+ bool isListener = false;\r
mutable CriticalSection readLock;\r
\r
StreamingSocket (const String& hostname, int portNumber, int handle);\r
If the socket is ready on return, this returns 1. If it times-out before\r
the socket becomes ready, it returns 0. If an error occurs, it returns -1.\r
*/\r
- int waitUntilReady (bool readyForReading,\r
- int timeoutMsecs) const;\r
+ int waitUntilReady (bool readyForReading, int timeoutMsecs);\r
\r
/** Reads bytes from the socket.\r
\r
\r
//==============================================================================\r
/** Join a multicast group.\r
-\r
@returns true if it succeeds.\r
*/\r
bool joinMulticast (const String& multicastIPAddress);\r
\r
/** Leave a multicast group.\r
-\r
@returns true if it succeeds.\r
*/\r
bool leaveMulticast (const String& multicastIPAddress);\r
\r
/** Enables or disables multicast loopback.\r
-\r
@returns true if it succeeds.\r
*/\r
bool setMulticastLoopbackEnabled (bool enableLoopback);\r
\r
private:\r
//==============================================================================\r
- int handle = -1;\r
+ std::atomic<int> handle { -1 };\r
bool isBound = false;\r
String lastBindAddress, lastServerHost;\r
int lastServerPort = -1;\r
}\r
\r
//==============================================================================\r
- const ScopedPointer<FileOutputStream> fileStream;\r
- const ScopedPointer<WebInputStream> stream;\r
+ const std::unique_ptr<FileOutputStream> fileStream;\r
+ const std::unique_ptr<WebInputStream> stream;\r
const size_t bufferSize;\r
HeapBlock<char> buffer;\r
URL::DownloadTask::Listener* const listener;\r
const size_t bufferSize = 0x8000;\r
targetFileToUse.deleteFile();\r
\r
- ScopedPointer<FileOutputStream> outputStream (targetFileToUse.createOutputStream (bufferSize));\r
+ std::unique_ptr<FileOutputStream> outputStream (targetFileToUse.createOutputStream (bufferSize));\r
\r
if (outputStream != nullptr)\r
{\r
- ScopedPointer<WebInputStream> stream (new WebInputStream (urlToUse, usePostRequest));\r
+ std::unique_ptr<WebInputStream> stream (new WebInputStream (urlToUse, usePostRequest));\r
stream->withExtraHeaders (extraHeadersToUse);\r
\r
if (stream->connect (nullptr))\r
if (localFile == File())\r
return;\r
\r
+ #if JUCE_WINDOWS\r
+ bool isUncPath = localFile.getFullPathName().startsWith ("\\\\");\r
+ #endif\r
+\r
while (! localFile.isRoot())\r
{\r
url = "/" + addEscapeChars (localFile.getFileName(), false) + url;\r
\r
url = addEscapeChars (localFile.getFileName(), false) + url;\r
\r
- if (! url.startsWithChar (L'/'))\r
- url = "/" + url;\r
+ #if JUCE_WINDOWS\r
+ if (isUncPath)\r
+ {\r
+ url = url.fromFirstOccurrenceOf ("/", false, false);\r
+ }\r
+ else\r
+ #endif\r
+ {\r
+ if (! url.startsWithChar (L'/'))\r
+ url = "/" + url;\r
+ }\r
+\r
\r
url = "file://" + url;\r
\r
\r
auto path = removeEscapeChars (fileURL.getDomain()).replace ("+", "%2B");\r
\r
- #ifndef JUCE_WINDOWS\r
+ #ifdef JUCE_WINDOWS\r
+ bool isUncPath = (! fileURL.url.startsWith ("file:///"));\r
+ #else\r
path = File::getSeparatorString() + path;\r
#endif\r
\r
for (auto urlElement : urlElements)\r
path += File::getSeparatorString() + removeEscapeChars (urlElement.replace ("+", "%2B"));\r
\r
+ #ifdef JUCE_WINDOWS\r
+ if (isUncPath)\r
+ path = "\\\\" + path;\r
+ #endif\r
+\r
return path;\r
}\r
\r
\r
}\r
\r
- ScopedPointer<WebInputStream> wi (new WebInputStream (*this, usePostCommand));\r
+ std::unique_ptr<WebInputStream> wi (new WebInputStream (*this, usePostCommand));\r
\r
struct ProgressCallbackCaller : public WebInputStream::Listener\r
{\r
ProgressCallbackCaller& operator= (const ProgressCallbackCaller&) { jassertfalse; return *this; }\r
};\r
\r
- ScopedPointer<ProgressCallbackCaller> callbackCaller\r
+ std::unique_ptr<ProgressCallbackCaller> callbackCaller\r
(progressCallback != nullptr ? new ProgressCallbackCaller (progressCallback, progressCallbackContext) : nullptr);\r
\r
if (headers.isNotEmpty())\r
//==============================================================================\r
bool URL::readEntireBinaryStream (MemoryBlock& destData, bool usePostCommand) const\r
{\r
- const ScopedPointer<InputStream> in (isLocalFile() ? getLocalFile().createInputStream()\r
- : static_cast<InputStream*> (createInputStream (usePostCommand)));\r
+ const std::unique_ptr<InputStream> in (isLocalFile() ? getLocalFile().createInputStream()\r
+ : static_cast<InputStream*> (createInputStream (usePostCommand)));\r
\r
if (in != nullptr)\r
{\r
\r
String URL::readEntireTextStream (bool usePostCommand) const\r
{\r
- const ScopedPointer<InputStream> in (isLocalFile() ? getLocalFile().createInputStream()\r
- : static_cast<InputStream*> (createInputStream (usePostCommand)));\r
+ const std::unique_ptr<InputStream> in (isLocalFile() ? getLocalFile().createInputStream()\r
+ : static_cast<InputStream*> (createInputStream (usePostCommand)));\r
\r
if (in != nullptr)\r
return in->readEntireStreamAsString();\r
Upload (const String&, const String&, const String&, const File&, MemoryBlock*);\r
String parameterName, filename, mimeType;\r
File file;\r
- ScopedPointer<MemoryBlock> data;\r
+ std::unique_ptr<MemoryBlock> data;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Upload)\r
};\r
\r
bool OutputStream::writeString (const String& text)\r
{\r
+ auto numBytes = text.getNumBytesAsUTF8() + 1;\r
+\r
#if (JUCE_STRING_UTF_TYPE == 8)\r
- return write (text.toRawUTF8(), text.getNumBytesAsUTF8() + 1);\r
+ return write (text.toRawUTF8(), numBytes);\r
#else\r
// (This avoids using toUTF8() to prevent the memory bloat that it would leave behind\r
// if lots of large, persistent strings were to be written to streams).\r
- const size_t numBytes = text.getNumBytesAsUTF8() + 1;\r
HeapBlock<char> temp (numBytes);\r
text.copyToUTF8 (temp, numBytes);\r
return write (temp, numBytes);\r
#endif\r
}\r
\r
-bool OutputStream::writeText (const String& text, bool asUTF16, bool writeUTF16ByteOrderMark)\r
+bool OutputStream::writeText (const String& text, bool asUTF16, bool writeUTF16ByteOrderMark, const char* lf)\r
{\r
+ bool replaceLineFeedWithUnix = lf != nullptr && lf[0] == '\n' && lf[1] == 0;\r
+ bool replaceLineFeedWithWindows = lf != nullptr && lf[0] == '\r' && lf[1] == '\n' && lf[2] == 0;\r
+\r
+ // The line-feed passed in must be either nullptr, or "\n" or "\r\n"\r
+ jassert (lf == nullptr || replaceLineFeedWithWindows || replaceLineFeedWithUnix);\r
+\r
if (asUTF16)\r
{\r
if (writeUTF16ByteOrderMark)\r
if (c == 0)\r
break;\r
\r
- if (c == '\n' && ! lastCharWasReturn)\r
- writeShort ((short) '\r');\r
+ if (replaceLineFeedWithWindows)\r
+ {\r
+ if (c == '\n' && ! lastCharWasReturn)\r
+ writeShort ((short) '\r');\r
\r
- lastCharWasReturn = (c == L'\r');\r
+ lastCharWasReturn = (c == L'\r');\r
+ }\r
+ else if (replaceLineFeedWithUnix && c == '\r')\r
+ {\r
+ continue;\r
+ }\r
\r
if (! writeShort ((short) c))\r
return false;\r
}\r
else\r
{\r
- const char* src = text.toUTF8();\r
- auto* t = src;\r
+ const char* src = text.toRawUTF8();\r
\r
- for (;;)\r
+ if (replaceLineFeedWithWindows)\r
{\r
- if (*t == '\n')\r
+ for (auto t = src;;)\r
{\r
- if (t > src)\r
- if (! write (src, (size_t) (t - src)))\r
- return false;\r
+ if (*t == '\n')\r
+ {\r
+ if (t > src)\r
+ if (! write (src, (size_t) (t - src)))\r
+ return false;\r
\r
- if (! write ("\r\n", 2))\r
- return false;\r
+ if (! write ("\r\n", 2))\r
+ return false;\r
\r
- src = t + 1;\r
+ src = t + 1;\r
+ }\r
+ else if (*t == '\r')\r
+ {\r
+ if (t[1] == '\n')\r
+ ++t;\r
+ }\r
+ else if (*t == 0)\r
+ {\r
+ if (t > src)\r
+ if (! write (src, (size_t) (t - src)))\r
+ return false;\r
+\r
+ break;\r
+ }\r
+\r
+ ++t;\r
}\r
- else if (*t == '\r')\r
- {\r
- if (t[1] == '\n')\r
- ++t;\r
- }\r
- else if (*t == 0)\r
+ }\r
+ else if (replaceLineFeedWithUnix)\r
+ {\r
+ for (;;)\r
{\r
- if (t > src)\r
- if (! write (src, (size_t) (t - src)))\r
- return false;\r
+ auto c = *src++;\r
\r
- break;\r
- }\r
+ if (c == 0)\r
+ break;\r
\r
- ++t;\r
+ if (c != '\r')\r
+ if (! writeByte (c))\r
+ return false;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ return write (src, text.getNumBytesAsUTF8());\r
}\r
}\r
\r
}\r
\r
//==============================================================================\r
-void OutputStream::setNewLineString (const String& newLineString_)\r
+void OutputStream::setNewLineString (const String& newLineStringToUse)\r
{\r
- newLineString = newLineString_;\r
+ newLineString = newLineStringToUse;\r
}\r
\r
//==============================================================================\r
bytes (0xff, 0xfe) to indicate the endianness (these should only be used at the start\r
of a file).\r
\r
- The method also replaces '\\n' characters in the text with '\\r\\n'.\r
+ If lineEndings is nullptr, then line endings in the text won't be modified. If you\r
+ pass "\\n" or "\\r\\n" then this function will replace any existing line feeds.\r
+\r
@returns false if the write operation fails for some reason\r
*/\r
virtual bool writeText (const String& text,\r
bool asUTF16,\r
- bool writeUTF16ByteOrderMark);\r
+ bool writeUTF16ByteOrderMark,\r
+ const char* lineEndings);\r
\r
/** Reads data from an input stream and writes it to this stream.\r
\r
#endif\r
\r
#define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1\r
- #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1\r
- #define JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT 1\r
\r
#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500\r
#define JUCE_HAS_CONSTEXPR 1\r
#define JUCE_EXCEPTIONS_DISABLED 1\r
#endif\r
#endif\r
+\r
+ #define JUCE_CXX14_IS_AVAILABLE (__cplusplus >= 201402L)\r
+ #define JUCE_CXX17_IS_AVAILABLE (__cplusplus >= 201703L)\r
+\r
#endif\r
\r
//==============================================================================\r
#define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1\r
#define JUCE_HAS_CONSTEXPR 1\r
\r
- #if defined (_LIBCPP_VERSION) || ! (JUCE_MAC || JUCE_IOS)\r
- #define JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT 1\r
- #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1\r
- #endif\r
-\r
#ifndef JUCE_COMPILER_SUPPORTS_ARC\r
#define JUCE_COMPILER_SUPPORTS_ARC 1\r
#endif\r
#endif\r
#endif\r
\r
+ #define JUCE_CXX14_IS_AVAILABLE (__cplusplus >= 201402L)\r
+ #define JUCE_CXX17_IS_AVAILABLE (__cplusplus >= 201703L)\r
+\r
#endif\r
\r
//==============================================================================\r
#error "JUCE requires Visual Studio 2013 or later"\r
#endif\r
\r
- #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1\r
- #define JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT 1\r
-\r
#if _MSC_VER >= 1900 // VS2015\r
#define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1\r
#define JUCE_HAS_CONSTEXPR 1\r
#define JUCE_EXCEPTIONS_DISABLED 1\r
#endif\r
#endif\r
+\r
+ #define JUCE_CXX14_IS_AVAILABLE (_MSVC_LANG >= 201402L)\r
+ #define JUCE_CXX17_IS_AVAILABLE (_MSVC_LANG >= 201703L)\r
+#endif\r
+\r
+//==============================================================================\r
+// C++ library\r
+#if (defined (__GLIBCXX__) && __GLIBCXX__ < 20130322) || (defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION < 3700))\r
+ #error "JUCE requires a C++ library containing std::atomic"\r
#endif\r
\r
//==============================================================================\r
// These are old flags that are now supported on all compatible build targets\r
#define JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL 1\r
#define JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES 1\r
+ #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1\r
#define JUCE_DELETED_FUNCTION = delete\r
#endif\r
-\r
-//==============================================================================\r
-#if JUCE_ANDROID\r
- #define JUCE_ATOMIC_AVAILABLE 1\r
-#elif defined(_LIBCPP_VERSION)\r
- #define JUCE_ATOMIC_AVAILABLE (_LIBCPP_VERSION >= 3700)\r
-#elif defined (__GLIBCXX__)\r
- #define JUCE_ATOMIC_AVAILABLE (__GLIBCXX__ >= 20130322) // GCC versions 4.8 and later\r
-#elif defined (_MSC_VER)\r
- #define JUCE_ATOMIC_AVAILABLE 1 // Visual Studio 2013 and later\r
-#else\r
- #define JUCE_ATOMIC_AVAILABLE 0\r
-#endif\r
#define JUCE_DEPRECATED_WITH_BODY(functionDef, body) functionDef body\r
#endif\r
\r
+#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
+ #if ! (defined (DOXYGEN) || defined (JUCE_GCC) || (JUCE_MSVC && _MSC_VER <= 1900))\r
+ #define JUCE_DEPRECATED_STATIC(valueDef) JUCE_DEPRECATED (valueDef)\r
+\r
+ #if JUCE_MSVC\r
+ #define JUCE_DECLARE_DEPRECATED_STATIC(valueDef) \\r
+ __pragma(warning(push)) \\r
+ __pragma(warning(disable:4996)) \\r
+ valueDef \\r
+ __pragma(warning(pop))\r
+ #else\r
+ #define JUCE_DECLARE_DEPRECATED_STATIC(valueDef) valueDef\r
+ #endif\r
+ #else\r
+ #define JUCE_DEPRECATED_STATIC(valueDef) valueDef\r
+ #define JUCE_DECLARE_DEPRECATED_STATIC(valueDef) valueDef\r
+ #endif\r
+#else\r
+ #define JUCE_DEPRECATED_STATIC(valueDef)\r
+ #define JUCE_DECLARE_DEPRECATED_STATIC(valueDef)\r
+#endif\r
+\r
//==============================================================================\r
#if JUCE_ANDROID && ! DOXYGEN\r
#define JUCE_MODAL_LOOPS_PERMITTED 0\r
*/\r
#define JUCE_MAJOR_VERSION 5\r
#define JUCE_MINOR_VERSION 3\r
-#define JUCE_BUILDNUMBER 1\r
+#define JUCE_BUILDNUMBER 2\r
\r
/** Current JUCE version number.\r
\r
#include <functional>\r
#include <algorithm>\r
#include <limits>\r
+#include <atomic>\r
\r
//==============================================================================\r
#include "juce_CompilerSupport.h"\r
#undef minor\r
#undef KeyPress\r
\r
-// Include a replacement for std::function on older platforms and the live\r
-// build\r
-#if JUCE_PROJUCER_LIVE_BUILD || ! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)\r
+// Include a replacement for std::function\r
+#if JUCE_PROJUCER_LIVE_BUILD\r
#include "../misc/juce_StdFunctionCompat.h"\r
#endif\r
\r
-// Include std::atomic if it's supported by the compiler\r
-#if JUCE_ATOMIC_AVAILABLE\r
- #include <atomic>\r
-#endif\r
-\r
//==============================================================================\r
// DLL building settings on Windows\r
#if JUCE_MSVC\r
class CharPointer_ASCII final\r
{\r
public:\r
- typedef char CharType;\r
+ using CharType = char;\r
\r
inline explicit CharPointer_ASCII (const CharType* rawPointer) noexcept\r
: data (const_cast<CharType*> (rawPointer))\r
{\r
public:\r
#if JUCE_NATIVE_WCHAR_IS_UTF16\r
- typedef wchar_t CharType;\r
+ using CharType = wchar_t;\r
#else\r
- typedef int16 CharType;\r
+ using CharType = int16;\r
#endif\r
\r
inline explicit CharPointer_UTF16 (const CharType* rawPointer) noexcept\r
class CharPointer_UTF32 final\r
{\r
public:\r
- typedef juce_wchar CharType;\r
+ using CharType = juce_wchar;\r
\r
inline explicit CharPointer_UTF32 (const CharType* rawPointer) noexcept\r
: data (const_cast<CharType*> (rawPointer))\r
class CharPointer_UTF8 final\r
{\r
public:\r
- typedef char CharType;\r
+ using CharType = char;\r
\r
inline explicit CharPointer_UTF8 (const CharType* rawPointer) noexcept\r
: data (const_cast<CharType*> (rawPointer))\r
\r
if (n < 0)\r
{\r
- juce_wchar bit = 0x40;\r
+ uint8 bit = 0x40;\r
\r
- while ((static_cast<juce_wchar> (n) & bit) != 0 && bit > 0x8)\r
+ while ((static_cast<uint8> (n) & bit) != 0 && bit > 0x8)\r
{\r
++data;\r
bit >>= 1;\r
\r
#if JUCE_NATIVE_WCHAR_IS_UTF32 || DOXYGEN\r
/** A platform-independent 32-bit unicode character type. */\r
- typedef wchar_t juce_wchar;\r
+ using juce_wchar = wchar_t;\r
#else\r
- typedef uint32 juce_wchar;\r
+ using juce_wchar = uint32;\r
#endif\r
\r
#ifndef DOXYGEN\r
// GNU libstdc++ does not have std::make_unsigned\r
namespace internal\r
{\r
- template <typename Type> struct make_unsigned { typedef Type type; };\r
- template <> struct make_unsigned<signed char> { typedef unsigned char type; };\r
- template <> struct make_unsigned<char> { typedef unsigned char type; };\r
- template <> struct make_unsigned<short> { typedef unsigned short type; };\r
- template <> struct make_unsigned<int> { typedef unsigned int type; };\r
- template <> struct make_unsigned<long> { typedef unsigned long type; };\r
- template <> struct make_unsigned<long long> { typedef unsigned long long type; };\r
+ template <typename Type> struct make_unsigned { using type = Type; };\r
+ template <> struct make_unsigned<signed char> { using type = unsigned char; };\r
+ template <> struct make_unsigned<char> { using type = unsigned char; };\r
+ template <> struct make_unsigned<short> { using type = unsigned short; };\r
+ template <> struct make_unsigned<int> { using type = unsigned int; };\r
+ template <> struct make_unsigned<long> { using type = unsigned long; };\r
+ template <> struct make_unsigned<long long> { using type = unsigned long long; };\r
}\r
\r
#endif\r
template <typename IntType, typename CharPointerType>\r
static IntType getIntValue (const CharPointerType text) noexcept\r
{\r
- typedef typename internal::make_unsigned<IntType>::type UIntType;\r
+ using UIntType = typename internal::make_unsigned<IntType>::type;\r
\r
UIntType v = 0;\r
auto s = text.findEndOfWhitespace();\r
{\r
LeakAvoidanceTrick()\r
{\r
- const ScopedPointer<LocalisedStrings> dummy (new LocalisedStrings (String(), false));\r
+ const std::unique_ptr<LocalisedStrings> dummy (new LocalisedStrings (String(), false));\r
}\r
};\r
\r
#endif\r
\r
SpinLock currentMappingsLock;\r
- ScopedPointer<LocalisedStrings> currentMappings;\r
+ std::unique_ptr<LocalisedStrings> currentMappings;\r
\r
static int findCloseQuote (const String& text, int startPos)\r
{\r
String languageName;\r
StringArray countryCodes;\r
StringPairArray translations;\r
- ScopedPointer<LocalisedStrings> fallback;\r
+ std::unique_ptr<LocalisedStrings> fallback;\r
friend struct ContainerDeletePolicy<LocalisedStrings>;\r
\r
void loadFromText (const String&, bool ignoreCase);\r
#endif\r
\r
#if JUCE_NATIVE_WCHAR_IS_UTF8\r
- typedef CharPointer_UTF8 CharPointer_wchar_t;\r
+ using CharPointer_wchar_t = CharPointer_UTF8;\r
#elif JUCE_NATIVE_WCHAR_IS_UTF16\r
- typedef CharPointer_UTF16 CharPointer_wchar_t;\r
+ using CharPointer_wchar_t = CharPointer_UTF16;\r
#else\r
- typedef CharPointer_UTF32 CharPointer_wchar_t;\r
+ using CharPointer_wchar_t = CharPointer_UTF32;\r
#endif\r
\r
static inline CharPointer_wchar_t castToCharPointer_wchar_t (const void* t) noexcept\r
public:\r
StringHolder() = delete;\r
\r
- typedef String::CharPointerType CharPointerType;\r
- typedef String::CharPointerType::CharType CharType;\r
+ using CharPointerType = String::CharPointerType;\r
+ using CharType = String::CharPointerType::CharType;\r
\r
//==============================================================================\r
static CharPointerType createUninitialisedBytes (size_t numBytes)\r
}\r
};\r
\r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const String String::empty;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const String String::empty);\r
\r
//==============================================================================\r
String::String() noexcept : text (&(emptyString.text))\r
}\r
}\r
\r
-String& String::operator+= (const wchar_t* const t)\r
+String& String::operator+= (const wchar_t* t)\r
{\r
appendCharPointer (castToCharPointer_wchar_t (t));\r
return *this;\r
}\r
\r
-String& String::operator+= (const char* const t)\r
+String& String::operator+= (const char* t)\r
{\r
appendCharPointer (CharPointer_UTF8 (t)); // (using UTF8 here triggers a faster code-path than ascii)\r
return *this;\r
return operator+= (String (other));\r
}\r
\r
-String& String::operator+= (const char ch)\r
+String& String::operator+= (char ch)\r
{\r
const char asString[] = { ch, 0 };\r
return operator+= (asString);\r
}\r
\r
-String& String::operator+= (const wchar_t ch)\r
+String& String::operator+= (wchar_t ch)\r
{\r
const wchar_t asString[] = { ch, 0 };\r
return operator+= (asString);\r
}\r
\r
#if ! JUCE_NATIVE_WCHAR_IS_UTF32\r
-String& String::operator+= (const juce_wchar ch)\r
+String& String::operator+= (juce_wchar ch)\r
{\r
const juce_wchar asString[] = { ch, 0 };\r
appendCharPointer (CharPointer_UTF32 (asString));\r
String& String::operator+= (const uint64 number) { return StringHelpers::operationAddAssign<uint64> (*this, number); }\r
\r
//==============================================================================\r
-JUCE_API String JUCE_CALLTYPE operator+ (const char* const s1, const String& s2) { String s (s1); return s += s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (const wchar_t* const s1, const String& s2) { String s (s1); return s += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (const char* s1, const String& s2) { String s (s1); return s += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (const wchar_t* s1, const String& s2) { String s (s1); return s += s2; }\r
\r
-JUCE_API String JUCE_CALLTYPE operator+ (const char s1, const String& s2) { return String::charToString ((juce_wchar) (uint8) s1) + s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (const wchar_t s1, const String& s2) { return String::charToString (s1) + s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (char s1, const String& s2) { return String::charToString ((juce_wchar) (uint8) s1) + s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (wchar_t s1, const String& s2) { return String::charToString (s1) + s2; }\r
\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const String& s2) { return s1 += s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const char* const s2) { return s1 += s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const wchar_t* s2) { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, const String& s2) { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, const char* s2) { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, const wchar_t* s2) { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, const std::string& s2) { return s1 += s2.c_str(); }\r
\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const char s2) { return s1 += s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const wchar_t s2) { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, char s2) { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, wchar_t s2) { return s1 += s2; }\r
\r
#if ! JUCE_NATIVE_WCHAR_IS_UTF32\r
-JUCE_API String JUCE_CALLTYPE operator+ (const juce_wchar s1, const String& s2) { return String::charToString (s1) + s2; }\r
-JUCE_API String JUCE_CALLTYPE operator+ (String s1, const juce_wchar s2) { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const juce_wchar s2) { return s1 += s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (juce_wchar s1, const String& s2) { return String::charToString (s1) + s2; }\r
+JUCE_API String JUCE_CALLTYPE operator+ (String s1, juce_wchar s2) { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, juce_wchar s2) { return s1 += s2; }\r
#endif\r
\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const char s2) { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const wchar_t s2) { return s1 += s2; }\r
-\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const char* const s2) { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const wchar_t* const s2) { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const String& s2) { return s1 += s2; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, StringRef s2) { return s1 += s2; }\r
-\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, uint8 number) { return s1 += (int) number; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const short number) { return s1 += (int) number; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const int number) { return s1 += number; }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const long number) { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const unsigned long number) { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const int64 number) { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const uint64 number) { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const float number) { return s1 += String (number); }\r
-JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const double number) { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, char s2) { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, wchar_t s2) { return s1 += s2; }\r
+\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const char* s2) { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const wchar_t* s2) { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const String& s2) { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, StringRef s2) { return s1 += s2; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const std::string& s2) { return s1 += s2.c_str(); }\r
+\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, uint8 number) { return s1 += (int) number; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, short number) { return s1 += (int) number; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, int number) { return s1 += number; }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, long number) { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, unsigned long number) { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, int64 number) { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, uint64 number) { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, float number) { return s1 += String (number); }\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, double number) { return s1 += String (number); }\r
\r
JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const String& text)\r
{\r
}\r
\r
//==============================================================================\r
-int String::indexOfChar (const juce_wchar character) const noexcept\r
+int String::indexOfChar (juce_wchar character) const noexcept\r
{\r
return text.indexOf (character);\r
}\r
\r
-int String::indexOfChar (const int startIndex, const juce_wchar character) const noexcept\r
+int String::indexOfChar (int startIndex, juce_wchar character) const noexcept\r
{\r
auto t = text;\r
\r
return -1;\r
}\r
\r
-int String::lastIndexOfChar (const juce_wchar character) const noexcept\r
+int String::lastIndexOfChar (juce_wchar character) const noexcept\r
{\r
auto t = text;\r
int last = -1;\r
return last;\r
}\r
\r
-int String::indexOfAnyOf (StringRef charactersToLookFor, const int startIndex, const bool ignoreCase) const noexcept\r
+int String::indexOfAnyOf (StringRef charactersToLookFor, int startIndex, bool ignoreCase) const noexcept\r
{\r
auto t = text;\r
\r
return other.isEmpty() ? 0 : CharacterFunctions::indexOfIgnoreCase (text, other.text);\r
}\r
\r
-int String::indexOf (const int startIndex, StringRef other) const noexcept\r
+int String::indexOf (int startIndex, StringRef other) const noexcept\r
{\r
if (other.isEmpty())\r
return -1;\r
jassert (stringLiteral.getAddress() != nullptr); // This must be a valid string literal, not a null pointer!!\r
}\r
\r
-StringRef::StringRef (const String& string) noexcept : text (string.getCharPointer()) {}\r
+StringRef::StringRef (const String& string) noexcept : text (string.getCharPointer()) {}\r
+StringRef::StringRef (const std::string& string) : StringRef (string.c_str()) {}\r
\r
\r
//==============================================================================\r
int getReferenceCount() const noexcept;\r
\r
//==============================================================================\r
- #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
- /** This was a static empty string object, but is now deprecated as it's too easy to accidentally\r
+ /* This was a static empty string object, but is now deprecated as it's too easy to accidentally\r
use it indirectly during a static constructor, leading to hard-to-find order-of-initialisation\r
problems.\r
@deprecated If you need an empty String object, just use String() or {}.\r
empty string from a function by reference, but if you need to do that, it's easy enough to use\r
a function-local static String object and return that, avoiding any order-of-initialisation issues.\r
*/\r
- static const String empty;\r
- #endif\r
+ JUCE_DEPRECATED_STATIC (static const String empty);\r
\r
private:\r
//==============================================================================\r
/** Concatenates two strings. */\r
JUCE_API String JUCE_CALLTYPE operator+ (String string1, const wchar_t* string2);\r
/** Concatenates two strings. */\r
+JUCE_API String JUCE_CALLTYPE operator+ (String string1, const std::string& string2);\r
+/** Concatenates two strings. */\r
JUCE_API String JUCE_CALLTYPE operator+ (String string1, char characterToAppend);\r
/** Concatenates two strings. */\r
JUCE_API String JUCE_CALLTYPE operator+ (String string1, wchar_t characterToAppend);\r
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const String& string2);\r
/** Appends a string to the end of the first one. */\r
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, StringRef string2);\r
+/** Appends a string to the end of the first one. */\r
+JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const std::string& string2);\r
\r
/** Appends a decimal number to the end of a string. */\r
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, uint8 number);\r
\r
} // namespace juce\r
\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && ! DOXYGEN // just used to avoid compiling this under compilers that lack libc++\r
+#if ! DOXYGEN\r
namespace std\r
{\r
template <> struct hash<juce::String>\r
strings.addArray (initialStrings, numberOfStrings);\r
}\r
\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
StringArray::StringArray (const std::initializer_list<const char*>& stringList)\r
{\r
strings.addArray (stringList);\r
}\r
-#endif\r
\r
StringArray& StringArray::operator= (const StringArray& other)\r
{\r
template <typename... OtherElements>\r
StringArray (StringRef firstValue, OtherElements... otherValues) : strings (firstValue, otherValues...) {}\r
\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
+ /** Creates an array containing a list of strings. */\r
StringArray (const std::initializer_list<const char*>& strings);\r
- #endif\r
\r
/** Creates an array from a raw array of strings.\r
@param strings an array of strings to add\r
*/\r
StringRef (const String& string) noexcept;\r
\r
+ /** Creates a StringRef from a String.\r
+ The StringRef object does NOT take ownership or copy the data from the std::string,\r
+ so you must ensure that the source string object is not modified or deleted during\r
+ the lifetime of the StringRef.\r
+ */\r
+ StringRef (const std::string& string);\r
+\r
/** Creates a StringRef pointer to an empty string. */\r
StringRef() noexcept;\r
\r
//==============================================================================\r
class ActiveProcess;\r
friend struct ContainerDeletePolicy<ActiveProcess>;\r
- ScopedPointer<ActiveProcess> activeProcess;\r
+ std::unique_ptr<ActiveProcess> activeProcess;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcess)\r
};\r
struct Pimpl;\r
friend struct Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HighResolutionTimer)\r
};\r
//==============================================================================\r
class Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
CriticalSection lock;\r
String name;\r
{\r
CurrentThreadHolder() noexcept {}\r
\r
- typedef ReferenceCountedObjectPtr<CurrentThreadHolder> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<CurrentThreadHolder>;\r
ThreadLocalValue<Thread*> value;\r
\r
JUCE_DECLARE_NON_COPYABLE (CurrentThreadHolder)\r
\r
//==============================================================================\r
/** Used to receive callbacks for thread exit calls */\r
- class Listener\r
+ class JUCE_API Listener\r
{\r
public:\r
virtual ~Listener() {}\r
namespace juce\r
{\r
\r
-class ThreadPool::ThreadPoolThread : public Thread\r
+struct ThreadPool::ThreadPoolThread : public Thread\r
{\r
-public:\r
ThreadPoolThread (ThreadPool& p, size_t stackSize)\r
: Thread ("Pool", stackSize), pool (p)\r
{\r
wait (500);\r
}\r
\r
- ThreadPoolJob* volatile currentJob = nullptr;\r
+ std::atomic<ThreadPoolJob*> currentJob { nullptr };\r
ThreadPool& pool;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ThreadPoolThread)\r
ThreadPoolJob* ThreadPoolJob::getCurrentThreadPoolJob()\r
{\r
if (auto* t = dynamic_cast<ThreadPool::ThreadPoolThread*> (Thread::getCurrentThread()))\r
- return t->currentJob;\r
+ return t->currentJob.load();\r
\r
return nullptr;\r
}\r
{\r
\r
class ThreadPool;\r
-class ThreadPoolThread;\r
-\r
\r
//==============================================================================\r
/**\r
//==============================================================================\r
private:\r
friend class ThreadPool;\r
- friend class ThreadPoolThread;\r
String jobName;\r
ThreadPool* pool = nullptr;\r
bool shouldStop = false, isActive = false, shouldBeDeleted = false;\r
//==============================================================================\r
Array<ThreadPoolJob*> jobs;\r
\r
- class ThreadPoolThread;\r
+ struct ThreadPoolThread;\r
friend class ThreadPoolJob;\r
- friend class ThreadPoolThread;\r
+ friend struct ThreadPoolThread;\r
friend struct ContainerDeletePolicy<ThreadPoolThread>;\r
OwnedArray<ThreadPoolThread> threads;\r
\r
{\r
if (originalText.isEmpty() && inputSource != nullptr)\r
{\r
- ScopedPointer<InputStream> in (inputSource->createInputStream());\r
+ std::unique_ptr<InputStream> in (inputSource->createInputStream());\r
\r
if (in != nullptr)\r
{\r
{\r
if (inputSource != nullptr)\r
{\r
- ScopedPointer<InputStream> in (inputSource->createInputStreamFor (filename.trim().unquoted()));\r
+ std::unique_ptr<InputStream> in (inputSource->createInputStreamFor (filename.trim().unquoted()));\r
\r
if (in != nullptr)\r
return in->readEntireStreamAsString();\r
else\r
{\r
lastError.clear();\r
- ScopedPointer<XmlElement> result (readNextElement (! onlyReadOuterDocumentElement));\r
+ std::unique_ptr<XmlElement> result (readNextElement (! onlyReadOuterDocumentElement));\r
\r
if (! errorOccurred)\r
return result.release();\r
@code\r
\r
XmlDocument myDocument (File ("myfile.xml"));\r
- ScopedPointer<XmlElement> mainElement (myDocument.getDocumentElement());\r
+ std::unique_ptr<XmlElement> mainElement (myDocument.getDocumentElement());\r
\r
if (mainElement == nullptr)\r
{\r
Or you can use the static helper methods for quick parsing..\r
\r
@code\r
- ScopedPointer<XmlElement> xml (XmlDocument::parse (myXmlFile));\r
+ std::unique_ptr<XmlElement> xml (XmlDocument::parse (myXmlFile));\r
\r
if (xml != nullptr && xml->hasTagName ("foobar"))\r
{\r
String lastError, dtdText;\r
StringArray tokenisedDTD;\r
bool needToLoadDTD = false, ignoreEmptyTextElements = true;\r
- ScopedPointer<InputSource> inputSource;\r
+ std::unique_ptr<InputSource> inputSource;\r
\r
XmlElement* parseDocumentElement (String::CharPointerType, bool outer);\r
void setLastError (const String&, bool carryOn);\r
\r
class GZIPCompressorHelper;\r
friend struct ContainerDeletePolicy<GZIPCompressorHelper>;\r
- ScopedPointer<GZIPCompressorHelper> helper;\r
+ std::unique_ptr<GZIPCompressorHelper> helper;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GZIPCompressorOutputStream)\r
};\r
\r
class GZIPDecompressHelper;\r
friend struct ContainerDeletePolicy<GZIPDecompressHelper>;\r
- ScopedPointer<GZIPDecompressHelper> helper;\r
+ std::unique_ptr<GZIPDecompressHelper> helper;\r
\r
#if JUCE_CATCH_DEPRECATED_CODE_MISUSE\r
// The arguments to this method have changed! Please pass a Format enum instead of the old dontWrap bool.\r
int64 pos = 0;\r
int headerSize = 0;\r
InputStream* inputStream;\r
- ScopedPointer<InputStream> streamToDelete;\r
+ std::unique_ptr<InputStream> streamToDelete;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ZipInputStream)\r
};\r
//==============================================================================\r
void ZipFile::init()\r
{\r
- ScopedPointer<InputStream> toDelete;\r
+ std::unique_ptr<InputStream> toDelete;\r
InputStream* in = inputStream;\r
\r
if (inputSource != nullptr)\r
if (entryPath.endsWithChar ('/') || entryPath.endsWithChar ('\\'))\r
return targetFile.createDirectory(); // (entry is a directory, not a file)\r
\r
- ScopedPointer<InputStream> in (createStreamForEntry (index));\r
+ std::unique_ptr<InputStream> in (createStreamForEntry (index));\r
\r
if (in == nullptr)\r
return Result::fail ("Failed to open the zip file for reading");\r
\r
private:\r
const File file;\r
- ScopedPointer<InputStream> stream;\r
+ std::unique_ptr<InputStream> stream;\r
String storedPathname;\r
Time fileTime;\r
int64 compressedSize = 0, uncompressedSize = 0, headerStart = 0;\r
for (auto& entryName : entryNames)\r
{\r
auto* entry = zip.getEntry (entryName);\r
- ScopedPointer<InputStream> input (zip.createStreamForEntry (*entry));\r
+ std::unique_ptr<InputStream> input (zip.createStreamForEntry (*entry));\r
expectEquals (input->readEntireStreamAsString(), entryName);\r
}\r
}\r
OwnedArray<ZipEntryHolder> entries;\r
CriticalSection lock;\r
InputStream* inputStream = nullptr;\r
- ScopedPointer<InputStream> streamToDelete;\r
- ScopedPointer<InputSource> inputSource;\r
+ std::unique_ptr<InputStream> streamToDelete;\r
+ std::unique_ptr<InputSource> inputSource;\r
\r
#if JUCE_DEBUG\r
struct OpenStreamCounter\r
\r
ID: juce_cryptography\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE cryptography classes\r
description: Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc.\r
website: http://www.juce.com/juce\r
private:\r
//==============================================================================\r
PropertiesFile::Options options;\r
- ScopedPointer<PropertiesFile> userProps, commonProps;\r
+ std::unique_ptr<PropertiesFile> userProps, commonProps;\r
int commonSettingsAreReadOnly = 0;\r
\r
void openFiles();\r
bool PropertiesFile::loadAsXml()\r
{\r
XmlDocument parser (file);\r
- ScopedPointer<XmlElement> doc (parser.getDocumentElement (true));\r
+ std::unique_ptr<XmlElement> doc (parser.getDocumentElement (true));\r
\r
if (doc != nullptr && doc->hasTagName (PropertyFileConstants::fileTag))\r
{\r
Options options;\r
bool loadedOk = false, needsWriting = false;\r
\r
- typedef const ScopedPointer<InterProcessLock::ScopedLockType> ProcessScopedLock;\r
+ using ProcessScopedLock = const std::unique_ptr<InterProcessLock::ScopedLockType>;\r
InterProcessLock::ScopedLockType* createProcessLock() const;\r
\r
void timerCallback() override;\r
\r
ID: juce_data_structures\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE data model helper classes\r
description: Classes for undo/redo management, and smart data structures.\r
website: http://www.juce.com/juce\r
{\r
if (newAction != nullptr)\r
{\r
- ScopedPointer<UndoableAction> action (newAction);\r
+ std::unique_ptr<UndoableAction> action (newAction);\r
\r
if (reentrancyCheck)\r
{\r
class ValueTree::SharedObject : public ReferenceCountedObject\r
{\r
public:\r
- typedef ReferenceCountedObjectPtr<SharedObject> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<SharedObject>;\r
\r
explicit SharedObject (const Identifier& t) noexcept : type (t) {}\r
\r
auto newObject = new SharedObject (typeToMatch);\r
addChild (newObject, -1, undoManager);\r
return ValueTree (newObject);\r
-\r
}\r
\r
ValueTree getChildWithProperty (const Identifier& propertyName, const var& propertyValue) const\r
{\r
}\r
\r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const ValueTree ValueTree::invalid;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const ValueTree ValueTree::invalid);\r
\r
ValueTree::ValueTree (const Identifier& type) : object (new ValueTree::SharedObject (type))\r
{\r
jassert (type.toString().isNotEmpty()); // All objects must be given a sensible type name!\r
}\r
\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
ValueTree::ValueTree (const Identifier& type,\r
std::initializer_list<std::pair<Identifier, var>> properties,\r
std::initializer_list<ValueTree> subTrees)\r
for (auto& tree : subTrees)\r
addChild (tree, -1, nullptr);\r
}\r
-#endif\r
\r
ValueTree::ValueTree (SharedObject* so) noexcept : object (so)\r
{\r
\r
String ValueTree::toXmlString() const\r
{\r
- ScopedPointer<XmlElement> xml (createXml());\r
+ std::unique_ptr<XmlElement> xml (createXml());\r
\r
if (xml != nullptr)\r
return xml->createDocument ({});\r
}\r
expect (v1.isEquivalentTo (ValueTree::readFromGZIPData (zipped.getData(), zipped.getDataSize())));\r
\r
- ScopedPointer<XmlElement> xml1 (v1.createXml());\r
- ScopedPointer<XmlElement> xml2 (v2.createCopy().createXml());\r
+ std::unique_ptr<XmlElement> xml1 (v1.createXml());\r
+ std::unique_ptr<XmlElement> xml2 (v2.createCopy().createXml());\r
expect (xml1->isEquivalentTo (xml2.get(), false));\r
\r
auto v4 = v2.createCopy();\r
*/\r
explicit ValueTree (const Identifier& type);\r
\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
/** Creates a value tree from nested lists of properties and ValueTrees.\r
\r
This code,\r
ValueTree (const Identifier& type,\r
std::initializer_list<std::pair<Identifier, var>> properties,\r
std::initializer_list<ValueTree> subTrees = {});\r
- #endif\r
\r
/** Creates a reference to another ValueTree. */\r
ValueTree (const ValueTree&) noexcept;\r
*/\r
int getReferenceCount() const noexcept;\r
\r
- #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
- /** An invalid ValueTree that can be used if you need to return one as an error condition, etc.\r
+ /* An invalid ValueTree that can be used if you need to return one as an error condition, etc.\r
@deprecated If you need an empty ValueTree object, just use ValueTree() or {}.\r
*/\r
- static const ValueTree invalid;\r
- #endif\r
+ JUCE_DEPRECATED_STATIC (static const ValueTree invalid);\r
\r
private:\r
//==============================================================================\r
return *this;\r
}\r
\r
+ /** Copy the values from a JUCE's AudioBuffer to the receiver.\r
+\r
+ All indices and sizes are in the receiver's units, i.e. if SampleType is a\r
+ SIMDRegister then incrementing srcPos by one will increase the sample position\r
+ in the AudioBuffer's units by a factor of SIMDRegister<SampleType>::SIMDNumElements.\r
+ */\r
+ forcedinline AudioBlock& copyFrom (const AudioBuffer<NumericType>& src, size_t srcPos = 0, size_t dstPos = 0,\r
+ size_t numElements = std::numeric_limits<size_t>::max())\r
+ {\r
+ auto srclen = static_cast<size_t> (src.getNumSamples()) / sizeFactor;\r
+ auto n = static_cast<int> (jmin (srclen - srcPos, numSamples - dstPos, numElements) * sizeFactor);\r
+ auto maxChannels = jmin (static_cast<size_t> (src.getNumChannels()), static_cast<size_t> (numChannels));\r
+\r
+ for (size_t ch = 0; ch < maxChannels; ++ch)\r
+ FloatVectorOperations::copy (channelPtr (ch),\r
+ src.getReadPointer (static_cast<int> (ch),\r
+ static_cast<int> (srcPos * sizeFactor)),\r
+ n);\r
+\r
+ return *this;\r
+ }\r
+\r
+ /** Copy the values from the receiver to a JUCE's AudioBuffer.\r
+\r
+ All indices and sizes are in the receiver's units, i.e. if SampleType is a\r
+ SIMDRegister then incrementing dstPos by one will increase the sample position\r
+ in the AudioBuffer's units by a factor of SIMDRegister<SampleType>::SIMDNumElements.\r
+ */\r
+ forcedinline const AudioBlock& copyTo (AudioBuffer<NumericType>& dst, size_t srcPos = 0, size_t dstPos = 0,\r
+ size_t numElements = std::numeric_limits<size_t>::max()) const\r
+ {\r
+ auto dstlen = static_cast<size_t> (dst.getNumSamples()) / sizeFactor;\r
+ auto n = static_cast<int> (jmin (numSamples - srcPos, dstlen - dstPos, numElements) * sizeFactor);\r
+ auto maxChannels = jmin (static_cast<size_t> (dst.getNumChannels()), static_cast<size_t> (numChannels));\r
+\r
+ for (size_t ch = 0; ch < maxChannels; ++ch)\r
+ FloatVectorOperations::copy (dst.getWritePointer (static_cast<int> (ch),\r
+ static_cast<int> (dstPos * sizeFactor)),\r
+ channelPtr (ch), n);\r
+\r
+ return *this;\r
+ }\r
+\r
/** Move memory within the receiver from the position srcPos to the position dstPos.\r
If numElements is not specified then move will move the maximum amount of memory.\r
*/\r
{\r
//==============================================================================\r
/** The type that represents the individual constituents of the SIMD Register */\r
- typedef Type ElementType;\r
+ using ElementType = Type;\r
\r
/** STL compatible value_type definition (same as ElementType). */\r
- typedef ElementType value_type;\r
+ using value_type = ElementType;\r
\r
/** The corresponding primitive integer type, for example, this will be int32_t\r
if type is a float. */\r
- typedef typename SIMDInternal::MaskTypeFor<ElementType>::type MaskType;\r
+ using MaskType = typename SIMDInternal::MaskTypeFor<ElementType>::type;\r
\r
//==============================================================================\r
// Here are some types which are needed internally\r
\r
/** The native primitive type (used internally). */\r
- typedef typename SIMDInternal::PrimitiveType<ElementType>::type PrimitiveType;\r
+ using PrimitiveType = typename SIMDInternal::PrimitiveType<ElementType>::type;\r
\r
/** The native operations for this platform and type combination (used internally) */\r
- typedef SIMDNativeOps<PrimitiveType> NativeOps;\r
+ using NativeOps = SIMDNativeOps<PrimitiveType>;\r
\r
/** The native type (used internally). */\r
- typedef typename NativeOps::vSIMDType vSIMDType;\r
+ using vSIMDType = typename NativeOps::vSIMDType;\r
\r
/** The corresponding integer SIMDRegister type (used internally). */\r
- typedef SIMDRegister<MaskType> vMaskType;\r
+ using vMaskType = SIMDRegister<MaskType>;\r
\r
/** The internal native type for the corresponding mask type (used internally). */\r
- typedef typename vMaskType::vSIMDType vMaskSIMDType;\r
+ using vMaskSIMDType = typename vMaskType::vSIMDType;\r
\r
/** Wrapper for operations which need to be handled differently for complex\r
and scalar types (used internally). */\r
- typedef CmplxSIMDOps<ElementType> CmplxOps;\r
+ using CmplxOps = CmplxSIMDOps<ElementType>;\r
+\r
+ /** Type which is returned when using the subscript operator. The returned type\r
+ should be used just like the type ElementType. */\r
+ struct ElementAccess;\r
\r
//==============================================================================\r
/** The size in bytes of this register. */\r
//==============================================================================\r
/** Returns the idx-th element of the receiver. Note that this does not check if idx\r
is larger than the native register size. */\r
- inline ElementType JUCE_VECTOR_CALLTYPE operator[] (size_t idx) const noexcept\r
+ inline ElementType JUCE_VECTOR_CALLTYPE get (size_t idx) const noexcept\r
+ {\r
+ jassert (idx < SIMDNumElements);\r
+ return CmplxOps::get (value, idx);\r
+ }\r
+\r
+ /** Sets the idx-th element of the receiver. Note that this does not check if idx\r
+ is larger than the native register size. */\r
+ inline void JUCE_VECTOR_CALLTYPE set (size_t idx, ElementType v) noexcept\r
{\r
jassert (idx < SIMDNumElements);\r
- return reinterpret_cast<const ElementType*> (&value) [idx];\r
+ value = CmplxOps::set (value, idx, v);\r
}\r
\r
+ //==============================================================================\r
/** Returns the idx-th element of the receiver. Note that this does not check if idx\r
is larger than the native register size. */\r
- inline ElementType& JUCE_VECTOR_CALLTYPE operator[] (size_t idx) noexcept\r
+ inline ElementType JUCE_VECTOR_CALLTYPE operator[] (size_t idx) const noexcept\r
+ {\r
+ return get (idx);\r
+ }\r
+\r
+ /** Returns the idx-th element of the receiver. Note that this does not check if idx\r
+ is larger than the native register size. */\r
+ inline ElementAccess JUCE_VECTOR_CALLTYPE operator[] (size_t idx) noexcept\r
{\r
jassert (idx < SIMDNumElements);\r
- return reinterpret_cast<ElementType*> (&value) [idx];\r
+ return ElementAccess (*this, idx);\r
}\r
\r
//==============================================================================\r
}\r
};\r
\r
-#ifndef DOXYGEN\r
-//==============================================================================\r
-/* This class is used internally by SIMDRegister to abstract away differences\r
- in operations which are different for complex and pure floating point types. */\r
-\r
-// the pure floating-point version\r
-template <typename Scalar>\r
-struct CmplxSIMDOps\r
-{\r
- typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType;\r
-\r
- static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const Scalar* a) noexcept\r
- {\r
- return SIMDNativeOps<Scalar>::load (a);\r
- }\r
-\r
- static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, Scalar* dest) noexcept\r
- {\r
- SIMDNativeOps<Scalar>::store (value, dest);\r
- }\r
-\r
- static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (Scalar s) noexcept\r
- {\r
- return SIMDNativeOps<Scalar>::expand (s);\r
- }\r
-\r
- static inline Scalar JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept\r
- {\r
- return SIMDNativeOps<Scalar>::sum (a);\r
- }\r
-\r
- static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept\r
- {\r
- return SIMDNativeOps<Scalar>::mul (a, b);\r
- }\r
-\r
- static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
- {\r
- return SIMDNativeOps<Scalar>::multiplyAdd (a, b, c);\r
- }\r
-};\r
-\r
-// The pure complex version\r
-template <typename Scalar>\r
-struct CmplxSIMDOps<std::complex<Scalar>>\r
-{\r
- typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType;\r
-\r
- static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const std::complex<Scalar>* a) noexcept\r
- {\r
- return SIMDNativeOps<Scalar>::load (reinterpret_cast<const Scalar*> (a));\r
- }\r
-\r
- static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, std::complex<Scalar>* dest) noexcept\r
- {\r
- SIMDNativeOps<Scalar>::store (value, reinterpret_cast<Scalar*> (dest));\r
- }\r
-\r
- static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (std::complex<Scalar> s) noexcept\r
- {\r
- const int n = sizeof (vSIMDType) / sizeof (Scalar);\r
-\r
- union\r
- {\r
- vSIMDType v;\r
- Scalar floats[n];\r
- } u;\r
-\r
- for (int i = 0; i < n; ++i)\r
- u.floats[i] = (i & 1) == 0 ? s.real() : s.imag();\r
-\r
- return u.v;\r
- }\r
-\r
- static inline std::complex<Scalar> JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept\r
- {\r
- vSIMDType result = SIMDNativeOps<Scalar>::oddevensum (a);\r
- auto* ptr = reinterpret_cast<const Scalar*> (&result);\r
- return std::complex<Scalar> (ptr[0], ptr[1]);\r
- }\r
-\r
- static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept\r
- {\r
- return SIMDNativeOps<Scalar>::cmplxmul (a, b);\r
- }\r
-\r
- static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
- {\r
- return SIMDNativeOps<Scalar>::add (a, SIMDNativeOps<Scalar>::cmplxmul (b, c));\r
- }\r
-};\r
-#endif\r
+} // namespace dsp\r
+} // namespace juce\r
\r
-//==============================================================================\r
#ifndef DOXYGEN\r
- namespace util\r
- {\r
- template <typename Type>\r
- inline void snapToZero (SIMDRegister<Type>&) noexcept {}\r
- }\r
+ #include "juce_SIMDRegister_Impl.h"\r
#endif\r
-\r
-} // namespace dsp\r
-\r
-// Extend some common used global functions to SIMDRegister types\r
-template <typename Type>\r
-inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmin (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::min (a, b); }\r
-template <typename Type>\r
-inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmax (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::max (a, b); }\r
-\r
-} // namespace juce\r
--- /dev/null
+/*\r
+ ==============================================================================\r
+\r
+ This file is part of the JUCE library.\r
+ Copyright (c) 2017 - ROLI Ltd.\r
+\r
+ JUCE is an open source library subject to commercial or open-source\r
+ licensing.\r
+\r
+ By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r
+ Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r
+ 27th April 2017).\r
+\r
+ End User License Agreement: www.juce.com/juce-5-licence\r
+ Privacy Policy: www.juce.com/juce-5-privacy-policy\r
+\r
+ Or: You may also use this code under the terms of the GPL v3 (see\r
+ www.gnu.org/licenses).\r
+\r
+ JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r
+ EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r
+ DISCLAIMED.\r
+\r
+ ==============================================================================\r
+*/\r
+\r
+namespace juce\r
+{\r
+namespace dsp\r
+{\r
+\r
+\r
+//==============================================================================\r
+template <typename Type>\r
+struct SIMDRegister<Type>::ElementAccess\r
+{\r
+ operator Type() const { return simd.get (idx); }\r
+ ElementAccess& operator= (Type scalar) noexcept { simd.set (idx, scalar); return *this; }\r
+ ElementAccess& operator= (ElementAccess& o) noexcept { return operator= ((Type) o); }\r
+\r
+private:\r
+ friend struct SIMDRegister;\r
+ ElementAccess (SIMDRegister& owner, size_t index) noexcept : simd (owner), idx (index) {}\r
+ SIMDRegister& simd;\r
+ size_t idx;\r
+};\r
+\r
+#ifndef DOXYGEN\r
+//==============================================================================\r
+/* This class is used internally by SIMDRegister to abstract away differences\r
+ in operations which are different for complex and pure floating point types. */\r
+\r
+// the pure floating-point version\r
+template <typename Scalar>\r
+struct CmplxSIMDOps\r
+{\r
+ typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType;\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const Scalar* a) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::load (a);\r
+ }\r
+\r
+ static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, Scalar* dest) noexcept\r
+ {\r
+ SIMDNativeOps<Scalar>::store (value, dest);\r
+ }\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (Scalar s) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::expand (s);\r
+ }\r
+\r
+ static inline Scalar JUCE_VECTOR_CALLTYPE get (vSIMDType v, std::size_t i) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::get (v, i);\r
+ }\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE set (vSIMDType v, std::size_t i, Scalar s) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::set (v, i, s);\r
+ }\r
+\r
+ static inline Scalar JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::sum (a);\r
+ }\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::mul (a, b);\r
+ }\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::multiplyAdd (a, b, c);\r
+ }\r
+};\r
+\r
+// The pure complex version\r
+template <typename Scalar>\r
+struct CmplxSIMDOps<std::complex<Scalar>>\r
+{\r
+ typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType;\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const std::complex<Scalar>* a) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::load (reinterpret_cast<const Scalar*> (a));\r
+ }\r
+\r
+ static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, std::complex<Scalar>* dest) noexcept\r
+ {\r
+ SIMDNativeOps<Scalar>::store (value, reinterpret_cast<Scalar*> (dest));\r
+ }\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (std::complex<Scalar> s) noexcept\r
+ {\r
+ const int n = sizeof (vSIMDType) / sizeof (Scalar);\r
+\r
+ union\r
+ {\r
+ vSIMDType v;\r
+ Scalar floats[n];\r
+ } u;\r
+\r
+ for (int i = 0; i < n; ++i)\r
+ u.floats[i] = (i & 1) == 0 ? s.real() : s.imag();\r
+\r
+ return u.v;\r
+ }\r
+\r
+ static inline std::complex<Scalar> JUCE_VECTOR_CALLTYPE get (vSIMDType v, std::size_t i) noexcept\r
+ {\r
+ auto j = i << 1;\r
+ return std::complex<Scalar> (SIMDNativeOps<Scalar>::get (v, j), SIMDNativeOps<Scalar>::get (v, j + 1));\r
+ }\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE set (vSIMDType v, std::size_t i, std::complex<Scalar> s) noexcept\r
+ {\r
+ auto j = i << 1;\r
+ return SIMDNativeOps<Scalar>::set (SIMDNativeOps<Scalar>::set (v, j, s.real()), j + 1, s.imag());\r
+ }\r
+\r
+ static inline std::complex<Scalar> JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept\r
+ {\r
+ vSIMDType result = SIMDNativeOps<Scalar>::oddevensum (a);\r
+ auto* ptr = reinterpret_cast<const Scalar*> (&result);\r
+ return std::complex<Scalar> (ptr[0], ptr[1]);\r
+ }\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::cmplxmul (a, b);\r
+ }\r
+\r
+ static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
+ {\r
+ return SIMDNativeOps<Scalar>::add (a, SIMDNativeOps<Scalar>::cmplxmul (b, c));\r
+ }\r
+};\r
+#endif\r
+\r
+//==============================================================================\r
+ namespace util\r
+ {\r
+ template <typename Type>\r
+ inline void snapToZero (SIMDRegister<Type>&) noexcept {}\r
+ }\r
+\r
+} // namespace dsp\r
+\r
+// Extend some common used global functions to SIMDRegister types\r
+template <typename Type>\r
+inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmin (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::min (a, b); }\r
+template <typename Type>\r
+inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmax (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::max (a, b); }\r
+\r
+} // namespace juce\r
\r
namespace SIMDRegister_test_internal\r
{\r
+ template <typename type, typename = void> struct RandomPrimitive {};\r
+\r
template <typename type>\r
- static void fillRandom (type* dst, const int size, Random& random)\r
+ struct RandomPrimitive<type, typename std::enable_if<std::is_floating_point<type>::value>::type>\r
{\r
- bool is_signed = std::is_signed<type>::value;\r
+ static type next (Random& random)\r
+ {\r
+ return static_cast<type> (std::is_signed<type>::value ? (random.nextFloat() * 16.0) - 8.0\r
+ : (random.nextFloat() * 8.0));\r
+\r
+ }\r
+ };\r
\r
- for (int i = 0; i < size; ++i)\r
+ template <typename type>\r
+ struct RandomPrimitive<type, typename std::enable_if<std::is_integral<type>::value>::type>\r
+ {\r
+ static type next (Random& random)\r
{\r
- if (is_signed)\r
- {\r
- *dst++ = static_cast<type> ((random.nextFloat() * 16.0) - 8.0);\r
- }\r
- else\r
- {\r
- *dst++ = static_cast<type> (random.nextFloat() * 8.0);\r
- }\r
+ return static_cast<type> (random.nextInt64());\r
+\r
}\r
- }\r
+ };\r
\r
+ template <typename type> struct RandomValue { static type next (Random& random) { return RandomPrimitive<type>::next (random); } };\r
template <typename type>\r
- static void fillRandom (std::complex<type>* dst, const int size, Random& random)\r
+ struct RandomValue<std::complex<type>>\r
{\r
- for (int i = 0; i < size; ++i)\r
+ static std::complex<type> next (Random& random)\r
{\r
- type real, imag;\r
+ return {RandomPrimitive<type>::next (random), RandomPrimitive<type>::next (random)};\r
+ }\r
+ };\r
\r
- real = static_cast<type> ((random.nextFloat() * 16.0) - 8.0);\r
- imag = static_cast<type> ((random.nextFloat() * 16.0) - 8.0);\r
\r
- *dst++ = std::complex<type> (real, imag);\r
+ template <typename type>\r
+ struct VecFiller\r
+ {\r
+ static void fill (type* dst, const int size, Random& random)\r
+ {\r
+ for (int i = 0; i < size; ++i)\r
+ dst[i] = RandomValue<type>::next (random);\r
}\r
- }\r
+ };\r
+\r
+ // We need to specialise for complex types: otherwise GCC 6 gives\r
+ // us an ICE internal compiler error after which the compiler seg faults.\r
+ template <typename type>\r
+ struct VecFiller<std::complex<type>>\r
+ {\r
+ static void fill (std::complex<type>* dst, const int size, Random& random)\r
+ {\r
+ for (int i = 0; i < size; ++i)\r
+ dst[i] = std::complex<type> (RandomValue<type>::next (random), RandomValue<type>::next (random));\r
+ }\r
+ };\r
+\r
+ template <typename type>\r
+ struct VecFiller<SIMDRegister<type>>\r
+ {\r
+ static SIMDRegister<type> fill(Random& random)\r
+ {\r
+ constexpr int size = (int) SIMDRegister<type>::SIMDNumElements;\r
+ #ifdef _MSC_VER\r
+ __declspec(align(sizeof (SIMDRegister<type>))) type elements[size];\r
+ #else\r
+ type elements[size] __attribute__((aligned(sizeof (SIMDRegister<type>))));\r
+ #endif\r
+\r
+ VecFiller<type>::fill (elements, size, random);\r
+ return SIMDRegister<type>::fromRawArray (elements);\r
+ }\r
+ };\r
\r
// Avoid visual studio warning\r
template <typename type>\r
template <typename type>\r
static bool allValuesEqualTo (const SIMDRegister<type>& vec, const type scalar)\r
{\r
+ #ifdef _MSC_VER\r
+ __declspec(align(sizeof (SIMDRegister<type>))) type elements[SIMDRegister<type>::SIMDNumElements];\r
+ #else\r
+ type elements[SIMDRegister<type>::SIMDNumElements] __attribute__((aligned(sizeof (SIMDRegister<type>))));\r
+ #endif\r
+\r
+ vec.copyToRawArray (elements);\r
+\r
// as we do not want to rely on the access operator we cast this to a primitive pointer\r
- const type* ptr = reinterpret_cast<const type*> (&vec);\r
for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i)\r
- if (ptr[i] != scalar) return false;\r
+ if (elements[i] != scalar) return false;\r
\r
return true;\r
}\r
u.expect (allValuesEqualTo<type> (SIMDRegister<type>::expand (static_cast<type> (23)), 23));\r
\r
{\r
- SIMDRegister<type> a;\r
+ #ifdef _MSC_VER\r
+ __declspec(align(sizeof (SIMDRegister<type>))) type elements[SIMDRegister<type>::SIMDNumElements];\r
+ #else\r
+ type elements[SIMDRegister<type>::SIMDNumElements] __attribute__((aligned(sizeof (SIMDRegister<type>))));\r
+ #endif\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (elements, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister<type> a (SIMDRegister<type>::fromRawArray (elements));\r
+\r
+ u.expect (vecEqualToArray (a, elements));\r
\r
- type* ptr = reinterpret_cast<type*>(&a);\r
- SIMDRegister_test_internal::fillRandom (ptr, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister<type> b (a);\r
+ a *= static_cast<type> (2);\r
\r
- u.expect (vecEqualToArray (SIMDRegister<type> (a), ptr));\r
+ u.expect (vecEqualToArray (b, elements));\r
}\r
}\r
};\r
SIMDRegister<type> a;\r
type array [SIMDRegister<type>::SIMDNumElements];\r
\r
- SIMDRegister_test_internal::fillRandom (array, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array, SIMDRegister<type>::SIMDNumElements, random);\r
\r
// Test non-const access operator\r
for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i)\r
for (int n = 0; n < 100; ++n)\r
{\r
// set-up\r
- SIMDRegister<type> a, b, c;\r
+ SIMDRegister<type> a (static_cast<type> (0));\r
+ SIMDRegister<type> b (static_cast<type> (0));\r
+ SIMDRegister<type> c (static_cast<type> (0));\r
+\r
type array_a [SIMDRegister<type>::SIMDNumElements];\r
type array_b [SIMDRegister<type>::SIMDNumElements];\r
type array_c [SIMDRegister<type>::SIMDNumElements];\r
\r
- SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
\r
copy (a, array_a); copy (b, array_b); copy (c, array_c);\r
\r
u.expect (vecEqualToArray (a, array_a));\r
u.expect (vecEqualToArray (b, array_b));\r
\r
- SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
\r
copy (a, array_a); copy (b, array_b); copy (c, array_c);\r
\r
u.expect (vecEqualToArray (b, array_b));\r
\r
// set-up again\r
- SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
copy (a, array_a); copy (b, array_b); copy (c, array_c);\r
\r
// test out-of-place with both params being vectors\r
typedef typename SIMDRegister<type>::vMaskType vMaskType;\r
typedef typename SIMDRegister<type>::MaskType MaskType;\r
\r
-\r
for (int n = 0; n < 100; ++n)\r
{\r
// Check flip sign bit and using as a union\r
\r
union ConversionUnion\r
{\r
- inline ConversionUnion() {}\r
+ inline ConversionUnion() : floatVersion (static_cast<type> (0)) {}\r
inline ~ConversionUnion() {}\r
SIMDRegister<type> floatVersion;\r
vMaskType intVersion;\r
} a, b;\r
\r
vMaskType bitmask = vMaskType::expand (static_cast<MaskType> (1) << (sizeof (MaskType) - 1));\r
- SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
copy (a.floatVersion, array_a);\r
copy (b.floatVersion, array_a);\r
\r
Operation::template inplace<SIMDRegister<type>, vMaskType> (a.floatVersion, bitmask);\r
Operation::template inplace<vMaskType, vMaskType> (b.intVersion, bitmask);\r
\r
- u.expect (vecEqualToArray (a.floatVersion, reinterpret_cast<const type*> (&b.floatVersion)));\r
+ #ifdef _MSC_VER\r
+ __declspec(align(sizeof (SIMDRegister<type>))) type elements[SIMDRegister<type>::SIMDNumElements];\r
+ #else\r
+ type elements[SIMDRegister<type>::SIMDNumElements] __attribute__((aligned(sizeof (SIMDRegister<type>))));\r
+ #endif\r
+ b.floatVersion.copyToRawArray (elements);\r
+\r
+ u.expect (vecEqualToArray (a.floatVersion, elements));\r
}\r
\r
// set-up\r
MaskType array_b [SIMDRegister<MaskType>::SIMDNumElements];\r
MaskType array_c [SIMDRegister<MaskType>::SIMDNumElements];\r
\r
- type* conv_a = reinterpret_cast<type*> (array_a);\r
- type* conv_c = reinterpret_cast<type*> (array_c);\r
+ type float_a [SIMDRegister<type>::SIMDNumElements];\r
+ type float_c [SIMDRegister<type>::SIMDNumElements];\r
+\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (float_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<MaskType>::fill (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (float_c, SIMDRegister<type>::SIMDNumElements, random);\r
\r
- SIMDRegister_test_internal::fillRandom (conv_a, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (conv_c, SIMDRegister<type>::SIMDNumElements, random);\r
- copy (a, conv_a); copy (b, array_b); copy (c, conv_c);\r
+ memcpy (array_a, float_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+ memcpy (array_c, float_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+ copy (a, float_a); copy (b, array_b); copy (c, float_c);\r
\r
// test in-place with both params being vectors\r
for (size_t i = 0; i < SIMDRegister<MaskType>::SIMDNumElements; ++i)\r
Operation::template inplace<MaskType, MaskType> (array_a[i], array_b[i]);\r
+ memcpy (float_a, array_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
\r
Operation::template inplace<SIMDRegister<type>, vMaskType> (a, b);\r
\r
- u.expect (vecEqualToArray (a, conv_a));\r
+ u.expect (vecEqualToArray (a, float_a));\r
u.expect (vecEqualToArray (b, array_b));\r
\r
- SIMDRegister_test_internal::fillRandom (conv_a, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (conv_c, SIMDRegister<type>::SIMDNumElements, random);\r
- copy (a, conv_a); copy (b, array_b); copy (c, conv_c);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (float_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<MaskType>::fill (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (float_c, SIMDRegister<type>::SIMDNumElements, random);\r
+ memcpy (array_a, float_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+ memcpy (array_c, float_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+ copy (a, float_a); copy (b, array_b); copy (c, float_c);\r
\r
// test in-place with one param being scalar\r
for (size_t i = 0; i < SIMDRegister<MaskType>::SIMDNumElements; ++i)\r
Operation::template inplace<MaskType, MaskType> (array_a[i], static_cast<MaskType> (9));\r
+ memcpy (float_a, array_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
\r
Operation::template inplace<SIMDRegister<type>, MaskType> (a, static_cast<MaskType> (9));\r
\r
- u.expect (vecEqualToArray (a, conv_a));\r
+ u.expect (vecEqualToArray (a, float_a));\r
u.expect (vecEqualToArray (b, array_b));\r
\r
// set-up again\r
- SIMDRegister_test_internal::fillRandom (conv_a, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (conv_c, SIMDRegister<type>::SIMDNumElements, random);\r
- copy (a, conv_a); copy (b, array_b); copy (c, conv_c);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (float_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<MaskType>::fill (array_b, SIMDRegister<MaskType>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (float_c, SIMDRegister<type>::SIMDNumElements, random);\r
+ memcpy (array_a, float_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+ memcpy (array_c, float_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+ copy (a, float_a); copy (b, array_b); copy (c, float_c);\r
\r
// test out-of-place with both params being vectors\r
for (size_t i = 0; i < SIMDRegister<MaskType>::SIMDNumElements; ++i)\r
array_c[i] =\r
Operation::template outofplace<MaskType, MaskType> (array_a[i], array_b[i]);\r
}\r
+ memcpy (float_a, array_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+ memcpy (float_c, array_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
\r
c = Operation::template outofplace<SIMDRegister<type>, vMaskType> (a, b);\r
\r
- u.expect (vecEqualToArray (a, conv_a));\r
+ u.expect (vecEqualToArray (a, float_a));\r
u.expect (vecEqualToArray (b, array_b));\r
- u.expect (vecEqualToArray (c, conv_c));\r
+ u.expect (vecEqualToArray (c, float_c));\r
\r
// test out-of-place with one param being scalar\r
for (size_t i = 0; i < SIMDRegister<MaskType>::SIMDNumElements; ++i)\r
array_c[i] = Operation::template outofplace<MaskType, MaskType> (array_a[i], static_cast<MaskType> (9));\r
+ memcpy (float_a, array_a, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
+ memcpy (float_c, array_c, sizeof (type) * SIMDRegister<type>::SIMDNumElements);\r
\r
c = Operation::template outofplace<SIMDRegister<type>, MaskType> (a, static_cast<MaskType> (9));\r
\r
- u.expect (vecEqualToArray (a, conv_a));\r
+ u.expect (vecEqualToArray (a, float_a));\r
u.expect (vecEqualToArray (b, array_b));\r
- u.expect (vecEqualToArray (c, conv_c));\r
+ u.expect (vecEqualToArray (c, float_c));\r
}\r
}\r
};\r
MaskType array_ge [SIMDRegister<type>::SIMDNumElements];\r
\r
\r
- SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
\r
// do check\r
for (size_t j = 0; j < SIMDRegister<type>::SIMDNumElements; ++j)\r
array_ge [j] = (array_a[j] >= array_b[j]) ? static_cast<MaskType> (-1) : 0;\r
}\r
\r
- SIMDRegister<type> a, b;\r
+ SIMDRegister<type> a (static_cast<type> (0));\r
+ SIMDRegister<type> b (static_cast<type> (0));\r
+\r
vMaskType eq, neq, lt, le, gt, ge;\r
\r
copy (a, array_a);\r
\r
do\r
{\r
- SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
} while (std::equal (array_a, array_a + SIMDRegister<type>::SIMDNumElements, array_b));\r
\r
copy (a, array_a);\r
u.expect (! (a == b));\r
u.expect (! (b == a));\r
\r
- SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
copy (a, array_a);\r
copy (b, array_a);\r
\r
u.expect (! (a != b));\r
u.expect (! (b != a));\r
\r
- auto scalar = a[0];\r
+ type scalar = a[0];\r
a = SIMDRegister<type>::expand (scalar);\r
\r
u.expect (a == scalar);\r
type array_c [SIMDRegister<type>::SIMDNumElements];\r
type array_d [SIMDRegister<type>::SIMDNumElements];\r
\r
- SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
- SIMDRegister_test_internal::fillRandom (array_d, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_a, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_b, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_c, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array_d, SIMDRegister<type>::SIMDNumElements, random);\r
\r
// check\r
for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i)\r
array_max[j] = (array_a[j] > array_b[j]) ? array_a[j] : array_b[j];\r
}\r
\r
- SIMDRegister<type> a, b, vMin, vMax;\r
+ SIMDRegister<type> a (static_cast<type> (0));\r
+ SIMDRegister<type> b (static_cast<type> (0));\r
+ SIMDRegister<type> vMin (static_cast<type> (0));\r
+ SIMDRegister<type> vMax (static_cast<type> (0));\r
\r
copy (a, array_a);\r
copy (b, array_b);\r
type array [SIMDRegister<type>::SIMDNumElements];\r
type sumCheck = 0;\r
\r
- SIMDRegister_test_internal::fillRandom (array, SIMDRegister<type>::SIMDNumElements, random);\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array, SIMDRegister<type>::SIMDNumElements, random);\r
\r
for (size_t j = 0; j < SIMDRegister<type>::SIMDNumElements; ++j)\r
{\r
}\r
};\r
\r
+ struct CheckBoolEquals\r
+ {\r
+ template <typename type>\r
+ static void run (UnitTest& u, Random& random)\r
+ {\r
+ bool is_signed = std::is_signed<type>::value;\r
+ type array [SIMDRegister<type>::SIMDNumElements];\r
+\r
+ auto value = is_signed ? static_cast<type> ((random.nextFloat() * 16.0) - 8.0)\r
+ : static_cast<type> (random.nextFloat() * 8.0);\r
+\r
+ std::fill (array, array + SIMDRegister<type>::SIMDNumElements, value);\r
+ SIMDRegister<type> a, b;\r
+ copy (a, array);\r
+\r
+ u.expect (a == value);\r
+ u.expect (! (a != value));\r
+ value += 1;\r
+\r
+ u.expect (a != value);\r
+ u.expect (! (a == value));\r
+\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array, SIMDRegister<type>::SIMDNumElements, random);\r
+ copy (a, array);\r
+ copy (b, array);\r
+\r
+ u.expect (a == b);\r
+ u.expect (! (a != b));\r
+\r
+ SIMDRegister_test_internal::VecFiller<type>::fill (array, SIMDRegister<type>::SIMDNumElements, random);\r
+ copy (b, array);\r
+\r
+ u.expect (a != b);\r
+ u.expect (! (a == b));\r
+ }\r
+ };\r
+\r
//==============================================================================\r
template <class TheTest>\r
void runTestForAllTypes (const char* unitTestName)\r
runTestForAllTypes<BitOperatorTests<BitXOR>> ("BitXOROperators");\r
\r
runTestNonComplex<CheckComparisonOps> ("CheckComparisons");\r
+ runTestNonComplex<CheckBoolEquals> ("CheckBoolEquals");\r
runTestNonComplex<CheckMinMax> ("CheckMinMax");\r
\r
runTestForAllTypes<CheckMultiplyAdd> ("CheckMultiplyAdd");\r
buffersImpulseSegments.add (newImpulseSegment);\r
}\r
\r
- ScopedPointer<FFT> FFTTempObject = new FFT (roundToInt (std::log2 (FFTSize)));\r
+ std::unique_ptr<FFT> FFTTempObject (new FFT (roundToInt (std::log2 (FFTSize))));\r
\r
auto* channelData = info.buffer->getWritePointer (channel);\r
\r
}\r
\r
//==============================================================================\r
- ScopedPointer<FFT> FFTobject;\r
+ std::unique_ptr<FFT> FFTobject;\r
\r
size_t FFTSize = 0;\r
size_t currentSegment = 0, numInputSegments = 0, numSegments = 0, blockSize = 0, inputDataPos = 0;\r
{\r
AudioFormatManager manager;\r
manager.registerBasicFormats();\r
+ std::unique_ptr<AudioFormatReader> formatReader (manager.createReaderFor (stream));\r
\r
- if (ScopedPointer<AudioFormatReader> formatReader = manager.createReaderFor (stream))\r
+ if (formatReader != nullptr)\r
{\r
currentInfo.originalNumChannels = formatReader->numChannels > 1 ? 2 : 1;\r
currentInfo.originalSampleRate = formatReader->sampleRate;\r
private:\r
//==============================================================================\r
struct Pimpl;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
//==============================================================================\r
void processSamples (const AudioBlock<float>&, AudioBlock<float>&, bool isBypassed) noexcept;\r
\r
FFTFallback (int order)\r
{\r
- configForward = new FFTConfig (1 << order, false);\r
- configInverse = new FFTConfig (1 << order, true);\r
+ configForward.reset (new FFTConfig (1 << order, false));\r
+ configInverse.reset (new FFTConfig (1 << order, true));\r
\r
size = 1 << order;\r
}\r
\r
//==============================================================================\r
SpinLock processLock;\r
- ScopedPointer<FFTConfig> configForward, configInverse;\r
+ std::unique_ptr<FFTConfig> configForward, configInverse;\r
int size;\r
};\r
\r
//==============================================================================\r
struct Engine;\r
\r
- ScopedPointer<Instance> engine;\r
+ std::unique_ptr<Instance> engine;\r
int size;\r
\r
//==============================================================================\r
\r
#include "juce_dsp.h"\r
\r
-#if (! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) || (! defined (JUCE_HAS_CONSTEXPR))\r
+#if ! JUCE_HAS_CONSTEXPR\r
#ifndef JUCE_DEMO_RUNNER\r
- #error "juce_dsp module requires your compiler to have a newer version of the standard library"\r
+ #error "The juce_dsp module requires a compiler that supports constexpr"\r
#endif\r
#else\r
\r
\r
ID: juce_dsp\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE DSP classes\r
description: Classes for audio buffer manipulation, digital audio processing, filtering, oversampling, fast math functions etc.\r
website: http://www.juce.com/juce\r
#include <juce_audio_basics/juce_audio_basics.h>\r
#include <juce_audio_formats/juce_audio_formats.h>\r
\r
-#if (! defined (JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT)) || (! defined (JUCE_HAS_CONSTEXPR))\r
+#if ! JUCE_HAS_CONSTEXPR\r
#ifndef JUCE_DEMO_RUNNER\r
- #error "juce_dsp module requires your compiler to have a newer version of the standard library"\r
+ #error "The juce_dsp module requires a compiler that supports constexpr"\r
#endif\r
#else\r
\r
\r
#ifndef DOXYGEN\r
\r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic push\r
+ #pragma GCC diagnostic ignored "-Wignored-attributes"\r
+#endif\r
+\r
#ifdef _MSC_VER\r
#define DECLARE_AVX_SIMD_CONST(type, name) \\r
static __declspec(align(32)) const type name[32 / sizeof (type)]\r
template <>\r
struct SIMDNativeOps<float>\r
{\r
- typedef __m256 vSIMDType;\r
+ using vSIMDType = __m256;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (int32_t, kAllBitsSet);\r
DECLARE_AVX_SIMD_CONST (float, kOne);\r
\r
//==============================================================================\r
- static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const float* a) noexcept { return *reinterpret_cast<const __m256*> (a); }\r
- static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return *reinterpret_cast<const __m256*> (a); }\r
+ static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const float* a) noexcept { return load (a); }\r
+ static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return _mm256_castsi256_ps (_mm256_load_si256 ((const __m256i*) a)); }\r
static forcedinline __m256 JUCE_VECTOR_CALLTYPE expand (float s) noexcept { return _mm256_broadcast_ss (&s); }\r
static forcedinline __m256 JUCE_VECTOR_CALLTYPE load (const float* a) noexcept { return _mm256_load_ps (a); }\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256 value, float* dest) noexcept { _mm256_store_ps (dest, value); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256 value, float* dest) noexcept { _mm256_store_ps (dest, value); }\r
static forcedinline __m256 JUCE_VECTOR_CALLTYPE add (__m256 a, __m256 b) noexcept { return _mm256_add_ps (a, b); }\r
static forcedinline __m256 JUCE_VECTOR_CALLTYPE sub (__m256 a, __m256 b) noexcept { return _mm256_sub_ps (a, b); }\r
static forcedinline __m256 JUCE_VECTOR_CALLTYPE mul (__m256 a, __m256 b) noexcept { return _mm256_mul_ps (a, b); }\r
static forcedinline __m256 JUCE_VECTOR_CALLTYPE dupeven (__m256 a) noexcept { return _mm256_shuffle_ps (a, a, _MM_SHUFFLE (2, 2, 0, 0)); }\r
static forcedinline __m256 JUCE_VECTOR_CALLTYPE dupodd (__m256 a) noexcept { return _mm256_shuffle_ps (a, a, _MM_SHUFFLE (3, 3, 1, 1)); }\r
static forcedinline __m256 JUCE_VECTOR_CALLTYPE swapevenodd (__m256 a) noexcept { return _mm256_shuffle_ps (a, a, _MM_SHUFFLE (2, 3, 0, 1)); }\r
+ static forcedinline float JUCE_VECTOR_CALLTYPE get (__m256 v, size_t i) noexcept { return SIMDFallbackOps<float, __m256>::get (v, i); }\r
+ static forcedinline __m256 JUCE_VECTOR_CALLTYPE set (__m256 v, size_t i, float s) noexcept { return SIMDFallbackOps<float, __m256>::set (v, i, s); }\r
static forcedinline __m256 JUCE_VECTOR_CALLTYPE oddevensum (__m256 a) noexcept\r
{\r
a = _mm256_add_ps (_mm256_shuffle_ps (a, a, _MM_SHUFFLE (1, 0, 3, 2)), a);\r
__m256 retval = _mm256_dp_ps (a, vconst (kOne), 0xff);\r
__m256 tmp = _mm256_permute2f128_ps (retval, retval, 1);\r
retval = _mm256_add_ps (retval, tmp);\r
- return ((float*) &retval)[0];\r
+\r
+ #if JUCE_GCC\r
+ return retval[0];\r
+ #else\r
+ return _mm256_cvtss_f32 (retval);\r
+ #endif\r
}\r
};\r
\r
template <>\r
struct SIMDNativeOps<double>\r
{\r
- typedef __m256d vSIMDType;\r
+ using vSIMDType = __m256d;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (int64_t, kAllBitsSet);\r
DECLARE_AVX_SIMD_CONST (double, kOne);\r
\r
//==============================================================================\r
- static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept { return *reinterpret_cast<const __m256d*> (a); }\r
- static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return *reinterpret_cast<const __m256d*> (a); }\r
+ static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept { return load (a); }\r
+ static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return _mm256_castsi256_pd (_mm256_load_si256 ((const __m256i*) a)); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE expand (double s) noexcept { return _mm256_broadcast_sd (&s); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE load (const double* a) noexcept { return _mm256_load_pd (a); }\r
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256d value, double* dest) noexcept { _mm256_store_pd (dest, value); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE notEqual (__m256d a, __m256d b) noexcept { return _mm256_cmp_pd (a, b, _CMP_NEQ_OQ); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE greaterThan (__m256d a, __m256d b) noexcept { return _mm256_cmp_pd (a, b, _CMP_GT_OQ); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256d a, __m256d b) noexcept { return _mm256_cmp_pd (a, b, _CMP_GE_OQ); }\r
- static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256d a, __m256d b) noexcept { return (_mm256_movemask_pd (equal (a, b)) == 0xf); }\r
+ static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256d a, __m256d b) noexcept { return (_mm256_movemask_pd (equal (a, b)) == 0xf); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE multiplyAdd (__m256d a, __m256d b, __m256d c) noexcept { return _mm256_add_pd (a, _mm256_mul_pd (b, c)); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE dupeven (__m256d a) noexcept { return _mm256_shuffle_pd (a, a, 0); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE dupodd (__m256d a) noexcept { return _mm256_shuffle_pd (a, a, (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3)); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE swapevenodd (__m256d a) noexcept { return _mm256_shuffle_pd (a, a, (1 << 0) | (0 << 1) | (1 << 2) | (0 << 3)); }\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE oddevensum (__m256d a) noexcept { return _mm256_add_pd (_mm256_permute2f128_pd (a, a, 1), a); }\r
+ static forcedinline double JUCE_VECTOR_CALLTYPE get (__m256d v, size_t i) noexcept { return SIMDFallbackOps<double, __m256d>::get (v, i); }\r
+ static forcedinline __m256d JUCE_VECTOR_CALLTYPE set (__m256d v, size_t i, double s) noexcept { return SIMDFallbackOps<double, __m256d>::set (v, i, s); }\r
+\r
\r
//==============================================================================\r
static forcedinline __m256d JUCE_VECTOR_CALLTYPE cmplxmul (__m256d a, __m256d b) noexcept\r
__m256d retval = _mm256_hadd_pd (a, a);\r
__m256d tmp = _mm256_permute2f128_pd (retval, retval, 1);\r
retval = _mm256_add_pd (retval, tmp);\r
- return ((double*) &retval)[0];\r
+\r
+ #if JUCE_GCC\r
+ return retval[0];\r
+ #else\r
+ return _mm256_cvtsd_f64 (retval);\r
+ #endif\r
}\r
};\r
\r
template <>\r
struct SIMDNativeOps<int8_t>\r
{\r
- typedef __m256i vSIMDType;\r
+ using vSIMDType = __m256i;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (int8_t, kAllBitsSet);\r
\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int8_t* a) noexcept { return *reinterpret_cast<const __m256i*> (a); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int8_t s) noexcept { return _mm256_set1_epi8 (s); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int8_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int8_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi8 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi8 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epi8 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epi8 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi8 (a, b); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return _mm256_movemask_epi8 (equal (a, b)) == -1; }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline int8_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept { return SIMDFallbackOps<int8_t, __m256i>::get (v, i); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, int8_t s) noexcept { return SIMDFallbackOps<int8_t, __m256i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int8_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const char*> (a);\r
- return _mm256_set_epi8 (b[31], b[30], b[29], b[28], b[27], b[26], b[25], b[24],\r
- b[23], b[22], b[21], b[20], b[19], b[18], b[17], b[16],\r
- b[15], b[14], b[13], b[12], b[11], b[10], b[9], b[8],\r
- b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int8_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<int8_t, __m256i>::store (value, dest);\r
- }\r
-\r
static forcedinline int8_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
{\r
__m256i lo = _mm256_unpacklo_epi8 (a, _mm256_setzero_si256());\r
hi = _mm256_hadd_epi16 (hi, hi);\r
}\r
\r
- const int8_t* lo_ptr = reinterpret_cast<const int8_t*> (&lo);\r
- const int8_t* hi_ptr = reinterpret_cast<const int8_t*> (&hi);\r
+ #if JUCE_GCC\r
+ return (int8_t) ((lo[0] & 0xff) +\r
+ (hi[0] & 0xff) +\r
+ (lo[2] & 0xff) +\r
+ (hi[2] & 0xff));\r
+ #else\r
+ constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
\r
- return (int8_t) (lo_ptr[0] + hi_ptr[0] + lo_ptr[16] + hi_ptr[16]);\r
+ return (int8_t) ((_mm256_cvtsi256_si32 (lo) & 0xff) +\r
+ (_mm256_cvtsi256_si32 (hi) & 0xff) +\r
+ (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (lo, mask)) & 0xff) +\r
+ (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (hi, mask)) & 0xff));\r
+ #endif\r
}\r
\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b)\r
struct SIMDNativeOps<uint8_t>\r
{\r
//==============================================================================\r
- typedef __m256i vSIMDType;\r
+ using vSIMDType = __m256i;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (uint8_t, kHighBit);\r
DECLARE_AVX_SIMD_CONST (uint8_t, kAllBitsSet);\r
\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint8_t* a) noexcept { return *reinterpret_cast<const __m256i*> (a); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, vconst (kHighBit)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, load (kHighBit)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint8_t s) noexcept { return _mm256_set1_epi8 ((int8_t) s); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint8_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint8_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi8 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi8 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epu8 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epu8 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi8 (a, b); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline uint8_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept { return SIMDFallbackOps<uint8_t, __m256i>::get (v, i); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, uint8_t s) noexcept { return SIMDFallbackOps<uint8_t, __m256i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint8_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const char*> (a);\r
- return _mm256_set_epi8 (b[31], b[30], b[29], b[28], b[27], b[26], b[25], b[24],\r
- b[23], b[22], b[21], b[20], b[19], b[18], b[17], b[16],\r
- b[15], b[14], b[13], b[12], b[11], b[10], b[9], b[8],\r
- b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint8_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<uint8_t, __m256i>::store (value, dest);\r
- }\r
-\r
static forcedinline uint8_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
{\r
__m256i lo = _mm256_unpacklo_epi8 (a, _mm256_setzero_si256());\r
hi = _mm256_hadd_epi16 (hi, hi);\r
}\r
\r
- const uint8_t* lo_ptr = reinterpret_cast<const uint8_t*> (&lo);\r
- const uint8_t* hi_ptr = reinterpret_cast<const uint8_t*> (&hi);\r
+ #if JUCE_GCC\r
+ return (uint8_t) ((static_cast<uint32_t> (lo[0]) & 0xffu) +\r
+ (static_cast<uint32_t> (hi[0]) & 0xffu) +\r
+ (static_cast<uint32_t> (lo[2]) & 0xffu) +\r
+ (static_cast<uint32_t> (hi[2]) & 0xffu));\r
+ #else\r
+ constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
\r
- return (uint8_t) (lo_ptr[0] + hi_ptr[0] + lo_ptr[16] + hi_ptr[16]);\r
+ return (uint8_t) ((static_cast<uint32_t> (_mm256_cvtsi256_si32 (lo)) & 0xffu) +\r
+ (static_cast<uint32_t> (_mm256_cvtsi256_si32 (hi)) & 0xffu) +\r
+ (static_cast<uint32_t> (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (lo, mask))) & 0xffu) +\r
+ (static_cast<uint32_t> (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (hi, mask))) & 0xffu));\r
+ #endif\r
}\r
\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b)\r
struct SIMDNativeOps<int16_t>\r
{\r
//==============================================================================\r
- typedef __m256i vSIMDType;\r
+ using vSIMDType = __m256i;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (int16_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int16_t* a) noexcept { return *reinterpret_cast<const __m256i*> (a); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int16_t s) noexcept { return _mm256_set1_epi16 (s); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int16_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int16_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi16 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi16 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi16 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epi16 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epi16 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi16 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+ static forcedinline int16_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept { return SIMDFallbackOps<int16_t, __m256i>::get (v, i); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, int16_t s) noexcept { return SIMDFallbackOps<int16_t, __m256i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int16_t* a) noexcept\r
- {\r
- return _mm256_set_epi16 (a[15], a[14], a[13], a[12], a[11], a[10], a[9], a[8],\r
- a[7], a[6], a[5], a[4], a[3], a[2], a[1], a[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int16_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<int16_t, __m256i>::store (value, dest);\r
- }\r
-\r
static forcedinline int16_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
{\r
__m256i tmp = _mm256_hadd_epi16 (a, a);\r
tmp = _mm256_hadd_epi16 (tmp, tmp);\r
tmp = _mm256_hadd_epi16 (tmp, tmp);\r
- int16_t* ptr = reinterpret_cast<int16_t*> (&tmp);\r
- return (int16_t) (ptr[0] + ptr[8]);\r
+\r
+ #if JUCE_GCC\r
+ return (int16_t) ((tmp[0] & 0xffff) + (tmp[2] & 0xffff));\r
+ #else\r
+ constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
+\r
+ return (int16_t) ((_mm256_cvtsi256_si32 (tmp) & 0xffff) +\r
+ (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (tmp, mask)) & 0xffff));\r
+ #endif\r
}\r
};\r
\r
struct SIMDNativeOps<uint16_t>\r
{\r
//==============================================================================\r
- typedef __m256i vSIMDType;\r
+ using vSIMDType = __m256i;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (uint16_t, kHighBit);\r
DECLARE_AVX_SIMD_CONST (uint16_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint16_t* a) noexcept { return *reinterpret_cast<const __m256i*> (a); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, vconst (kHighBit)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept { return _mm256_set1_epi16 ((int16_t) s); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi16 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi16 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi16 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epu16 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epu16 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi16 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi16 (ssign (a), ssign (b)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, load (kHighBit)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept { return _mm256_set1_epi16 ((int16_t) s); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint16_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint16_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi16 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi16 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi16 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epu16 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epu16 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi16 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi16 (ssign (a), ssign (b)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+ static forcedinline uint16_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept { return SIMDFallbackOps<uint16_t, __m256i>::get (v, i); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, uint16_t s) noexcept { return SIMDFallbackOps<uint16_t, __m256i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint16_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const int16_t*> (a);\r
- return _mm256_set_epi16 (b[15], b[14], b[13], b[12], b[11], b[10], b[9], b[8],\r
- b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint16_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<uint16_t, __m256i>::store (value, dest);\r
- }\r
-\r
static forcedinline uint16_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
{\r
__m256i tmp = _mm256_hadd_epi16 (a, a);\r
tmp = _mm256_hadd_epi16 (tmp, tmp);\r
tmp = _mm256_hadd_epi16 (tmp, tmp);\r
- uint16_t* ptr = reinterpret_cast<uint16_t*> (&tmp);\r
- return (uint16_t) (ptr[0] + ptr[8]);\r
+\r
+ #if JUCE_GCC\r
+ return (uint16_t) ((static_cast<uint32_t> (tmp[0]) & 0xffffu) +\r
+ (static_cast<uint32_t> (tmp[2]) & 0xffffu));\r
+ #else\r
+ constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
+\r
+ return (uint16_t) ((static_cast<uint32_t> (_mm256_cvtsi256_si32 (tmp)) & 0xffffu) +\r
+ (static_cast<uint32_t> (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (tmp, mask))) & 0xffffu));\r
+ #endif\r
}\r
};\r
\r
struct SIMDNativeOps<int32_t>\r
{\r
//==============================================================================\r
- typedef __m256i vSIMDType;\r
+ using vSIMDType = __m256i;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (int32_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return *reinterpret_cast<const __m256i*> (a); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int32_t s) noexcept { return _mm256_set1_epi32 (s); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int32_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int32_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi32 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi32 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi32 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epi32 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epi32 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi32 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+ static forcedinline int32_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept { return SIMDFallbackOps<int32_t, __m256i>::get (v, i); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, int32_t s) noexcept { return SIMDFallbackOps<int32_t, __m256i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int32_t* a) noexcept\r
- {\r
- return _mm256_set_epi32 (a[7], a[6], a[5], a[4], a[3], a[2], a[1], a[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int32_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<int32_t, __m256i>::store (value, dest);\r
- }\r
-\r
static forcedinline int32_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
{\r
__m256i tmp = _mm256_hadd_epi32 (a, a);\r
tmp = _mm256_hadd_epi32 (tmp, tmp);\r
- int32_t* ptr = reinterpret_cast<int32_t*> (&tmp);\r
- return ptr[0] + ptr[4];\r
+\r
+ #if JUCE_GCC\r
+ return tmp[0] + tmp[2];\r
+ #else\r
+ constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
+\r
+ return _mm256_cvtsi256_si32 (tmp) + _mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (tmp, mask));\r
+ #endif\r
}\r
};\r
\r
struct SIMDNativeOps<uint32_t>\r
{\r
//==============================================================================\r
- typedef __m256i vSIMDType;\r
+ using vSIMDType = __m256i;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (uint32_t, kAllBitsSet);\r
DECLARE_AVX_SIMD_CONST (uint32_t, kHighBit);\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint32_t* a) noexcept { return *reinterpret_cast<const __m256i*> (a); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, vconst (kHighBit)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept { return _mm256_set1_epi32 ((int32_t) s); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi32 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi32 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi32 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epu32 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epu32 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi32 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi32 (ssign (a), ssign (b)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, load (kHighBit)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept { return _mm256_set1_epi32 ((int32_t) s); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint32_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint32_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi32 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi32 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi32 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epu32 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epu32 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi32 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi32 (ssign (a), ssign (b)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+ static forcedinline uint32_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept { return SIMDFallbackOps<uint32_t, __m256i>::get (v, i); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, uint32_t s) noexcept { return SIMDFallbackOps<uint32_t, __m256i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint32_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const int32_t*> (a);\r
- return _mm256_set_epi32 (b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint32_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<uint32_t, __m256i>::store (value, dest);\r
- }\r
-\r
static forcedinline uint32_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
{\r
__m256i tmp = _mm256_hadd_epi32 (a, a);\r
tmp = _mm256_hadd_epi32 (tmp, tmp);\r
- uint32_t* ptr = reinterpret_cast<uint32_t*> (&tmp);\r
- return ptr[0] + ptr[4];\r
+\r
+ #if JUCE_GCC\r
+ return static_cast<uint32_t> (tmp[0]) + static_cast<uint32_t> (tmp[2]);\r
+ #else\r
+ constexpr int mask = (2 << 0) | (3 << 2) | (0 << 4) | (1 << 6);\r
+\r
+ return static_cast<uint32_t> (_mm256_cvtsi256_si32 (tmp))\r
+ + static_cast<uint32_t> (_mm256_cvtsi256_si32 (_mm256_permute4x64_epi64 (tmp, mask)));\r
+ #endif\r
}\r
};\r
\r
struct SIMDNativeOps<int64_t>\r
{\r
//==============================================================================\r
- typedef __m256i vSIMDType;\r
+ using vSIMDType = __m256i;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (int64_t, kAllBitsSet);\r
\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return *reinterpret_cast<const __m256i*> (a); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept { return _mm256_set1_epi64x ((int64_t) s); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int64_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int64_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi64 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi64 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { __m256i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { __m256i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi64 (a, b); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
-\r
- //==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int64_t* a) noexcept\r
- {\r
- return _mm256_set_epi64x (a[3], a[2], a[1], a[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int64_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<int64_t, __m256i>::store (value, dest);\r
- }\r
-\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept\r
- {\r
- #ifdef _MSC_VER\r
- __m256d tmp = _mm256_broadcast_sd (reinterpret_cast<const double*> (&s));\r
- return *reinterpret_cast<const __m256i*> (&tmp);\r
- #else\r
- return _mm256_set1_epi64x ((int64_t) s);\r
- #endif\r
- }\r
-\r
- static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
- {\r
- const int64_t* ptr = reinterpret_cast<const int64_t*> (&a);\r
- return ptr[0] + ptr[1] + ptr[2] + ptr[3];\r
- }\r
-\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept\r
- {\r
- __m256i retval;\r
-\r
- const int64_t* aptr = reinterpret_cast<const int64_t*> (&a);\r
- const int64_t* bptr = reinterpret_cast<const int64_t*> (&b);\r
- int64_t* dst = reinterpret_cast<int64_t*> (&retval);\r
-\r
- for (int i = 0; i < 4; ++i)\r
- dst[i] = aptr[i] * bptr[i];\r
-\r
- return retval;\r
- }\r
+ static forcedinline int64_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept { return SIMDFallbackOps<int64_t, __m256i>::get (v, i); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, int64_t s) noexcept { return SIMDFallbackOps<int64_t, __m256i>::set (v, i, s); }\r
+ static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept { return SIMDFallbackOps<int64_t, __m256i>::sum (a); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return SIMDFallbackOps<int64_t, __m256i>::mul (a, b); }\r
};\r
\r
//==============================================================================\r
struct SIMDNativeOps<uint64_t>\r
{\r
//==============================================================================\r
- typedef __m256i vSIMDType;\r
+ using vSIMDType = __m256i;\r
\r
//==============================================================================\r
DECLARE_AVX_SIMD_CONST (uint64_t, kAllBitsSet);\r
DECLARE_AVX_SIMD_CONST (uint64_t, kHighBit);\r
\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint64_t* a) noexcept { return *reinterpret_cast<const __m256i*> (a); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, vconst (kHighBit)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi64 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi64 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { __m256i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { __m256i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi64 (a, b); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi64 (ssign (a), ssign (b)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
-\r
- //==============================================================================\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint64_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const int64_t*> (a);\r
- return _mm256_set_epi64x (b[3], b[2], b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint64_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<uint64_t, __m256i>::store (value, dest);\r
- }\r
-\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept\r
- {\r
- #ifdef _MSC_VER\r
- __m256d tmp = _mm256_broadcast_sd (reinterpret_cast<const double*> (&s));\r
- return *reinterpret_cast<const __m256i*> (&tmp);\r
- #else\r
- return _mm256_set1_epi64x ((int64_t) s);\r
- #endif\r
- }\r
-\r
- static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept\r
- {\r
- const uint64_t* ptr = reinterpret_cast<const uint64_t*> (&a);\r
- return ptr[0] + ptr[1] + ptr[2] + ptr[3];\r
- }\r
-\r
- static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept\r
- {\r
- __m256i retval;\r
-\r
- const uint64_t* aptr = reinterpret_cast<const uint64_t*> (&a);\r
- const uint64_t* bptr = reinterpret_cast<const uint64_t*> (&b);\r
- uint64_t* dst = reinterpret_cast<uint64_t*> (&retval);\r
-\r
- for (int i = 0; i < 4; ++i)\r
- dst[i] = aptr[i] * bptr[i];\r
-\r
- return retval;\r
- }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept { return _mm256_set1_epi64x ((int64_t) s); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint64_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint64_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, load (kHighBit)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi64 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi64 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, load (kAllBitsSet)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { __m256i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { __m256i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi64 (a, b); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi64 (ssign (a), ssign (b)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m256i a, __m256i b) noexcept { return (_mm256_movemask_epi8 (equal (a, b)) == -1); }\r
+ static forcedinline uint64_t JUCE_VECTOR_CALLTYPE get (__m256i v, size_t i) noexcept { return SIMDFallbackOps<uint64_t, __m256i>::get (v, i); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE set (__m256i v, size_t i, uint64_t s) noexcept { return SIMDFallbackOps<uint64_t, __m256i>::set (v, i, s); }\r
+ static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept { return SIMDFallbackOps<uint64_t, __m256i>::sum (a); }\r
+ static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return SIMDFallbackOps<uint64_t, __m256i>::mul (a, b); }\r
};\r
\r
#endif\r
\r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic pop\r
+#endif\r
+\r
} // namespace dsp\r
} // namespace juce\r
/** A template specialisation to find corresponding mask type for primitives. */\r
namespace SIMDInternal\r
{\r
- template <typename Primitive> struct MaskTypeFor { typedef Primitive type; };\r
- template <> struct MaskTypeFor <float> { typedef uint32_t type; };\r
- template <> struct MaskTypeFor <double> { typedef uint64_t type; };\r
- template <> struct MaskTypeFor <char> { typedef uint8_t type; };\r
- template <> struct MaskTypeFor <int8_t> { typedef uint8_t type; };\r
- template <> struct MaskTypeFor <int16_t> { typedef uint16_t type; };\r
- template <> struct MaskTypeFor <int32_t> { typedef uint32_t type; };\r
- template <> struct MaskTypeFor <int64_t> { typedef uint64_t type; };\r
- template <> struct MaskTypeFor <std::complex<float>> { typedef uint32_t type; };\r
- template <> struct MaskTypeFor <std::complex<double>> { typedef uint64_t type; };\r
-\r
- template <typename Primitive> struct PrimitiveType { typedef Primitive type; };\r
- template <typename Primitive> struct PrimitiveType<std::complex<Primitive>> { typedef Primitive type; };\r
+ template <typename Primitive> struct MaskTypeFor { using type = Primitive; };\r
+ template <> struct MaskTypeFor <float> { using type = uint32_t; };\r
+ template <> struct MaskTypeFor <double> { using type = uint64_t; };\r
+ template <> struct MaskTypeFor <char> { using type = uint8_t; };\r
+ template <> struct MaskTypeFor <int8_t> { using type = uint8_t; };\r
+ template <> struct MaskTypeFor <int16_t> { using type = uint16_t; };\r
+ template <> struct MaskTypeFor <int32_t> { using type = uint32_t; };\r
+ template <> struct MaskTypeFor <int64_t> { using type = uint64_t; };\r
+ template <> struct MaskTypeFor <std::complex<float>> { using type = uint32_t; };\r
+ template <> struct MaskTypeFor <std::complex<double>> { using type = uint64_t; };\r
+\r
+ template <typename Primitive> struct PrimitiveType { using type = Primitive; };\r
+ template <typename Primitive> struct PrimitiveType<std::complex<Primitive>> { using type = Primitive; };\r
\r
template <int n> struct Log2Helper { enum { value = Log2Helper<n/2>::value + 1 }; };\r
template <> struct Log2Helper<1> { enum { value = 0 }; };\r
static constexpr size_t mask = (sizeof (vSIMDType) / sizeof (ScalarType)) - 1;\r
static constexpr size_t bits = SIMDInternal::Log2Helper<n>::value;\r
\r
- // corresponding mask type\r
- typedef typename SIMDInternal::MaskTypeFor<ScalarType>::type MaskType;\r
+ // helper types\r
+ using MaskType = typename SIMDInternal::MaskTypeFor<ScalarType>::type;\r
+ union UnionType { vSIMDType v; ScalarType s[n]; };\r
+ union UnionMaskType { vSIMDType v; MaskType m[n]; };\r
+\r
\r
// fallback methods\r
static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return apply<ScalarAdd> (a, b); }\r
static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return cmp<ScalarGt > (a, b); }\r
static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return cmp<ScalarGeq> (a, b); }\r
\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept\r
+ static forcedinline ScalarType get (vSIMDType v, size_t i) noexcept\r
{\r
- vSIMDType retval;\r
- auto* dst = reinterpret_cast<MaskType*> (&retval);\r
- auto* aSrc = reinterpret_cast<const MaskType*> (&a);\r
+ UnionType u {v};\r
+ return u.s[i];\r
+ }\r
+\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, ScalarType s) noexcept\r
+ {\r
+ UnionType u {v};\r
+\r
+ u.s[i] = s;\r
+ return u.v;\r
+ }\r
+\r
+ static forcedinline vSIMDType bit_not (vSIMDType av) noexcept\r
+ {\r
+ UnionMaskType a {av};\r
\r
for (size_t i = 0; i < n; ++i)\r
- dst [i] = ~aSrc [i];\r
+ a.m[i] = ~a.m[i];\r
\r
- return retval;\r
+ return a.v;\r
}\r
\r
- static forcedinline ScalarType sum (vSIMDType a) noexcept\r
+ static forcedinline ScalarType sum (vSIMDType av) noexcept\r
{\r
+ UnionType a {av};\r
auto retval = static_cast<ScalarType> (0);\r
- auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
\r
for (size_t i = 0; i < n; ++i)\r
- retval += aSrc [i];\r
+ retval += a.s[i];\r
\r
return retval;\r
}\r
\r
- static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept\r
+ static forcedinline vSIMDType multiplyAdd (vSIMDType av, vSIMDType bv, vSIMDType cv) noexcept\r
{\r
- vSIMDType retval;\r
- auto* dst = reinterpret_cast<ScalarType*> (&retval);\r
- auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
- auto* bSrc = reinterpret_cast<const ScalarType*> (&b);\r
- auto* cSrc = reinterpret_cast<const ScalarType*> (&c);\r
+ UnionType a {av}, b {bv}, c {cv};\r
\r
for (size_t i = 0; i < n; ++i)\r
- dst [i] = aSrc [i] + (bSrc [i] * cSrc [i]);\r
+ a.s[i] += b.s[i] * c.s[i];\r
\r
- return retval;\r
+ return a.v;\r
}\r
\r
//==============================================================================\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept\r
+ static forcedinline bool allEqual (vSIMDType av, vSIMDType bv) noexcept\r
{\r
- auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
- auto* bSrc = reinterpret_cast<const ScalarType*> (&b);\r
+ UnionType a {av}, b {bv};\r
\r
for (size_t i = 0; i < n; ++i)\r
- if (aSrc[i] != bSrc[i])\r
+ if (a.s[i] != b.s[i])\r
return false;\r
\r
return true;\r
}\r
\r
//==============================================================================\r
- static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept\r
+ static forcedinline vSIMDType cmplxmul (vSIMDType av, vSIMDType bv) noexcept\r
{\r
- vSIMDType retval;\r
- auto* dst = reinterpret_cast<std::complex<ScalarType>*> (&retval);\r
- auto* aSrc = reinterpret_cast<const std::complex<ScalarType>*> (&a);\r
- auto* bSrc = reinterpret_cast<const std::complex<ScalarType>*> (&b);\r
+ UnionType a {av}, b {bv}, r;\r
\r
const int m = n >> 1;\r
for (int i = 0; i < m; ++i)\r
- dst [i] = aSrc [i] * bSrc [i];\r
+ {\r
+ std::complex<ScalarType> result\r
+ = std::complex<ScalarType> (a.s[i<<1], a.s[(i<<1)|1])\r
+ * std::complex<ScalarType> (b.s[i<<1], b.s[(i<<1)|1]);\r
\r
- return retval;\r
+ r.s[i<<1] = result.real();\r
+ r.s[(i<<1)|1] = result.imag();\r
+ }\r
+\r
+ return r.v;\r
}\r
\r
struct ScalarAdd { static forcedinline ScalarType op (ScalarType a, ScalarType b) noexcept { return a + b; } };\r
\r
// generic apply routines for operations above\r
template <typename Op>\r
- static forcedinline vSIMDType apply (vSIMDType a, vSIMDType b) noexcept\r
+ static forcedinline vSIMDType apply (vSIMDType av, vSIMDType bv) noexcept\r
{\r
- vSIMDType retval;\r
- auto* dst = reinterpret_cast<ScalarType*> (&retval);\r
- auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
- auto* bSrc = reinterpret_cast<const ScalarType*> (&b);\r
+ UnionType a {av}, b {bv};\r
\r
for (size_t i = 0; i < n; ++i)\r
- dst [i] = Op::op (aSrc [i], bSrc [i]);\r
+ a.s[i] = Op::op (a.s[i], b.s[i]);\r
\r
- return retval;\r
+ return a.v;\r
}\r
\r
template <typename Op>\r
- static forcedinline vSIMDType cmp (vSIMDType a, vSIMDType b) noexcept\r
+ static forcedinline vSIMDType cmp (vSIMDType av, vSIMDType bv) noexcept\r
{\r
- vSIMDType retval;\r
- auto* dst = reinterpret_cast<MaskType*> (&retval);\r
- auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
- auto* bSrc = reinterpret_cast<const ScalarType*> (&b);\r
+ UnionType a {av}, b {bv};\r
+ UnionMaskType r;\r
\r
for (size_t i = 0; i < n; ++i)\r
- dst [i] = Op::op (aSrc [i], bSrc [i]) ? static_cast<MaskType> (-1) : static_cast<MaskType> (0);\r
+ r.m[i] = Op::op (a.s[i], b.s[i]) ? static_cast<MaskType> (-1) : static_cast<MaskType> (0);\r
\r
- return retval;\r
+ return r.v;\r
}\r
\r
template <typename Op>\r
- static forcedinline vSIMDType bitapply (vSIMDType a, vSIMDType b) noexcept\r
+ static forcedinline vSIMDType bitapply (vSIMDType av, vSIMDType bv) noexcept\r
{\r
- vSIMDType retval;\r
- auto* dst = reinterpret_cast<MaskType*> (&retval);\r
- auto* aSrc = reinterpret_cast<const MaskType*> (&a);\r
- auto* bSrc = reinterpret_cast<const MaskType*> (&b);\r
+ UnionMaskType a {av}, b {bv};\r
\r
for (size_t i = 0; i < n; ++i)\r
- dst [i] = Op::op (aSrc [i], bSrc [i]);\r
+ a.m[i] = Op::op (a.m[i], b.m[i]);\r
\r
- return retval;\r
+ return a.v;\r
}\r
\r
static forcedinline vSIMDType expand (ScalarType s) noexcept\r
{\r
- vSIMDType retval;\r
- auto* dst = reinterpret_cast<ScalarType*> (&retval);\r
+ UnionType r;\r
\r
for (size_t i = 0; i < n; ++i)\r
- dst [i] = s;\r
+ r.s[i] = s;\r
\r
- return retval;\r
+ return r.v;\r
}\r
\r
static forcedinline vSIMDType load (const ScalarType* a) noexcept\r
{\r
- vSIMDType retval;\r
- auto* dst = reinterpret_cast<ScalarType*> (&retval);\r
+ UnionType r;\r
\r
for (size_t i = 0; i < n; ++i)\r
- dst [i] = a[i];\r
+ r.s[i] = a[i];\r
\r
- return retval;\r
+ return r.v;\r
}\r
\r
- static forcedinline void store (vSIMDType value, ScalarType* dest) noexcept\r
+ static forcedinline void store (vSIMDType av, ScalarType* dest) noexcept\r
{\r
- const auto* src = reinterpret_cast<const ScalarType*> (&value);\r
+ UnionType a {av};\r
\r
for (size_t i = 0; i < n; ++i)\r
- dest[i] = src[i];\r
+ dest[i] = a.s[i];\r
}\r
\r
template <unsigned int shuffle_idx>\r
- static forcedinline vSIMDType shuffle (vSIMDType a) noexcept\r
+ static forcedinline vSIMDType shuffle (vSIMDType av) noexcept\r
{\r
- vSIMDType retval;\r
- auto* dst = reinterpret_cast<ScalarType*> (&retval);\r
- auto* aSrc = reinterpret_cast<const ScalarType*> (&a);\r
+ UnionType a {av}, r;\r
\r
// the compiler will unroll this loop and the index can\r
// be computed at compile-time, so this will be super fast\r
for (size_t i = 0; i < n; ++i)\r
- dst [i] = aSrc [(shuffle_idx >> (bits * i)) & mask];\r
+ r.s[i] = a.s[(shuffle_idx >> (bits * i)) & mask];\r
\r
- return retval;\r
+ return r.v;\r
}\r
};\r
\r
\r
#ifndef DOXYGEN\r
\r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic push\r
+ #pragma GCC diagnostic ignored "-Wignored-attributes"\r
+#endif\r
+\r
#ifdef _MSC_VER\r
#define DECLARE_NEON_SIMD_CONST(type, name) \\r
static __declspec(align(16)) const type name [16 / sizeof (type)]\r
struct SIMDNativeOps<uint32_t>\r
{\r
//==============================================================================\r
- typedef uint32x4_t vSIMDType;\r
- typedef SIMDFallbackOps<uint32_t, vSIMDType> fb;\r
+ using vSIMDType = uint32x4_t;\r
+ using fb = SIMDFallbackOps<uint32_t, vSIMDType>;\r
\r
//==============================================================================\r
DECLARE_NEON_SIMD_CONST (uint32_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline vSIMDType expand (uint32_t s) noexcept { return vdupq_n_u32 (s); }\r
- static forcedinline vSIMDType load (const uint32_t* a) noexcept { return vld1q_u32 (a); }\r
- static forcedinline void store (vSIMDType value, uint32_t* a) noexcept { vst1q_u32 (a, value); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u32 (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u32 (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_u32 (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u32 (a, b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u32 (a, b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u32 (a, b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u32 (b, a); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u32 ((uint32_t*) kAllBitsSet)); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_u32 (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_u32 (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_u32 (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (sum (notEqual (a, b)) == 0); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_u32 (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_u32 (a, b); }\r
+ static forcedinline vSIMDType expand (uint32_t s) noexcept { return vdupq_n_u32 (s); }\r
+ static forcedinline vSIMDType load (const uint32_t* a) noexcept { return vld1q_u32 (a); }\r
+ static forcedinline void store (vSIMDType value, uint32_t* a) noexcept { vst1q_u32 (a, value); }\r
+ static forcedinline uint32_t get (vSIMDType v, size_t i) noexcept { return v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, uint32_t s) noexcept { v[i] = s; return v; }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u32 (a, b); }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u32 (a, b); }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_u32 (a, b); }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u32 (a, b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u32 (a, b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u32 (a, b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u32 (b, a); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u32 ((uint32_t*) kAllBitsSet)); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_u32 (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_u32 (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_u32 (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (sum (notEqual (a, b)) == 0); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_u32 (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_u32 (a, b); }\r
static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u32 (a, b, c); }\r
static forcedinline uint32_t sum (vSIMDType a) noexcept\r
{\r
struct SIMDNativeOps<int32_t>\r
{\r
//==============================================================================\r
- typedef int32x4_t vSIMDType;\r
- typedef SIMDFallbackOps<int32_t, vSIMDType> fb;\r
+ using vSIMDType = int32x4_t;\r
+ using fb = SIMDFallbackOps<int32_t, vSIMDType>;\r
\r
//==============================================================================\r
DECLARE_NEON_SIMD_CONST (int32_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline vSIMDType expand (int32_t s) noexcept { return vdupq_n_s32 (s); }\r
- static forcedinline vSIMDType load (const int32_t* a) noexcept { return vld1q_s32 (a); }\r
- static forcedinline void store (vSIMDType value, int32_t* a) noexcept { vst1q_s32 (a, value); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s32 (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s32 (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_s32 (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s32 (a, b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s32 (a, b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s32 (a, b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s32 (b, a); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s32 ((int32_t*) kAllBitsSet)); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_s32 (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_s32 (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_s32 (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (sum (notEqual (a, b)) == 0); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_s32 (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_s32 (a, b); }\r
+ static forcedinline vSIMDType expand (int32_t s) noexcept { return vdupq_n_s32 (s); }\r
+ static forcedinline vSIMDType load (const int32_t* a) noexcept { return vld1q_s32 (a); }\r
+ static forcedinline void store (vSIMDType value, int32_t* a) noexcept { vst1q_s32 (a, value); }\r
+ static forcedinline int32_t get (vSIMDType v, size_t i) noexcept { return v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, int32_t s) noexcept { v[i] = s; return v; }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s32 (a, b); }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s32 (a, b); }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_s32 (a, b); }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s32 (a, b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s32 (a, b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s32 (a, b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s32 (b, a); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s32 ((int32_t*) kAllBitsSet)); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_s32 (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_s32 (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_s32 (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (sum (notEqual (a, b)) == 0); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_s32 (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_s32 (a, b); }\r
static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s32 (a, b, c); }\r
static forcedinline int32_t sum (vSIMDType a) noexcept\r
{\r
struct SIMDNativeOps<int8_t>\r
{\r
//==============================================================================\r
- typedef int8x16_t vSIMDType;\r
- typedef SIMDFallbackOps<int8_t, vSIMDType> fb;\r
+ using vSIMDType = int8x16_t;\r
+ using fb = SIMDFallbackOps<int8_t, vSIMDType>;\r
\r
//==============================================================================\r
DECLARE_NEON_SIMD_CONST (int8_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline vSIMDType expand (int8_t s) noexcept { return vdupq_n_s8 (s); }\r
- static forcedinline vSIMDType load (const int8_t* a) noexcept { return vld1q_s8 (a); }\r
- static forcedinline void store (vSIMDType value, int8_t* a) noexcept { vst1q_s8 (a, value); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s8 (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s8 (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_s8 (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s8 (a, b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s8 (a, b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s8 (a, b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s8 (b, a); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s8 ((int8_t*) kAllBitsSet)); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_s8 (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_s8 (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_s8 (a, b); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_s8 (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_s8 (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<int32_t>::sum (notEqual (a, b)) == 0); }\r
- static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s8 (a, b, c); }\r
- static forcedinline int8_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+ static forcedinline vSIMDType expand (int8_t s) noexcept { return vdupq_n_s8 (s); }\r
+ static forcedinline vSIMDType load (const int8_t* a) noexcept { return vld1q_s8 (a); }\r
+ static forcedinline void store (vSIMDType value, int8_t* a) noexcept { vst1q_s8 (a, value); }\r
+ static forcedinline int8_t get (vSIMDType v, size_t i) noexcept { return v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, int8_t s) noexcept { v[i] = s; return v; }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s8 (a, b); }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s8 (a, b); }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_s8 (a, b); }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s8 (a, b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s8 (a, b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s8 (a, b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s8 (b, a); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s8 ((int8_t*) kAllBitsSet)); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_s8 (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_s8 (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_s8 (a, b); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_s8 (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_s8 (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<int32_t>::sum ((SIMDNativeOps<int32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+ static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s8 (a, b, c); }\r
+ static forcedinline int8_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
};\r
\r
//==============================================================================\r
struct SIMDNativeOps<uint8_t>\r
{\r
//==============================================================================\r
- typedef uint8x16_t vSIMDType;\r
- typedef SIMDFallbackOps<uint8_t, vSIMDType> fb;\r
+ using vSIMDType = uint8x16_t;\r
+ using fb = SIMDFallbackOps<uint8_t, vSIMDType>;\r
\r
//==============================================================================\r
DECLARE_NEON_SIMD_CONST (uint8_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline vSIMDType expand (uint8_t s) noexcept { return vdupq_n_u8 (s); }\r
- static forcedinline vSIMDType load (const uint8_t* a) noexcept { return vld1q_u8 (a); }\r
- static forcedinline void store (vSIMDType value, uint8_t* a) noexcept { vst1q_u8 (a, value); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u8 (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u8 (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_u8 (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u8 (a, b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u8 (a, b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u8 (a, b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u8 (b, a); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u8 ((uint8_t*) kAllBitsSet)); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_u8 (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_u8 (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_u8 (a, b); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_u8 (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_u8 (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<uint32_t>::sum (notEqual (a, b)) == 0); }\r
- static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u8 (a, b, c); }\r
- static forcedinline uint8_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+ static forcedinline vSIMDType expand (uint8_t s) noexcept { return vdupq_n_u8 (s); }\r
+ static forcedinline vSIMDType load (const uint8_t* a) noexcept { return vld1q_u8 (a); }\r
+ static forcedinline void store (vSIMDType value, uint8_t* a) noexcept { vst1q_u8 (a, value); }\r
+ static forcedinline uint8_t get (vSIMDType v, size_t i) noexcept { return v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, uint8_t s) noexcept { v[i] = s; return v; }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u8 (a, b); }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u8 (a, b); }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_u8 (a, b); }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u8 (a, b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u8 (a, b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u8 (a, b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u8 (b, a); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u8 ((uint8_t*) kAllBitsSet)); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_u8 (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_u8 (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_u8 (a, b); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_u8 (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_u8 (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<uint32_t>::sum ((SIMDNativeOps<uint32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+ static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u8 (a, b, c); }\r
+ static forcedinline uint8_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
};\r
\r
//==============================================================================\r
struct SIMDNativeOps<int16_t>\r
{\r
//==============================================================================\r
- typedef int16x8_t vSIMDType;\r
- typedef SIMDFallbackOps<int16_t, vSIMDType> fb;\r
+ using vSIMDType = int16x8_t;\r
+ using fb = SIMDFallbackOps<int16_t, vSIMDType>;\r
\r
//==============================================================================\r
DECLARE_NEON_SIMD_CONST (int16_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline vSIMDType expand (int16_t s) noexcept { return vdupq_n_s16 (s); }\r
- static forcedinline vSIMDType load (const int16_t* a) noexcept { return vld1q_s16 (a); }\r
- static forcedinline void store (vSIMDType value, int16_t* a) noexcept { vst1q_s16 (a, value); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s16 (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s16 (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_s16 (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s16 (a, b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s16 (a, b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s16 (a, b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s16 (b, a); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s16 ((int16_t*) kAllBitsSet)); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_s16 (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_s16 (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_s16 (a, b); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_s16 (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_s16 (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<int32_t>::sum (notEqual (a, b)) == 0); }\r
- static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s16 (a, b, c); }\r
- static forcedinline int16_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+ static forcedinline vSIMDType expand (int16_t s) noexcept { return vdupq_n_s16 (s); }\r
+ static forcedinline vSIMDType load (const int16_t* a) noexcept { return vld1q_s16 (a); }\r
+ static forcedinline void store (vSIMDType value, int16_t* a) noexcept { vst1q_s16 (a, value); }\r
+ static forcedinline int16_t get (vSIMDType v, size_t i) noexcept { return v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, int16_t s) noexcept { v[i] = s; return v; }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s16 (a, b); }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s16 (a, b); }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_s16 (a, b); }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s16 (a, b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s16 (a, b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s16 (a, b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s16 (b, a); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s16 ((int16_t*) kAllBitsSet)); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_s16 (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_s16 (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_s16 (a, b); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_s16 (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_s16 (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<int32_t>::sum ((SIMDNativeOps<int32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+ static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s16 (a, b, c); }\r
+ static forcedinline int16_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
};\r
\r
\r
struct SIMDNativeOps<uint16_t>\r
{\r
//==============================================================================\r
- typedef uint16x8_t vSIMDType;\r
- typedef SIMDFallbackOps<uint16_t, vSIMDType> fb;\r
+ using vSIMDType = uint16x8_t;\r
+ using fb = SIMDFallbackOps<uint16_t, vSIMDType>;\r
\r
//==============================================================================\r
DECLARE_NEON_SIMD_CONST (uint16_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline vSIMDType expand (uint16_t s) noexcept { return vdupq_n_u16 (s); }\r
- static forcedinline vSIMDType load (const uint16_t* a) noexcept { return vld1q_u16 (a); }\r
- static forcedinline void store (vSIMDType value, uint16_t* a) noexcept { vst1q_u16 (a, value); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u16 (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u16 (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_u16 (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u16 (a, b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u16 (a, b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u16 (a, b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u16 (b, a); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u16 ((uint16_t*) kAllBitsSet)); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_u16 (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_u16 (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_u16 (a, b); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_u16 (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_u16 (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<uint32_t>::sum (notEqual (a, b)) == 0); }\r
- static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u16 (a, b, c); }\r
- static forcedinline uint16_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+ static forcedinline vSIMDType expand (uint16_t s) noexcept { return vdupq_n_u16 (s); }\r
+ static forcedinline vSIMDType load (const uint16_t* a) noexcept { return vld1q_u16 (a); }\r
+ static forcedinline void store (vSIMDType value, uint16_t* a) noexcept { vst1q_u16 (a, value); }\r
+ static forcedinline uint16_t get (vSIMDType v, size_t i) noexcept { return v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, uint16_t s) noexcept { v[i] = s; return v; }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u16 (a, b); }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u16 (a, b); }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_u16 (a, b); }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u16 (a, b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u16 (a, b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u16 (a, b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u16 (b, a); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u16 ((uint16_t*) kAllBitsSet)); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_u16 (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_u16 (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_u16 (a, b); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_u16 (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_u16 (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<uint32_t>::sum ((SIMDNativeOps<uint32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+ static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u16 (a, b, c); }\r
+ static forcedinline uint16_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
};\r
\r
//==============================================================================\r
struct SIMDNativeOps<int64_t>\r
{\r
//==============================================================================\r
- typedef int64x2_t vSIMDType;\r
- typedef SIMDFallbackOps<int64_t, vSIMDType> fb;\r
+ using vSIMDType = int64x2_t;\r
+ using fb = SIMDFallbackOps<int64_t, vSIMDType>;\r
\r
//==============================================================================\r
DECLARE_NEON_SIMD_CONST (int64_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline vSIMDType expand (int64_t s) noexcept { return vdupq_n_s64 (s); }\r
- static forcedinline vSIMDType load (const int64_t* a) noexcept { return vld1q_s64 (a); }\r
- static forcedinline void store (vSIMDType value, int64_t* a) noexcept { vst1q_s64 (a, value); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s64 (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s64 (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return fb::mul (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s64 (a, b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s64 (a, b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s64 (a, b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s64 (b, a); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s64 ((int64_t*) kAllBitsSet)); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return fb::min (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return fb::max (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return fb::equal (a, b); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return fb::notEqual (a, b); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThan (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThanOrEqual (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<int32_t>::sum (notEqual (a, b)) == 0); }\r
- static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return fb::multiplyAdd (a, b, c); }\r
- static forcedinline int64_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+ static forcedinline vSIMDType expand (int64_t s) noexcept { return vdupq_n_s64 (s); }\r
+ static forcedinline vSIMDType load (const int64_t* a) noexcept { return vld1q_s64 (a); }\r
+ static forcedinline void store (vSIMDType value, int64_t* a) noexcept { vst1q_s64 (a, value); }\r
+ static forcedinline int64_t get (vSIMDType v, size_t i) noexcept { return v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, int64_t s) noexcept { v[i] = s; return v; }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s64 (a, b); }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s64 (a, b); }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return fb::mul (a, b); }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s64 (a, b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s64 (a, b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s64 (a, b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s64 (b, a); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s64 ((int64_t*) kAllBitsSet)); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return fb::min (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return fb::max (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return fb::equal (a, b); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return fb::notEqual (a, b); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThan (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThanOrEqual (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<int32_t>::sum ((SIMDNativeOps<int32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+ static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return fb::multiplyAdd (a, b, c); }\r
+ static forcedinline int64_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
};\r
\r
\r
struct SIMDNativeOps<uint64_t>\r
{\r
//==============================================================================\r
- typedef uint64x2_t vSIMDType;\r
- typedef SIMDFallbackOps<uint64_t, vSIMDType> fb;\r
+ using vSIMDType = uint64x2_t;\r
+ using fb = SIMDFallbackOps<uint64_t, vSIMDType>;\r
\r
//==============================================================================\r
DECLARE_NEON_SIMD_CONST (uint64_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline vSIMDType expand (uint64_t s) noexcept { return vdupq_n_u64 (s); }\r
- static forcedinline vSIMDType load (const uint64_t* a) noexcept { return vld1q_u64 (a); }\r
- static forcedinline void store (vSIMDType value, uint64_t* a) noexcept { vst1q_u64 (a, value); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u64 (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u64 (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return fb::mul (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u64 (a, b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u64 (a, b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u64 (a, b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u64 (b, a); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u64 ((uint64_t*) kAllBitsSet)); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return fb::min (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return fb::max (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return fb::equal (a, b); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return fb::notEqual (a, b); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThan (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThanOrEqual (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<uint32_t>::sum (notEqual (a, b)) == 0); }\r
+ static forcedinline vSIMDType expand (uint64_t s) noexcept { return vdupq_n_u64 (s); }\r
+ static forcedinline vSIMDType load (const uint64_t* a) noexcept { return vld1q_u64 (a); }\r
+ static forcedinline void store (vSIMDType value, uint64_t* a) noexcept { vst1q_u64 (a, value); }\r
+ static forcedinline uint64_t get (vSIMDType v, size_t i) noexcept { return v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, uint64_t s) noexcept { v[i] = s; return v; }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u64 (a, b); }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u64 (a, b); }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return fb::mul (a, b); }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u64 (a, b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u64 (a, b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u64 (a, b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u64 (b, a); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u64 ((uint64_t*) kAllBitsSet)); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return fb::min (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return fb::max (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return fb::equal (a, b); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return fb::notEqual (a, b); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThan (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThanOrEqual (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<uint32_t>::sum ((SIMDNativeOps<uint32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return fb::multiplyAdd (a, b, c); }\r
static forcedinline uint64_t sum (vSIMDType a) noexcept { return fb::sum (a); }\r
};\r
struct SIMDNativeOps<float>\r
{\r
//==============================================================================\r
- typedef float32x4_t vSIMDType;\r
- typedef uint32x4_t vMaskType;\r
- typedef SIMDFallbackOps<float, vSIMDType> fb;\r
+ using vSIMDType = float32x4_t;\r
+ using vMaskType = uint32x4_t;\r
+ using fb = SIMDFallbackOps<float, vSIMDType>;\r
\r
//==============================================================================\r
DECLARE_NEON_SIMD_CONST (int32_t, kAllBitsSet);\r
DECLARE_NEON_SIMD_CONST (float, kOne);\r
\r
//==============================================================================\r
- static forcedinline vSIMDType expand (float s) noexcept { return vdupq_n_f32 (s); }\r
- static forcedinline vSIMDType load (const float* a) noexcept { return vld1q_f32 (a); }\r
- static forcedinline void store (vSIMDType value, float* a) noexcept { vst1q_f32 (a, value); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_f32 (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_f32 (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_f32 (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vandq_u32 ((vMaskType) a, (vMaskType) b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vorrq_u32 ((vMaskType) a, (vMaskType) b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) veorq_u32 ((vMaskType) a, (vMaskType) b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vbicq_u32 ((vMaskType) b, (vMaskType) a); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_f32 ((float*) kAllBitsSet)); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_f32 (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_f32 (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_f32 (a, b); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_f32 (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_f32 (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<uint32_t>::sum (notEqual (a, b)) == 0); }\r
- static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_f32 (a, b, c); }\r
- static forcedinline vSIMDType dupeven (vSIMDType a) noexcept { return fb::shuffle<(0 << 0) | (0 << 2) | (2 << 4) | (2 << 6)> (a); }\r
- static forcedinline vSIMDType dupodd (vSIMDType a) noexcept { return fb::shuffle<(1 << 0) | (1 << 2) | (3 << 4) | (3 << 6)> (a); }\r
- static forcedinline vSIMDType swapevenodd (vSIMDType a) noexcept { return fb::shuffle<(1 << 0) | (0 << 2) | (3 << 4) | (2 << 6)> (a); }\r
- static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept { return add (fb::shuffle<(2 << 0) | (3 << 2) | (0 << 4) | (1 << 6)> (a), a); }\r
+ static forcedinline vSIMDType expand (float s) noexcept { return vdupq_n_f32 (s); }\r
+ static forcedinline vSIMDType load (const float* a) noexcept { return vld1q_f32 (a); }\r
+ static forcedinline float get (vSIMDType v, size_t i) noexcept { return v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, float s) noexcept { v[i] = s; return v; }\r
+ static forcedinline void store (vSIMDType value, float* a) noexcept { vst1q_f32 (a, value); }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_f32 (a, b); }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_f32 (a, b); }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_f32 (a, b); }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vandq_u32 ((vMaskType) a, (vMaskType) b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vorrq_u32 ((vMaskType) a, (vMaskType) b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) veorq_u32 ((vMaskType) a, (vMaskType) b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vbicq_u32 ((vMaskType) b, (vMaskType) a); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_f32 ((float*) kAllBitsSet)); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_f32 (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_f32 (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_f32 (a, b); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_f32 (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_f32 (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return (SIMDNativeOps<uint32_t>::sum ((SIMDNativeOps<uint32_t>::vSIMDType) notEqual (a, b)) == 0); }\r
+ static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_f32 (a, b, c); }\r
+ static forcedinline vSIMDType dupeven (vSIMDType a) noexcept { return fb::shuffle<(0 << 0) | (0 << 2) | (2 << 4) | (2 << 6)> (a); }\r
+ static forcedinline vSIMDType dupodd (vSIMDType a) noexcept { return fb::shuffle<(1 << 0) | (1 << 2) | (3 << 4) | (3 << 6)> (a); }\r
+ static forcedinline vSIMDType swapevenodd (vSIMDType a) noexcept { return fb::shuffle<(1 << 0) | (0 << 2) | (3 << 4) | (2 << 6)> (a); }\r
+ static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept { return add (fb::shuffle<(2 << 0) | (3 << 2) | (0 << 4) | (1 << 6)> (a), a); }\r
\r
//==============================================================================\r
static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept\r
struct SIMDNativeOps<double>\r
{\r
//==============================================================================\r
- typedef struct { double values [2]; } vSIMDType;\r
- typedef SIMDFallbackOps<double, vSIMDType> fb;\r
-\r
- static forcedinline vSIMDType expand (double s) noexcept { return fb::expand (s); }\r
- static forcedinline vSIMDType load (const double* a) noexcept { return fb::load (a); }\r
- static forcedinline void store (vSIMDType value, double* a) noexcept { fb::store (value, a); }\r
- static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return fb::add (a, b); }\r
- static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return fb::sub (a, b); }\r
- static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return fb::mul (a, b); }\r
- static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return fb::bit_and (a, b); }\r
- static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return fb::bit_or (a, b); }\r
- static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return fb::bit_xor (a, b); }\r
- static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return fb::bit_notand (a, b); }\r
- static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return fb::bit_not (a); }\r
- static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return fb::min (a, b); }\r
- static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return fb::max (a, b); }\r
- static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return fb::equal (a, b); }\r
- static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return fb::notEqual (a, b); }\r
- static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThan (a, b); }\r
- static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThanOrEqual (a, b); }\r
- static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return fb::allEqual (a, b); }\r
+ using vSIMDType = struct { double v[2]; };\r
+ using fb = SIMDFallbackOps<double, vSIMDType>;\r
+\r
+ static forcedinline vSIMDType expand (double s) noexcept { return {{s, s}}; }\r
+ static forcedinline vSIMDType load (const double* a) noexcept { return {{a[0], a[1]}}; }\r
+ static forcedinline void store (vSIMDType v, double* a) noexcept { a[0] = v.v[0]; a[1] = v.v[1]; }\r
+ static forcedinline double get (vSIMDType v, size_t i) noexcept { return v.v[i]; }\r
+ static forcedinline vSIMDType set (vSIMDType v, size_t i, double s) noexcept { v.v[i] = s; return v; }\r
+ static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return {{a.v[0] + b.v[0], a.v[1] + b.v[1]}}; }\r
+ static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return {{a.v[0] - b.v[0], a.v[1] - b.v[1]}}; }\r
+ static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return {{a.v[0] * b.v[0], a.v[1] * b.v[1]}}; }\r
+ static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return fb::bit_and (a, b); }\r
+ static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return fb::bit_or (a, b); }\r
+ static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return fb::bit_xor (a, b); }\r
+ static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return fb::bit_notand (a, b); }\r
+ static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return fb::bit_not (a); }\r
+ static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return fb::min (a, b); }\r
+ static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return fb::max (a, b); }\r
+ static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return fb::equal (a, b); }\r
+ static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return fb::notEqual (a, b); }\r
+ static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThan (a, b); }\r
+ static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThanOrEqual (a, b); }\r
+ static forcedinline bool allEqual (vSIMDType a, vSIMDType b) noexcept { return fb::allEqual (a, b); }\r
static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return fb::multiplyAdd (a, b, c); }\r
- static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept { return fb::cmplxmul (a, b); }\r
- static forcedinline double sum (vSIMDType a) noexcept { return fb::sum (a); }\r
- static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept { return a; }\r
+ static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept { return fb::cmplxmul (a, b); }\r
+ static forcedinline double sum (vSIMDType a) noexcept { return fb::sum (a); }\r
+ static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept { return a; }\r
};\r
\r
#endif\r
\r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic pop\r
+#endif\r
+\r
} // namespace dsp\r
} // namespace juce\r
\r
#ifndef DOXYGEN\r
\r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic push\r
+ #pragma GCC diagnostic ignored "-Wignored-attributes"\r
+#endif\r
+\r
#ifdef _MSC_VER\r
#define DECLARE_SSE_SIMD_CONST(type, name) \\r
static __declspec(align(16)) const type name [16 / sizeof (type)]\r
struct SIMDNativeOps<float>\r
{\r
//==============================================================================\r
- typedef __m128 vSIMDType;\r
+ using vSIMDType = __m128;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (int32_t, kAllBitsSet);\r
static forcedinline __m128 JUCE_VECTOR_CALLTYPE dupodd (__m128 a) noexcept { return _mm_shuffle_ps (a, a, _MM_SHUFFLE (3, 3, 1, 1)); }\r
static forcedinline __m128 JUCE_VECTOR_CALLTYPE swapevenodd (__m128 a) noexcept { return _mm_shuffle_ps (a, a, _MM_SHUFFLE (2, 3, 0, 1)); }\r
static forcedinline __m128 JUCE_VECTOR_CALLTYPE oddevensum (__m128 a) noexcept { return _mm_add_ps (_mm_shuffle_ps (a, a, _MM_SHUFFLE (1, 0, 3, 2)), a); }\r
+ static forcedinline float JUCE_VECTOR_CALLTYPE get (__m128 v, size_t i) noexcept { return SIMDFallbackOps<float, __m128>::get (v, i); }\r
+ static forcedinline __m128 JUCE_VECTOR_CALLTYPE set (__m128 v, size_t i, float s) noexcept { return SIMDFallbackOps<float, __m128>::set (v, i, s); }\r
\r
//==============================================================================\r
static forcedinline __m128 JUCE_VECTOR_CALLTYPE cmplxmul (__m128 a, __m128 b) noexcept\r
__m128 retval = _mm_add_ps (_mm_shuffle_ps (a, a, 0x4e), a);\r
retval = _mm_add_ps (retval, _mm_shuffle_ps (retval, retval, 0xb1));\r
#endif\r
- return ((float*) &retval) [0];\r
+ return _mm_cvtss_f32 (retval);\r
}\r
};\r
\r
struct SIMDNativeOps<double>\r
{\r
//==============================================================================\r
- typedef __m128d vSIMDType;\r
+ using vSIMDType = __m128d;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (int64_t, kAllBitsSet);\r
DECLARE_SSE_SIMD_CONST (double, kOne);\r
\r
//==============================================================================\r
- static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept { return *reinterpret_cast<const __m128d*> (a); }\r
- static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return *reinterpret_cast<const __m128d*> (a); }\r
+ static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept { return load (a); }\r
+ static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return _mm_castsi128_pd (_mm_load_si128 ((const __m128i*) a)); }\r
static forcedinline __m128d JUCE_VECTOR_CALLTYPE expand (double s) noexcept { return _mm_load1_pd (&s); }\r
static forcedinline __m128d JUCE_VECTOR_CALLTYPE load (const double* a) noexcept { return _mm_load_pd (a); }\r
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128d value, double* dest) noexcept { _mm_store_pd (dest, value); }\r
static forcedinline __m128d JUCE_VECTOR_CALLTYPE dupeven (__m128d a) noexcept { return _mm_shuffle_pd (a, a, _MM_SHUFFLE2 (0, 0)); }\r
static forcedinline __m128d JUCE_VECTOR_CALLTYPE dupodd (__m128d a) noexcept { return _mm_shuffle_pd (a, a, _MM_SHUFFLE2 (1, 1)); }\r
static forcedinline __m128d JUCE_VECTOR_CALLTYPE swapevenodd (__m128d a) noexcept { return _mm_shuffle_pd (a, a, _MM_SHUFFLE2 (0, 1)); }\r
- static forcedinline __m128d oddevensum (__m128d a) noexcept { return a; }\r
+ static forcedinline __m128d JUCE_VECTOR_CALLTYPE oddevensum (__m128d a) noexcept { return a; }\r
+ static forcedinline double JUCE_VECTOR_CALLTYPE get (__m128d v, size_t i) noexcept { return SIMDFallbackOps<double, __m128d>::get (v, i); }\r
+ static forcedinline __m128d JUCE_VECTOR_CALLTYPE set (__m128d v, size_t i, double s) noexcept { return SIMDFallbackOps<double, __m128d>::set (v, i, s); }\r
\r
//==============================================================================\r
static forcedinline __m128d JUCE_VECTOR_CALLTYPE cmplxmul (__m128d a, __m128d b) noexcept\r
#else\r
__m128d retval = _mm_add_pd (_mm_shuffle_pd (a, a, 0x01), a);\r
#endif\r
- return ((double*) &retval) [0];\r
+ return _mm_cvtsd_f64 (retval);\r
}\r
};\r
\r
struct SIMDNativeOps<int8_t>\r
{\r
//==============================================================================\r
- typedef __m128i vSIMDType;\r
+ using vSIMDType = __m128i;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (int8_t, kAllBitsSet);\r
\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int8_t* a) noexcept { return *reinterpret_cast<const __m128i*> (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int8_t* a) noexcept { return load (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int8_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int8_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int8_t s) noexcept { return _mm_set1_epi8 (s); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi8 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi8 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+ static forcedinline int8_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept { return SIMDFallbackOps<int8_t, __m128i>::get (v, i); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, int8_t s) noexcept { return SIMDFallbackOps<int8_t, __m128i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int8_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const char*> (a);\r
- return _mm_set_epi8 (b[15], b[14], b[13], b[12], b[11], b[10], b[9], b[8],\r
- b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, int8_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<int8_t, __m128i>::store (value, dest);\r
- }\r
-\r
static forcedinline int8_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
{\r
#ifdef __SSSE3__\r
hi = _mm_hadd_epi16 (hi, hi);\r
}\r
\r
- const int8_t* lo_ptr = reinterpret_cast<const int8_t*> (&lo);\r
- const int8_t* hi_ptr = reinterpret_cast<const int8_t*> (&hi);\r
-\r
- return lo_ptr[0] + hi_ptr[0];\r
+ return static_cast<int8_t> ((_mm_cvtsi128_si32 (lo) & 0xff) + (_mm_cvtsi128_si32 (hi) & 0xff));\r
#else\r
- int8_t sum = 0;\r
- const int8_t* src = reinterpret_cast<const int8_t*> (&a);\r
-\r
- for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int8_t)); ++i)\r
- sum += src [i];\r
-\r
- return sum;\r
+ return SIMDFallbackOps<int8_t, __m128i>::sum (a);\r
#endif\r
}\r
\r
struct SIMDNativeOps<uint8_t>\r
{\r
//==============================================================================\r
- typedef __m128i vSIMDType;\r
+ using vSIMDType = __m128i;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (uint8_t, kHighBit);\r
DECLARE_SSE_SIMD_CONST (uint8_t, kAllBitsSet);\r
\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint8_t* a) noexcept { return *reinterpret_cast<const __m128i*> (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint8_t* a) noexcept { return load (a); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint8_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint8_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint8_t s) noexcept { return _mm_set1_epi8 ((int8_t) s); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi8 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi8 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+ static forcedinline uint8_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept { return SIMDFallbackOps<uint8_t, __m128i>::get (v, i); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, uint8_t s) noexcept { return SIMDFallbackOps<uint8_t, __m128i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint8_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const char*> (a);\r
- return _mm_set_epi8 (b[15], b[14], b[13], b[12], b[11], b[10], b[9], b[8],\r
- b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, uint8_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<uint8_t, __m128i>::store (value, dest);\r
- }\r
-\r
static forcedinline uint8_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
{\r
#ifdef __SSSE3__\r
hi = _mm_hadd_epi16 (hi, hi);\r
}\r
\r
- const uint8_t* lo_ptr = reinterpret_cast<const uint8_t*> (&lo);\r
- const uint8_t* hi_ptr = reinterpret_cast<const uint8_t*> (&hi);\r
-\r
- return lo_ptr[0] + hi_ptr[0];\r
+ return static_cast<uint8_t> ((static_cast<uint32_t> (_mm_cvtsi128_si32 (lo)) & 0xffu)\r
+ + (static_cast<uint32_t> (_mm_cvtsi128_si32 (hi)) & 0xffu));\r
#else\r
- uint8_t sum = 0;\r
- const uint8_t* src = reinterpret_cast<const uint8_t*> (&a);\r
-\r
- for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int8_t)); ++i)\r
- sum += src [i];\r
-\r
- return sum;\r
+ return SIMDFallbackOps<uint8_t, __m128i>::sum (a);\r
#endif\r
}\r
\r
struct SIMDNativeOps<int16_t>\r
{\r
//==============================================================================\r
- typedef __m128i vSIMDType;\r
+ using vSIMDType = __m128i;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (int16_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int16_t* a) noexcept { return *reinterpret_cast<const __m128i*> (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int16_t* a) noexcept { return load (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int16_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int16_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int16_t s) noexcept { return _mm_set1_epi16 (s); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi16 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi16 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+ static forcedinline int16_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept { return SIMDFallbackOps<int16_t, __m128i>::get (v, i); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, int16_t s) noexcept { return SIMDFallbackOps<int16_t, __m128i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int16_t* a) noexcept\r
- {\r
- return _mm_set_epi16 (a[7], a[6], a[5], a[4], a[3], a[2], a[1], a[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, int16_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<int16_t, __m128i>::store (value, dest);\r
- }\r
-\r
static forcedinline int16_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
{\r
#ifdef __SSSE3__\r
__m128i tmp = _mm_hadd_epi16 (a, a);\r
tmp = _mm_hadd_epi16 (tmp, tmp);\r
tmp = _mm_hadd_epi16 (tmp, tmp);\r
- return *reinterpret_cast<int16_t*> (&tmp);\r
\r
+ return static_cast<int16_t> (_mm_cvtsi128_si32 (tmp) & 0xffff);\r
#else\r
- int16_t sum = 0;\r
- const int16_t* src = reinterpret_cast<const int16_t*> (&a);\r
-\r
- for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int16_t)); ++i)\r
- sum += src [i];\r
-\r
- return sum;\r
+ return SIMDFallbackOps<int16_t, __m128i>::sum (a);\r
#endif\r
}\r
};\r
struct SIMDNativeOps<uint16_t>\r
{\r
//==============================================================================\r
- typedef __m128i vSIMDType;\r
+ using vSIMDType = __m128i;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (uint16_t, kHighBit);\r
DECLARE_SSE_SIMD_CONST (uint16_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint16_t* a) noexcept { return *reinterpret_cast<const __m128i*> (a); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept { return _mm_set1_epi16 ((int16_t) s); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi16 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi16 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept { return _mm_mullo_epi16 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint16_t* a) noexcept { return load (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint16_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint16_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept { return _mm_set1_epi16 ((int16_t) s); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi16 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi16 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept { return _mm_mullo_epi16 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
#if defined(__SSE4__)\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { return _mm_min_epu16 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { return _mm_max_epu16 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { return _mm_min_epu16 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { return _mm_max_epu16 (a, b); }\r
#else\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
#endif\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi16 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi16 (ssign (a), ssign (b)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi16 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi16 (ssign (a), ssign (b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+ static forcedinline uint16_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept { return SIMDFallbackOps<uint16_t, __m128i>::get (v, i); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, uint16_t s) noexcept { return SIMDFallbackOps<uint16_t, __m128i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint16_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const int16_t*> (a);\r
- return _mm_set_epi16 (b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, uint16_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<uint16_t, __m128i>::store (value, dest);\r
- }\r
-\r
static forcedinline uint16_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
{\r
#ifdef __SSSE3__\r
__m128i tmp = _mm_hadd_epi16 (a, a);\r
tmp = _mm_hadd_epi16 (tmp, tmp);\r
tmp = _mm_hadd_epi16 (tmp, tmp);\r
- return *reinterpret_cast<uint16_t*> (&tmp);\r
- #else\r
- uint16_t sum = 0;\r
- const uint16_t* src = reinterpret_cast<const uint16_t*> (&a);\r
-\r
- for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(uint16_t)); ++i)\r
- sum += src [i];\r
\r
- return sum;\r
+ return static_cast<uint16_t> (static_cast<uint32_t> (_mm_cvtsi128_si32 (tmp)) & 0xffffu);\r
+ #else\r
+ return SIMDFallbackOps<uint16_t, __m128i>::sum (a);\r
#endif\r
}\r
};\r
struct SIMDNativeOps<int32_t>\r
{\r
//==============================================================================\r
- typedef __m128i vSIMDType;\r
+ using vSIMDType = __m128i;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (int32_t, kAllBitsSet);\r
\r
//==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return *reinterpret_cast<const __m128i*> (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return load (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int32_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int32_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int32_t s) noexcept { return _mm_set1_epi32 (s); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int32_t* a) noexcept { return _mm_set_epi32 (a[3], a[2], a[1], a[0]); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi32 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi32 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+ static forcedinline int32_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept { return SIMDFallbackOps<int32_t, __m128i>::get (v, i); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, int32_t s) noexcept { return SIMDFallbackOps<int32_t, __m128i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, int32_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<int32_t, __m128i>::store (value, dest);\r
- }\r
-\r
static forcedinline int32_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
{\r
#ifdef __SSSE3__\r
__m128i tmp = _mm_hadd_epi32 (a, a);\r
- tmp = _mm_hadd_epi32 (tmp, tmp);\r
- return *reinterpret_cast<int32_t*> (&tmp);\r
+ return _mm_cvtsi128_si32 (_mm_hadd_epi32 (tmp, tmp));\r
#else\r
- int32_t sum = 0;\r
- const int32_t* src = reinterpret_cast<const int32_t*> (&a);\r
-\r
- for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int32_t)); ++i)\r
- sum += src [i];\r
-\r
- return sum;\r
+ return SIMDFallbackOps<int32_t, __m128i>::sum (a);\r
#endif\r
}\r
\r
struct SIMDNativeOps<uint32_t>\r
{\r
//==============================================================================\r
- typedef __m128i vSIMDType;\r
+ using vSIMDType = __m128i;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (uint32_t, kAllBitsSet);\r
DECLARE_SSE_SIMD_CONST (uint32_t, kHighBit);\r
\r
//==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint32_t* a) noexcept { return *reinterpret_cast<const __m128i*> (a); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept { return _mm_set1_epi32 ((int32_t) s); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi32 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi32 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi32 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi32 (ssign (a), ssign (b)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint32_t* a) noexcept { return load (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint32_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint32_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept { return _mm_set1_epi32 ((int32_t) s); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi32 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi32 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi32 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi32 (ssign (a), ssign (b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+ static forcedinline uint32_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept { return SIMDFallbackOps<uint32_t, __m128i>::get (v, i); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, uint32_t s) noexcept { return SIMDFallbackOps<uint32_t, __m128i>::set (v, i, s); }\r
\r
//==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint32_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const int32_t*> (a);\r
- return _mm_set_epi32 (b[3], b[2], b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, uint32_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<uint32_t, __m128i>::store (value, dest);\r
- }\r
-\r
static forcedinline uint32_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
{\r
#ifdef __SSSE3__\r
__m128i tmp = _mm_hadd_epi32 (a, a);\r
- tmp = _mm_hadd_epi32 (tmp, tmp);\r
- return *reinterpret_cast<uint32_t*> (&tmp);\r
+ return static_cast<uint32_t> (_mm_cvtsi128_si32 (_mm_hadd_epi32 (tmp, tmp)));\r
#else\r
- uint32_t sum = 0;\r
- const uint32_t* src = reinterpret_cast<const uint32_t*> (&a);\r
-\r
- for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(uint32_t)); ++i)\r
- sum += src [i];\r
-\r
- return sum;\r
+ return SIMDFallbackOps<uint32_t, __m128i>::sum (a);\r
#endif\r
}\r
\r
struct SIMDNativeOps<int64_t>\r
{\r
//==============================================================================\r
- typedef __m128i vSIMDType;\r
+ using vSIMDType = __m128i;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (int64_t, kAllBitsSet);\r
\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept\r
- {\r
- __m128i retval;\r
- int64_t* ptr = reinterpret_cast<int64_t*> (&retval);\r
- ptr[0] = ptr[1] = s;\r
- return retval;\r
- }\r
-\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int64_t* a) noexcept { return _mm_set_epi64x (a[1], a[0]); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return *reinterpret_cast<const __m128i*> (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return load (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept { return _mm_set1_epi64x (s); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int64_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int64_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi64 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi64 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
- static forcedinline __m128i greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
-\r
- //==============================================================================\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, int64_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<int64_t, __m128i>::store (value, dest);\r
- }\r
-\r
- static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
- {\r
- const int64_t* ptr = reinterpret_cast<const int64_t*> (&a);\r
- return ptr[0] + ptr[1];\r
- }\r
-\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept\r
- {\r
- __m128i retval;\r
-\r
- const int64_t* aptr = reinterpret_cast<const int64_t*> (&a);\r
- const int64_t* bptr = reinterpret_cast<const int64_t*> (&b);\r
- int64_t* dst = reinterpret_cast<int64_t*> (&retval);\r
-\r
- dst[0] = aptr[0] * bptr[0];\r
- dst[1] = aptr[1] * bptr[1];\r
-\r
- return retval;\r
- }\r
+ static forcedinline int64_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept { return SIMDFallbackOps<int64_t, __m128i>::get (v, i); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, int64_t s) noexcept { return SIMDFallbackOps<int64_t, __m128i>::set (v, i, s); }\r
+ static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept { return SIMDFallbackOps<int64_t, __m128i>::sum (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept { return SIMDFallbackOps<int64_t, __m128i>::mul (a, b); }\r
\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept\r
{\r
\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept\r
{\r
- #if defined(__SSE4_1__) && !defined(__clang__)\r
+ #if defined(__SSE4_1__)\r
return _mm_cmpgt_epi64 (a, b);\r
#else\r
- __m128i retval;\r
-\r
- const int64_t* aptr = reinterpret_cast<const int64_t*> (&a);\r
- const int64_t* bptr = reinterpret_cast<const int64_t*> (&b);\r
- int64_t* dst = reinterpret_cast<int64_t*> (&retval);\r
-\r
- dst[0] = aptr[0] > bptr[0] ? -1LL : 0;\r
- dst[1] = aptr[1] > bptr[1] ? -1LL : 0;\r
-\r
- return retval;\r
+ return SIMDFallbackOps<int64_t, __m128i>::greaterThan (a, b);\r
#endif\r
}\r
};\r
struct SIMDNativeOps<uint64_t>\r
{\r
//==============================================================================\r
- typedef __m128i vSIMDType;\r
+ using vSIMDType = __m128i;\r
\r
//==============================================================================\r
DECLARE_SSE_SIMD_CONST (uint64_t, kAllBitsSet);\r
DECLARE_SSE_SIMD_CONST (uint64_t, kHighBit);\r
\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept\r
- {\r
- __m128i retval;\r
- uint64_t* ptr = reinterpret_cast<uint64_t*> (&retval);\r
- ptr[0] = ptr[1] = s;\r
- return retval;\r
- }\r
-\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint64_t* a) noexcept { return *reinterpret_cast<const __m128i*> (a); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi64 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi64 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
- static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
-\r
- //==============================================================================\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint64_t* a) noexcept\r
- {\r
- const auto* b = reinterpret_cast<const int64_t*> (a);\r
- return _mm_set_epi64x (b[1], b[0]);\r
- }\r
-\r
- static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i value, uint64_t* dest) noexcept\r
- {\r
- SIMDFallbackOps<uint64_t, __m128i>::store (value, dest);\r
- }\r
-\r
- static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept\r
- {\r
- const uint64_t* ptr = reinterpret_cast<const uint64_t*> (&a);\r
- return ptr[0] + ptr[1];\r
- }\r
-\r
- static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept\r
- {\r
- __m128i retval;\r
-\r
- const uint64_t* aptr = reinterpret_cast<const uint64_t*> (&a);\r
- const uint64_t* bptr = reinterpret_cast<const uint64_t*> (&b);\r
- uint64_t* dst = reinterpret_cast<uint64_t*> (&retval);\r
-\r
- dst[0] = aptr[0] * bptr[0];\r
- dst[1] = aptr[1] * bptr[1];\r
-\r
- return retval;\r
- }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint64_t* a) noexcept { return load (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept { return _mm_set1_epi64x ((int64_t) s); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint64_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }\r
+ static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint64_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi64 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi64 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); }\r
+ static forcedinline bool JUCE_VECTOR_CALLTYPE allEqual (__m128i a, __m128i b) noexcept { return (_mm_movemask_epi8 (equal (a, b)) == 0xffff); }\r
+ static forcedinline uint64_t JUCE_VECTOR_CALLTYPE get (__m128i v, size_t i) noexcept { return SIMDFallbackOps<uint64_t, __m128i>::get (v, i); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE set (__m128i v, size_t i, uint64_t s) noexcept { return SIMDFallbackOps<uint64_t, __m128i>::set (v, i, s); }\r
+ static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept { return SIMDFallbackOps<uint64_t, __m128i>::sum (a); }\r
+ static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept { return SIMDFallbackOps<uint64_t, __m128i>::mul (a, b); }\r
\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept\r
{\r
\r
static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept\r
{\r
- #if defined(__SSE4_1__) && !defined(__clang__)\r
- return _mm_cmpgt_epi64 (a, b);\r
+ #if defined(__SSE4_1__)\r
+ return _mm_cmpgt_epi64 (ssign (a), ssign (b));\r
#else\r
- __m128i retval;\r
-\r
- const uint64_t* aptr = reinterpret_cast<const uint64_t*> (&a);\r
- const uint64_t* bptr = reinterpret_cast<const uint64_t*> (&b);\r
- uint64_t* dst = reinterpret_cast<uint64_t*> (&retval);\r
-\r
- dst[0] = aptr[0] > bptr[0] ? (uint64_t) -1LL : 0;\r
- dst[1] = aptr[1] > bptr[1] ? (uint64_t) -1LL : 0;\r
-\r
- return retval;\r
+ return SIMDFallbackOps<uint64_t, __m128i>::greaterThan (a, b);\r
#endif\r
}\r
};\r
\r
#endif\r
\r
+#if JUCE_GCC && (__GNUC__ >= 6)\r
+ #pragma GCC diagnostic pop\r
+#endif\r
+\r
} // namespace dsp\r
} // namespace juce\r
MathConstants<NumericType>::pi,\r
lookupTableNumPoints);\r
\r
- lookupTable = table;\r
+ lookupTable.reset (table);\r
generator = [table] (NumericType x) { return (*table) (x); };\r
}\r
else\r
private:\r
//==============================================================================\r
std::function<NumericType (NumericType)> generator;\r
- ScopedPointer<LookupTableTransform<NumericType>> lookupTable;\r
+ std::unique_ptr<LookupTableTransform<NumericType>> lookupTable;\r
Array<NumericType> rampBuffer;\r
LinearSmoothedValue<NumericType> frequency { static_cast<NumericType> (440.0) };\r
NumericType sampleRate = 48000.0;\r
};\r
\r
//==============================================================================\r
+// Although clang supports C++17, their standard library still has no invoke_result\r
+// support. Remove the "|| JUCE_CLANG" once clang supports this properly!\r
+#if (! JUCE_CXX17_IS_AVAILABLE) || JUCE_CLANG\r
template <typename Functor>\r
static WaveShaper<typename std::result_of<Functor>, Functor> CreateWaveShaper (Functor functionToUse) { return {functionToUse}; }\r
+#else\r
+template <typename Functor>\r
+static WaveShaper<typename std::invoke_result<Functor>, Functor> CreateWaveShaper (Functor functionToUse) { return {functionToUse}; }\r
+#endif\r
\r
} // namespace dsp\r
} // namespace juce\r
struct Connection;\r
friend struct Connection;\r
friend struct ContainerDeletePolicy<Connection>;\r
- ScopedPointer<Connection> connection;\r
+ std::unique_ptr<Connection> connection;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessSlave)\r
};\r
bool sendMessageToSlave (const MemoryBlock&);\r
\r
private:\r
- ScopedPointer<ChildProcess> childProcess;\r
+ std::unique_ptr<ChildProcess> childProcess;\r
\r
struct Connection;\r
friend struct Connection;\r
friend struct ContainerDeletePolicy<Connection>;\r
- ScopedPointer<Connection> connection;\r
+ std::unique_ptr<Connection> connection;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessMaster)\r
};\r
\r
//==============================================================================\r
bool InterprocessConnection::connectToSocket (const String& hostName,\r
- const int portNumber,\r
- const int timeOutMillisecs)\r
+ int portNumber, int timeOutMillisecs)\r
{\r
disconnect();\r
\r
return false;\r
}\r
\r
-bool InterprocessConnection::connectToPipe (const String& pipeName, const int timeoutMs)\r
+bool InterprocessConnection::connectToPipe (const String& pipeName, int timeoutMs)\r
{\r
disconnect();\r
\r
- ScopedPointer<NamedPipe> newPipe (new NamedPipe());\r
+ std::unique_ptr<NamedPipe> newPipe (new NamedPipe());\r
\r
if (newPipe->openExisting (pipeName))\r
{\r
return false;\r
}\r
\r
-bool InterprocessConnection::createPipe (const String& pipeName, const int timeoutMs, bool mustNotExist)\r
+bool InterprocessConnection::createPipe (const String& pipeName, int timeoutMs, bool mustNotExist)\r
{\r
disconnect();\r
\r
- ScopedPointer<NamedPipe> newPipe (new NamedPipe());\r
+ std::unique_ptr<NamedPipe> newPipe (new NamedPipe());\r
\r
if (newPipe->createNewPipe (pipeName, mustNotExist))\r
{\r
}\r
\r
//==============================================================================\r
-bool InterprocessConnection::readNextMessageInt()\r
+int InterprocessConnection::readData (void* data, int num)\r
+{\r
+ if (socket != nullptr)\r
+ return socket->read (data, num, true);\r
+\r
+ if (pipe != nullptr)\r
+ return pipe->read (data, num, pipeReceiveMessageTimeout);\r
+\r
+ jassertfalse;\r
+ return -1;\r
+}\r
+\r
+bool InterprocessConnection::readNextMessage()\r
{\r
uint32 messageHeader[2];\r
- const int bytes = socket != nullptr ? socket->read (messageHeader, sizeof (messageHeader), true)\r
- : pipe ->read (messageHeader, sizeof (messageHeader), -1);\r
+ auto bytes = readData (messageHeader, sizeof (messageHeader));\r
\r
if (bytes == sizeof (messageHeader)\r
&& ByteOrder::swapIfBigEndian (messageHeader[0]) == magicMessageHeader)\r
{\r
- int bytesInMessage = (int) ByteOrder::swapIfBigEndian (messageHeader[1]);\r
+ auto bytesInMessage = (int) ByteOrder::swapIfBigEndian (messageHeader[1]);\r
\r
if (bytesInMessage > 0)\r
{\r
if (thread->threadShouldExit())\r
return false;\r
\r
- const int numThisTime = jmin (bytesInMessage, 65536);\r
- void* const data = addBytesToPointer (messageData.getData(), bytesRead);\r
-\r
- const int bytesIn = socket != nullptr ? socket->read (data, numThisTime, true)\r
- : pipe ->read (data, numThisTime, -1);\r
+ auto numThisTime = jmin (bytesInMessage, 65536);\r
+ auto bytesIn = readData (addBytesToPointer (messageData.getData(), bytesRead), numThisTime);\r
\r
if (bytesIn <= 0)\r
break;\r
if (bytesRead >= 0)\r
deliverDataInt (messageData);\r
}\r
+\r
+ return true;\r
}\r
- else if (bytes < 0)\r
+\r
+ if (bytes < 0)\r
{\r
if (socket != nullptr)\r
deletePipeAndSocket();\r
\r
connectionLostInt();\r
- return false;\r
}\r
\r
- return true;\r
+ return false;\r
}\r
\r
void InterprocessConnection::runThread()\r
break;\r
}\r
\r
- if (thread->threadShouldExit() || ! readNextMessageInt())\r
+ if (thread->threadShouldExit() || ! readNextMessage())\r
break;\r
}\r
}\r
private:\r
//==============================================================================\r
CriticalSection pipeAndSocketLock;\r
- ScopedPointer<StreamingSocket> socket;\r
- ScopedPointer<NamedPipe> pipe;\r
+ std::unique_ptr<StreamingSocket> socket;\r
+ std::unique_ptr<NamedPipe> pipe;\r
bool callbackConnectionState = false;\r
const bool useMessageThread;\r
const uint32 magicMessageHeader;\r
void connectionMadeInt();\r
void connectionLostInt();\r
void deliverDataInt (const MemoryBlock&);\r
- bool readNextMessageInt();\r
+ bool readNextMessage();\r
+ int readData (void*, int);\r
\r
struct ConnectionThread;\r
friend struct ConnectionThread;\r
friend struct ContainerDeletePolicy<ConnectionThread>;\r
- ScopedPointer<ConnectionThread> thread;\r
+ std::unique_ptr<ConnectionThread> thread;\r
void runThread();\r
int writeData (void*, int);\r
\r
{\r
while ((! threadShouldExit()) && socket != nullptr)\r
{\r
- ScopedPointer<StreamingSocket> clientSocket (socket->waitForNextConnection());\r
+ std::unique_ptr<StreamingSocket> clientSocket (socket->waitForNextConnection());\r
\r
if (clientSocket != nullptr)\r
if (auto* newConnection = createConnectionObject())\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<StreamingSocket> socket;\r
+ std::unique_ptr<StreamingSocket> socket;\r
\r
void run() override;\r
\r
\r
ID: juce_events\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE message and event handling classes\r
description: Classes for running an application's main event loop and sending/receiving messages, timers, etc.\r
website: http://www.juce.com/juce\r
JUCE_AUTORELEASEPOOL\r
{\r
{\r
- const ScopedPointer<JUCEApplicationBase> app (appInstance);\r
+ const std::unique_ptr<JUCEApplicationBase> app (appInstance);\r
\r
if (app != nullptr)\r
app->shutdownApp();\r
ScopedJuceInitialiser_GUI libraryInitialiser;\r
jassert (createInstance != nullptr);\r
\r
- const ScopedPointer<JUCEApplicationBase> app (createInstance());\r
+ const std::unique_ptr<JUCEApplicationBase> app (createInstance());\r
jassert (app != nullptr);\r
\r
if (! app->initialiseApp())\r
\r
void initialise (const String& commandLine) override\r
{\r
- myMainWindow = new MyApplicationWindow();\r
+ myMainWindow.reset (new MyApplicationWindow());\r
myMainWindow->setBounds (100, 100, 400, 500);\r
myMainWindow->setVisible (true);\r
}\r
}\r
\r
private:\r
- ScopedPointer<MyApplicationWindow> myMainWindow;\r
+ std::unique_ptr<MyApplicationWindow> myMainWindow;\r
};\r
\r
// this generates boilerplate code to launch our app class:\r
\r
/** Checks whether multiple instances of the app are allowed.\r
\r
- If you application class returns true for this, more than one instance is\r
+ If your application class returns true for this, more than one instance is\r
permitted to run (except on the Mac where this isn't possible).\r
\r
If it's false, the second instance won't start, but it you will still get a\r
struct MultipleInstanceHandler;\r
friend struct MultipleInstanceHandler;\r
friend struct ContainerDeletePolicy<MultipleInstanceHandler>;\r
- ScopedPointer<MultipleInstanceHandler> multipleInstanceHandler;\r
+ std::unique_ptr<MultipleInstanceHandler> multipleInstanceHandler;\r
\r
JUCE_DECLARE_NON_COPYABLE (JUCEApplicationBase)\r
};\r
Message() noexcept;\r
~Message();\r
\r
- typedef ReferenceCountedObjectPtr<Message> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<Message>;\r
\r
//==============================================================================\r
private:\r
}\r
\r
WaitableEvent finished;\r
- void* volatile result = nullptr;\r
+ std::atomic<void*> result { nullptr };\r
\r
private:\r
MessageCallbackFunction* const func;\r
if (message->post())\r
{\r
message->finished.wait();\r
- return message->result;\r
+ return message->result.load();\r
}\r
\r
jassertfalse; // the OS message queue failed to send the message!\r
virtual void messageCallback() = 0;\r
bool post();\r
\r
- typedef ReferenceCountedObjectPtr<MessageBase> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<MessageBase>;\r
\r
JUCE_DECLARE_NON_COPYABLE (MessageBase)\r
};\r
friend class QuitMessage;\r
friend class MessageManagerLock;\r
\r
- ScopedPointer<ActionBroadcaster> broadcaster;\r
+ std::unique_ptr<ActionBroadcaster> broadcaster;\r
Atomic<int> quitMessagePosted { 0 }, quitMessageReceived { 0 };\r
Thread::ThreadID messageThreadId;\r
Atomic<Thread::ThreadID> threadWithLock;\r
private:\r
JUCE_PUBLIC_IN_DLL_BUILD (struct Pimpl)\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MountedVolumeListChangeDetector)\r
};\r
namespace juce\r
{\r
\r
-#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
- METHOD (constructor, "<init>", "()V") \\r
- METHOD (post, "post", "(Ljava/lang/Runnable;)Z") \\r
-\r
-DECLARE_JNI_CLASS (JNIHandler, "android/os/Handler");\r
-#undef JNI_CLASS_MEMBERS\r
-\r
-\r
//==============================================================================\r
namespace Android\r
{\r
\r
struct Handler\r
{\r
- Handler() : nativeHandler (getEnv()->NewObject (JNIHandler, JNIHandler.constructor)) {}\r
+ Handler() : nativeHandler (getEnv()->NewObject (AndroidHandler, AndroidHandler.constructor)) {}\r
~Handler() { clearSingletonInstance(); }\r
\r
JUCE_DECLARE_SINGLETON (Handler, false)\r
\r
bool post (jobject runnable)\r
{\r
- return (getEnv()->CallBooleanMethod (nativeHandler.get(), JNIHandler.post, runnable) != 0);\r
+ return (getEnv()->CallBooleanMethod (nativeHandler.get(), AndroidHandler.post, runnable) != 0);\r
}\r
\r
GlobalRef nativeHandler;\r
#endif\r
\r
//==============================================================================\r
-static ScopedPointer<MessageQueue> messageQueue;\r
+static std::unique_ptr<MessageQueue> messageQueue;\r
\r
void MessageManager::doPlatformSpecificInitialisation()\r
{\r
if (messageQueue == nullptr)\r
- messageQueue = new MessageQueue();\r
+ messageQueue.reset (new MessageQueue());\r
}\r
\r
void MessageManager::doPlatformSpecificShutdown()\r
\r
pfds[INTERNAL_QUEUE_FD].fd = getReadHandle();\r
pfds[INTERNAL_QUEUE_FD].events = POLLIN;\r
- readCallback[INTERNAL_QUEUE_FD] = new LinuxEventLoop::CallbackFunction<decltype(internalQueueCb)> (internalQueueCb);\r
+ readCallback[INTERNAL_QUEUE_FD].reset (new LinuxEventLoop::CallbackFunction<decltype(internalQueueCb)> (internalQueueCb));\r
}\r
\r
~InternalMessageQueue()\r
fdCount = 2;\r
pfds[WINDOW_SYSTEM_FD].fd = _fd;\r
pfds[WINDOW_SYSTEM_FD].events = POLLIN;\r
- readCallback[WINDOW_SYSTEM_FD] = _readCallback;\r
+ readCallback[WINDOW_SYSTEM_FD].reset (_readCallback);\r
readCallback[WINDOW_SYSTEM_FD]->active = true;\r
}\r
\r
ReferenceCountedArray <MessageManager::MessageBase> queue;\r
int fd[2];\r
pollfd pfds[FD_COUNT];\r
- ScopedPointer<LinuxEventLoop::CallbackFunctionBase> readCallback[FD_COUNT];\r
+ std::unique_ptr<LinuxEventLoop::CallbackFunctionBase> readCallback[FD_COUNT];\r
int fdCount = 1;\r
int loopCount = 0;\r
int bytesInSocket = 0;\r
const unsigned int broadcastMessageMagicNumber = 0xc403;\r
\r
const TCHAR messageWindowName[] = _T("JUCEWindow");\r
- ScopedPointer<HiddenMessageWindow> messageWindow;\r
+ std::unique_ptr<HiddenMessageWindow> messageWindow;\r
\r
void dispatchMessageFromLParam (LPARAM lParam)\r
{\r
OleInitialize (0);\r
\r
using namespace WindowsMessageHelpers;\r
- messageWindow = new HiddenMessageWindow (messageWindowName, (WNDPROC) messageWndProc);\r
+ messageWindow.reset (new HiddenMessageWindow (messageWindowName, (WNDPROC) messageWndProc));\r
juce_messageWindowHandle = messageWindow->getHWND();\r
}\r
\r
\r
FillType::FillType (FillType&& other) noexcept\r
: colour (other.colour),\r
- gradient (static_cast<ScopedPointer<ColourGradient>&&> (other.gradient)),\r
+ gradient (static_cast<std::unique_ptr<ColourGradient>&&> (other.gradient)),\r
image (static_cast<Image&&> (other.image)),\r
transform (other.transform)\r
{\r
jassert (this != &other); // hopefully the compiler should make this situation impossible!\r
\r
colour = other.colour;\r
- gradient = static_cast<ScopedPointer<ColourGradient>&&> (other.gradient);\r
+ gradient = static_cast<std::unique_ptr<ColourGradient>&&> (other.gradient);\r
image = static_cast<Image&&> (other.image);\r
transform = other.transform;\r
return *this;\r
If a gradient is active, the overall opacity with which it should be applied\r
is indicated by the alpha channel of the colour variable.\r
*/\r
- ScopedPointer<ColourGradient> gradient;\r
+ std::unique_ptr<ColourGradient> gradient;\r
\r
/** The image that should be used for tiling.\r
If an image fill is active, the overall opacity with which it should be applied\r
private:\r
//==============================================================================\r
LowLevelGraphicsContext& context;\r
- ScopedPointer<LowLevelGraphicsContext> contextToDelete;\r
+ std::unique_ptr<LowLevelGraphicsContext> contextToDelete;\r
\r
bool saveStatePending = false;\r
void saveStateIfPending();\r
int lineStartPosition = 0;\r
int runStartPosition = 0;\r
\r
- ScopedPointer<TextLayout::Line> currentLine;\r
- ScopedPointer<TextLayout::Run> currentRun;\r
+ std::unique_ptr<TextLayout::Line> currentLine;\r
+ std::unique_ptr<TextLayout::Run> currentRun;\r
\r
bool needToSetLineOrigin = true;\r
\r
public:\r
//==============================================================================\r
/** A handy typedef for a pointer to a typeface. */\r
- typedef ReferenceCountedObjectPtr<Typeface> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<Typeface>;\r
\r
//==============================================================================\r
/** Returns the font family of the typeface.\r
private:\r
struct HintingParams;\r
friend struct ContainerDeletePolicy<HintingParams>;\r
- ScopedPointer<HintingParams> hintingParams;\r
+ std::unique_ptr<HintingParams> hintingParams;\r
CriticalSection hintingLock;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Typeface)\r
&& mat11 == 1.0f;\r
}\r
\r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const AffineTransform AffineTransform::identity;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const AffineTransform AffineTransform::identity);\r
\r
//==============================================================================\r
AffineTransform AffineTransform::followedBy (const AffineTransform& other) const noexcept\r
*/\r
float getScaleFactor() const noexcept;\r
\r
- #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
- /** A ready-to-use identity transform - now depracated.\r
- @deprecated If you need an identity transform, just use AffineTransform() or {}.\r
+ /* A ready-to-use identity transform - now depracated.\r
+ @deprecated If you need an identity transform, just use AffineTransform() or {}.\r
*/\r
- static const AffineTransform identity;\r
- #endif\r
+ JUCE_DEPRECATED_STATIC (static const AffineTransform identity);\r
\r
//==============================================================================\r
/* The transform matrix is:\r
#if (JUCE_MAC || JUCE_IOS) && USE_COREGRAPHICS_RENDERING && JUCE_USE_COREIMAGE_LOADER\r
return juce_loadWithCoreImage (in);\r
#else\r
- const ScopedPointer<GIFLoader> loader (new GIFLoader (in));\r
+ const std::unique_ptr<GIFLoader> loader (new GIFLoader (in));\r
return loader->image;\r
#endif\r
}\r
\r
Image ImageType::convert (const Image& source) const\r
{\r
- if (source.isNull() || getTypeID() == (ScopedPointer<ImageType> (source.getPixelData()->createType())->getTypeID()))\r
+ if (source.isNull() || getTypeID() == (std::unique_ptr<ImageType> (source.getPixelData()->createType())->getTypeID()))\r
return source;\r
\r
const Image::BitmapData src (source, Image::BitmapData::readOnly);\r
ImagePixelData::Ptr clone() override\r
{\r
jassert (getReferenceCount() > 0); // (This method can't be used on an unowned pointer, as it will end up self-deleting)\r
- const ScopedPointer<ImageType> type (createType());\r
+ const std::unique_ptr<ImageType> type (createType());\r
\r
Image newImage (type->create (pixelFormat, area.getWidth(), area.getHeight(), pixelFormat != Image::RGB));\r
\r
{\r
}\r
\r
-#if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
-const Image Image::null;\r
-#endif\r
+JUCE_DECLARE_DEPRECATED_STATIC (const Image Image::null);\r
\r
int Image::getReferenceCount() const noexcept { return image == nullptr ? 0 : image->getSharedCount(); }\r
int Image::getWidth() const noexcept { return image == nullptr ? 0 : image->width; }\r
if (image == nullptr || (image->width == newWidth && image->height == newHeight))\r
return *this;\r
\r
- const ScopedPointer<ImageType> type (image->createType());\r
+ const std::unique_ptr<ImageType> type (image->createType());\r
Image newImage (type->create (image->pixelFormat, newWidth, newHeight, hasAlphaChannel()));\r
\r
Graphics g (newImage);\r
\r
const int w = image->width, h = image->height;\r
\r
- const ScopedPointer<ImageType> type (image->createType());\r
+ const std::unique_ptr<ImageType> type (image->createType());\r
Image newImage (type->create (newFormat, w, h, false));\r
\r
if (newFormat == SingleChannel)\r
{\r
if (image != nullptr)\r
{\r
- const ScopedPointer<LowLevelGraphicsContext> g (image->createLowLevelContext());\r
+ const std::unique_ptr<LowLevelGraphicsContext> g (image->createLowLevelContext());\r
g->setFill (colourToClearTo);\r
g->fillRect (area, true);\r
}\r
virtual ~BitmapDataReleaser() {}\r
};\r
\r
- ScopedPointer<BitmapDataReleaser> dataReleaser;\r
+ std::unique_ptr<BitmapDataReleaser> dataReleaser;\r
\r
private:\r
JUCE_DECLARE_NON_COPYABLE (BitmapData)\r
/** @internal */\r
explicit Image (ImagePixelData*) noexcept;\r
\r
- #if JUCE_ALLOW_STATIC_NULL_VARIABLES\r
- /** A null Image object that can be used when you need to return an invalid image.\r
+ /* A null Image object that can be used when you need to return an invalid image.\r
@deprecated If you need a default-constructed var, just use Image() or {}.\r
*/\r
- static const Image null;\r
- #endif\r
+ JUCE_DEPRECATED_STATIC (static const Image null);\r
\r
private:\r
//==============================================================================\r
ImagePixelData (Image::PixelFormat, int width, int height);\r
~ImagePixelData();\r
\r
- typedef ReferenceCountedObjectPtr<ImagePixelData> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<ImagePixelData>;\r
\r
/** Creates a context that will draw into this image. */\r
virtual LowLevelGraphicsContext* createLowLevelContext() = 0;\r
\r
ID: juce_graphics\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE graphics classes\r
description: Classes for 2D vector graphics, image loading/saving, font handling, etc.\r
website: http://www.juce.com/juce\r
}\r
\r
Font font;\r
- ScopedPointer<EdgeTable> edgeTable;\r
+ std::unique_ptr<EdgeTable> edgeTable;\r
int glyph = 0, lastAccessCount = 0;\r
bool snapToIntegerCoordinate = false;\r
\r
Base() {}\r
virtual ~Base() {}\r
\r
- typedef ReferenceCountedObjectPtr<Base> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<Base>;\r
\r
virtual Ptr clone() const = 0;\r
virtual Ptr applyClipTo (const Ptr& target) const = 0;\r
EdgeTableRegion (const EdgeTableRegion& other) : Base(), edgeTable (other.edgeTable) {}\r
EdgeTableRegion& operator= (const EdgeTableRegion&) = delete;\r
\r
- typedef typename Base::Ptr Ptr;\r
+ using Ptr = typename Base::Ptr;\r
\r
Ptr clone() const override { return new EdgeTableRegion (*this); }\r
Ptr applyClipTo (const Ptr& target) const override { return target->clipToEdgeTable (edgeTable); }\r
RectangleListRegion (const RectangleList<int>& r) : clip (r) {}\r
RectangleListRegion (const RectangleListRegion& other) : Base(), clip (other.clip) {}\r
\r
- typedef typename Base::Ptr Ptr;\r
+ using Ptr = typename Base::Ptr;\r
\r
Ptr clone() const override { return new RectangleListRegion (*this); }\r
Ptr applyClipTo (const Ptr& target) const override { return target->clipToRectangleList (clip); }\r
class SavedStateBase\r
{\r
public:\r
- typedef typename ClipRegions<SavedStateType>::Base BaseRegionType;\r
- typedef typename ClipRegions<SavedStateType>::EdgeTableRegion EdgeTableRegionType;\r
- typedef typename ClipRegions<SavedStateType>::RectangleListRegion RectangleListRegionType;\r
+ using BaseRegionType = typename ClipRegions<SavedStateType>::Base;\r
+ using EdgeTableRegionType = typename ClipRegions<SavedStateType>::EdgeTableRegion;\r
+ using RectangleListRegionType = typename ClipRegions<SavedStateType>::RectangleListRegion;\r
\r
SavedStateBase (Rectangle<int> initialClip)\r
: clip (new RectangleListRegionType (initialClip)),\r
//==============================================================================\r
class SoftwareRendererSavedState : public SavedStateBase<SoftwareRendererSavedState>\r
{\r
- typedef SavedStateBase<SoftwareRendererSavedState> BaseClass;\r
+ using BaseClass = SavedStateBase<SoftwareRendererSavedState>;\r
\r
public:\r
SoftwareRendererSavedState (const Image& im, Rectangle<int> clipBounds)\r
{\r
auto layerBounds = clip->getClipBounds();\r
\r
- const ScopedPointer<LowLevelGraphicsContext> g (image.createLowLevelContext());\r
+ const std::unique_ptr<LowLevelGraphicsContext> g (image.createLowLevelContext());\r
g->setOpacity (finishedLayerState.transparencyLayerAlpha);\r
g->drawImage (finishedLayerState.image, AffineTransform::translation (layerBounds.getPosition()));\r
}\r
}\r
\r
- typedef GlyphCache<CachedGlyphEdgeTable<SoftwareRendererSavedState>, SoftwareRendererSavedState> GlyphCacheType;\r
+ using GlyphCacheType = GlyphCache<CachedGlyphEdgeTable<SoftwareRendererSavedState>, SoftwareRendererSavedState>;\r
\r
static void clearGlyphCache()\r
{\r
auto t = transform.getTransformWith (AffineTransform::scale (fontHeight * font.getHorizontalScale(), fontHeight)\r
.followedBy (trans));\r
\r
- ScopedPointer<EdgeTable> et (font.getTypeface()->getEdgeTableForGlyph (glyphNumber, t, fontHeight));\r
+ std::unique_ptr<EdgeTable> et (font.getTypeface()->getEdgeTableForGlyph (glyphNumber, t, fontHeight));\r
\r
if (et != nullptr)\r
fillShape (new EdgeTableRegionType (*et), false);\r
\r
void endTransparencyLayer()\r
{\r
- ScopedPointer<StateObjectType> finishedTransparencyLayer (currentState.release());\r
+ std::unique_ptr<StateObjectType> finishedTransparencyLayer (currentState.release());\r
restore();\r
currentState->endTransparencyLayer (*finishedTransparencyLayer);\r
}\r
\r
private:\r
- ScopedPointer<StateObjectType> currentState;\r
+ std::unique_ptr<StateObjectType> currentState;\r
OwnedArray<StateObjectType> stack;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SavedStateStack)\r
\r
void initialise (JNIEnv* const env)\r
{\r
- rect = GlobalRef (env->NewObject (AndroidRectClass, AndroidRectClass.constructor, 0, 0, 0, 0));\r
+ rect = GlobalRef (env->NewObject (AndroidRect, AndroidRect.constructor, 0, 0, 0, 0));\r
\r
paint = GlobalRef (GraphicsHelpers::createPaint (Graphics::highResamplingQuality));\r
const LocalRef<jobject> ignored (paint.callObjectMethod (AndroidPaint.setTypeface, typeface.get()));\r
float getStringWidth (const String& text) override\r
{\r
JNIEnv* env = getEnv();\r
- const int numChars = text.length();\r
+ const int numChars = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer());\r
jfloatArray widths = env->NewFloatArray (numChars);\r
\r
const int numDone = paint.callIntMethod (AndroidPaint.getTextWidths, javaString (text).get(), widths);\r
void getGlyphPositions (const String& text, Array<int>& glyphs, Array<float>& xOffsets) override\r
{\r
JNIEnv* env = getEnv();\r
- auto jtext = javaString (text);\r
-\r
- const int numChars = env->GetStringLength (jtext.get());\r
+ const int numChars = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer());\r
jfloatArray widths = env->NewFloatArray (numChars);\r
\r
- const int numDone = paint.callIntMethod (AndroidPaint.getTextWidths, jtext.get(), widths);\r
+ const int numDone = paint.callIntMethod (AndroidPaint.getTextWidths, javaString (text).get(), widths);\r
\r
HeapBlock<jfloat> localWidths (static_cast<size_t> (numDone));\r
env->GetFloatArrayRegion (widths, 0, numDone, localWidths);\r
\r
env->DeleteLocalRef (matrix);\r
\r
- const int left = env->GetIntField (rect.get(), AndroidRectClass.left);\r
- const int top = env->GetIntField (rect.get(), AndroidRectClass.top);\r
- const int right = env->GetIntField (rect.get(), AndroidRectClass.right);\r
- const int bottom = env->GetIntField (rect.get(), AndroidRectClass.bottom);\r
+ const int left = env->GetIntField (rect.get(), AndroidRect.left);\r
+ const int top = env->GetIntField (rect.get(), AndroidRect.top);\r
+ const int right = env->GetIntField (rect.get(), AndroidRect.right);\r
+ const int bottom = env->GetIntField (rect.get(), AndroidRect.bottom);\r
\r
const Rectangle<int> bounds (left, top, right - left, bottom - top);\r
\r
\r
FT_Library library;\r
\r
- typedef ReferenceCountedObjectPtr<FTLibWrapper> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<FTLibWrapper>;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FTLibWrapper)\r
};\r
FTLibWrapper::Ptr library;\r
MemoryBlock savedFaceData;\r
\r
- typedef ReferenceCountedObjectPtr<FTFaceWrapper> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<FTFaceWrapper>;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FTFaceWrapper)\r
};\r
\r
if (fontDirs.isEmpty())\r
{\r
- if (ScopedPointer<XmlElement> fontsInfo = findFontsConfFile())\r
+ std::unique_ptr<XmlElement> fontsInfo (findFontsConfFile());\r
+\r
+ if (fontsInfo != nullptr)\r
{\r
forEachXmlChildElementWithTagName (*fontsInfo, e, "dir")\r
{\r
CGGradientRef gradient;\r
};\r
\r
- ScopedPointer<SavedState> state;\r
+ std::unique_ptr<SavedState> state;\r
OwnedArray<SavedState> stateStack;\r
\r
void drawGradient();\r
{\r
public:\r
OSXTypeface (const Font& font)\r
- : Typeface (font.getTypefaceName(), font.getTypefaceStyle()), isMemoryFont (false)\r
+ : Typeface (font.getTypefaceName(), font.getTypefaceStyle()), canBeUsedForLayout (true)\r
{\r
ctFontRef = CoreTextTypeLayout::createCTFont (font, referenceFontSize, renderingTransform);\r
\r
}\r
\r
OSXTypeface (const void* data, size_t dataSize)\r
- : Typeface ({}, {}), isMemoryFont (true), dataCopy (data, dataSize)\r
+ : Typeface ({}, {}), canBeUsedForLayout (false), dataCopy (data, dataSize)\r
{\r
// We can't use CFDataCreate here as this triggers a false positive in ASAN\r
// so copy the data manually and use CFDataCreateWithBytesNoCopy\r
\r
if (fontRef != nullptr)\r
{\r
+ #if JUCE_MAC && defined (MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8\r
+ canBeUsedForLayout = CTFontManagerRegisterGraphicsFont (fontRef, nullptr);\r
+ #endif\r
+\r
ctFontRef = CTFontCreateWithGraphicsFont (fontRef, referenceFontSize, nullptr, nullptr);\r
\r
if (ctFontRef != nullptr)\r
\r
CFStringRef keys[] = { kCTFontAttributeName, kCTLigatureAttributeName };\r
CFTypeRef values[] = { ctFontRef, numberRef };\r
- attributedStringAtts = CFDictionaryCreate (nullptr, (const void**) &keys, (const void**) &values, numElementsInArray (keys),\r
+ attributedStringAtts = CFDictionaryCreate (nullptr, (const void**) &keys,\r
+ (const void**) &values, numElementsInArray (keys),\r
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);\r
CFRelease (numberRef);\r
}\r
\r
~OSXTypeface()\r
{\r
- if (attributedStringAtts != nullptr) CFRelease (attributedStringAtts);\r
- if (fontRef != nullptr) CGFontRelease (fontRef);\r
- if (ctFontRef != nullptr) CFRelease (ctFontRef);\r
+ if (attributedStringAtts != nullptr)\r
+ CFRelease (attributedStringAtts);\r
+\r
+ if (fontRef != nullptr)\r
+ {\r
+ #if JUCE_MAC && defined (MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8\r
+ CTFontManagerUnregisterGraphicsFont (fontRef, nullptr);\r
+ #endif\r
+\r
+ CGFontRelease (fontRef);\r
+ }\r
+\r
+ if (ctFontRef != nullptr)\r
+ CFRelease (ctFontRef);\r
}\r
\r
float getAscent() const override { return ascent; }\r
float fontHeightToPointsFactor = 1.0f;\r
CGAffineTransform renderingTransform = CGAffineTransformIdentity;\r
\r
- const bool isMemoryFont;\r
+ bool canBeUsedForLayout;\r
\r
private:\r
MemoryBlock dataCopy;\r
return Typeface::createSystemTypefaceFor (newFont);\r
}\r
\r
-// Due to an old and unfathomable bug in CoreText which prevents the layout working with\r
-// typefaces that were loaded from memory, this function checks whether we need to use a\r
-// fallback layout algorithm.\r
static bool canAllTypefacesBeUsedInLayout (const AttributedString& text)\r
{\r
- #if JUCE_MAC && defined (MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11\r
- ignoreUnused (text);\r
- return true;\r
- #else\r
-\r
- #if JUCE_MAC\r
- if (SystemStats::getOperatingSystemType() >= SystemStats::OperatingSystemType::MacOSX_10_11)\r
- return true;\r
- #endif\r
-\r
auto numCharacterAttributes = text.getNumAttributes();\r
\r
for (int i = 0; i < numCharacterAttributes; ++i)\r
{\r
- auto* t = text.getAttribute(i).font.getTypeface();\r
+ if (auto tf = dynamic_cast<OSXTypeface*> (text.getAttribute(i).font.getTypeface()))\r
+ if (tf->canBeUsedForLayout)\r
+ continue;\r
\r
- if (auto tf = dynamic_cast<OSXTypeface*> (t))\r
- {\r
- if (tf->isMemoryFont)\r
- return false;\r
- }\r
- else if (dynamic_cast<CustomTypeface*> (t) != nullptr)\r
- {\r
- return false;\r
- }\r
+ return false;\r
}\r
\r
return true;\r
- #endif\r
}\r
\r
bool TextLayout::createNativeLayout (const AttributedString& text)\r
return true;\r
}\r
\r
- ignoreUnused (text);\r
return false;\r
}\r
\r
struct Pimpl;\r
friend struct Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Direct2DLowLevelGraphicsContext)\r
};\r
{\r
const CharPointer_UTF16 utf16 (text.toUTF16());\r
const size_t numChars = utf16.length();\r
- HeapBlock<int16> results (numChars + 1);\r
- results[numChars] = -1;\r
+ HeapBlock<uint16> results (numChars);\r
float x = 0;\r
\r
if (GetGlyphIndices (dc, utf16, (int) numChars, reinterpret_cast<WORD*> (results.getData()),\r
GGI_MARK_NONEXISTING_GLYPHS) != GDI_ERROR)\r
{\r
for (size_t i = 0; i < numChars; ++i)\r
- x += getKerning (dc, results[i], results[i + 1]);\r
+ x += getKerning (dc, results[i], (i + 1) < numChars ? results[i + 1] : -1);\r
}\r
\r
return x;\r
{\r
const CharPointer_UTF16 utf16 (text.toUTF16());\r
const size_t numChars = utf16.length();\r
- HeapBlock<int16> results (numChars + 1);\r
- results[numChars] = -1;\r
+ HeapBlock<uint16> results (numChars);\r
float x = 0;\r
\r
if (GetGlyphIndices (dc, utf16, (int) numChars, reinterpret_cast<WORD*> (results.getData()),\r
{\r
resultGlyphs.add (results[i]);\r
xOffsets.add (x);\r
- x += getKerning (dc, results[i], results[i + 1]);\r
+ x += getKerning (dc, results[i], (i + 1) < numChars ? results[i + 1] : -1);\r
}\r
}\r
\r
\r
if (factories->systemFonts != nullptr)\r
{\r
- ScopedPointer<WindowsDirectWriteTypeface> wtf (new WindowsDirectWriteTypeface (font, factories->systemFonts));\r
+ std::unique_ptr<WindowsDirectWriteTypeface> wtf (new WindowsDirectWriteTypeface (font, factories->systemFonts));\r
\r
if (wtf->loadedOk())\r
return wtf.release();\r
\r
void initialise (const String& commandLine) override\r
{\r
- myMainWindow = new MyApplicationWindow();\r
+ myMainWindow.reset (new MyApplicationWindow());\r
myMainWindow->setBounds (100, 100, 400, 500);\r
myMainWindow->setVisible (true);\r
}\r
}\r
\r
private:\r
- ScopedPointer<MyApplicationWindow> myMainWindow;\r
+ std::unique_ptr<MyApplicationWindow> myMainWindow;\r
};\r
\r
// this generates boilerplate code to launch our app class:\r
\r
/** Checks whether multiple instances of the app are allowed.\r
\r
- If you application class returns true for this, more than one instance is\r
+ If your application class returns true for this, more than one instance is\r
permitted to run (except on OSX where the OS automatically stops you launching\r
a second instance of an app without explicitly starting it from the command-line).\r
\r
void valueChanged (Value& value) override\r
{\r
if (value.refersToSameSourceAs (button.isOn))\r
- button.setToggleState (button.isOn.getValue(), dontSendNotification);\r
+ button.setToggleState (button.isOn.getValue(), dontSendNotification, sendNotification);\r
}\r
\r
bool keyPressed (const KeyPress&, Component*) override\r
}\r
}\r
\r
-void Button::setConnectedEdges (const int newFlags)\r
+void Button::setConnectedEdges (int newFlags)\r
{\r
if (connectedEdgeFlags != newFlags)\r
{\r
}\r
\r
//==============================================================================\r
-void Button::setToggleState (const bool shouldBeOn, const NotificationType notification)\r
+void Button::setToggleState (bool shouldBeOn, NotificationType notification)\r
+{\r
+ setToggleState (shouldBeOn, notification, notification);\r
+}\r
+\r
+void Button::setToggleState (bool shouldBeOn, NotificationType clickNotification, NotificationType stateNotification)\r
{\r
if (shouldBeOn != lastToggleState)\r
{\r
\r
if (shouldBeOn)\r
{\r
- turnOffOtherButtonsInGroup (notification);\r
+ turnOffOtherButtonsInGroup (clickNotification, stateNotification);\r
\r
if (deletionWatcher == nullptr)\r
return;\r
lastToggleState = shouldBeOn;\r
repaint();\r
\r
- if (notification != dontSendNotification)\r
+ if (clickNotification != dontSendNotification)\r
{\r
// async callbacks aren't possible here\r
- jassert (notification != sendNotificationAsync);\r
+ jassert (clickNotification != sendNotificationAsync);\r
\r
- sendClickMessage (ModifierKeys::getCurrentModifiers());\r
+ sendClickMessage (ModifierKeys::currentModifiers);\r
\r
if (deletionWatcher == nullptr)\r
return;\r
}\r
\r
- if (notification != dontSendNotification)\r
+ if (stateNotification != dontSendNotification)\r
sendStateMessage();\r
else\r
buttonStateChanged();\r
}\r
}\r
\r
-void Button::setToggleState (const bool shouldBeOn, bool sendChange)\r
+void Button::setToggleState (bool shouldBeOn, bool sendChange)\r
{\r
setToggleState (shouldBeOn, sendChange ? sendNotification : dontSendNotification);\r
}\r
\r
-void Button::setClickingTogglesState (const bool shouldToggle) noexcept\r
+void Button::setClickingTogglesState (bool shouldToggle) noexcept\r
{\r
clickTogglesState = shouldToggle;\r
\r
return clickTogglesState;\r
}\r
\r
-void Button::setRadioGroupId (const int newGroupId, NotificationType notification)\r
+void Button::setRadioGroupId (int newGroupId, NotificationType notification)\r
{\r
if (radioGroupId != newGroupId)\r
{\r
radioGroupId = newGroupId;\r
\r
if (lastToggleState)\r
- turnOffOtherButtonsInGroup (notification);\r
+ turnOffOtherButtonsInGroup (notification, notification);\r
}\r
}\r
\r
-void Button::turnOffOtherButtonsInGroup (const NotificationType notification)\r
+void Button::turnOffOtherButtonsInGroup (NotificationType clickNotification, NotificationType stateNotification)\r
{\r
if (auto* p = getParentComponent())\r
{\r
{\r
if (b->getRadioGroupId() == radioGroupId)\r
{\r
- b->setToggleState (false, notification);\r
+ b->setToggleState (false, clickNotification, stateNotification);\r
\r
if (deletionWatcher == nullptr)\r
return;\r
return updateState (isMouseOver (true), isMouseButtonDown());\r
}\r
\r
-Button::ButtonState Button::updateState (const bool over, const bool down)\r
+Button::ButtonState Button::updateState (bool over, bool down)\r
{\r
ButtonState newState = buttonNormal;\r
\r
return newState;\r
}\r
\r
-void Button::setState (const ButtonState newState)\r
+void Button::setState (ButtonState newState)\r
{\r
if (buttonState != newState)\r
{\r
return now > buttonPressTime ? now - buttonPressTime : 0;\r
}\r
\r
-void Button::setTriggeredOnMouseDown (const bool isTriggeredOnMouseDown) noexcept\r
+void Button::setTriggeredOnMouseDown (bool isTriggeredOnMouseDown) noexcept\r
{\r
triggerOnMouseDown = isTriggeredOnMouseDown;\r
}\r
if (isEnabled())\r
{\r
flashButtonState();\r
- internalClickCallback (ModifierKeys::getCurrentModifiers());\r
+ internalClickCallback (ModifierKeys::currentModifiers);\r
}\r
}\r
else\r
}\r
\r
//==============================================================================\r
-void Button::setCommandToTrigger (ApplicationCommandManager* const newCommandManager,\r
- const CommandID newCommandID, const bool generateTip)\r
+void Button::setCommandToTrigger (ApplicationCommandManager* newCommandManager,\r
+ CommandID newCommandID, bool generateTip)\r
{\r
commandID = newCommandID;\r
generateTooltip = generateTip;\r
\r
if (isEnabled() && wasDown && ! isKeyDown)\r
{\r
- internalClickCallback (ModifierKeys::getCurrentModifiers());\r
+ internalClickCallback (ModifierKeys::currentModifiers);\r
\r
// (return immediately - this button may now have been deleted)\r
return true;\r
}\r
\r
//==============================================================================\r
-void Button::setRepeatSpeed (const int initialDelayMillisecs,\r
- const int repeatMillisecs,\r
- const int minimumDelayInMillisecs) noexcept\r
+void Button::setRepeatSpeed (int initialDelayMillisecs,\r
+ int repeatMillisecs,\r
+ int minimumDelayInMillisecs) noexcept\r
{\r
autoRepeatDelay = initialDelayMillisecs;\r
autoRepeatSpeed = repeatMillisecs;\r
lastRepeatTime = now;\r
callbackHelper->startTimer (repeatSpeed);\r
\r
- internalClickCallback (ModifierKeys::getCurrentModifiers());\r
+ internalClickCallback (ModifierKeys::currentModifiers);\r
}\r
else if (! needsToRelease)\r
{\r
struct CallbackHelper;\r
friend struct CallbackHelper;\r
friend struct ContainerDeletePolicy<CallbackHelper>;\r
- ScopedPointer<CallbackHelper> callbackHelper;\r
+ std::unique_ptr<CallbackHelper> callbackHelper;\r
uint32 buttonPressTime = 0, lastRepeatTime = 0;\r
ApplicationCommandManager* commandManagerToUse = nullptr;\r
int autoRepeatDelay = -1, autoRepeatSpeed = 0, autoRepeatMinimumDelay = -1;\r
ButtonState updateState();\r
ButtonState updateState (bool isOver, bool isDown);\r
bool isShortcutPressed() const;\r
- void turnOffOtherButtonsInGroup (NotificationType);\r
+ void turnOffOtherButtonsInGroup (NotificationType click, NotificationType state);\r
\r
void flashButtonState();\r
void sendClickMessage (const ModifierKeys&);\r
void sendStateMessage();\r
+ void setToggleState (bool shouldBeOn, NotificationType click, NotificationType state);\r
\r
bool isMouseOrTouchOver (const MouseEvent& e);\r
\r
private:\r
//==============================================================================\r
ButtonStyle style;\r
- ScopedPointer<Drawable> normalImage, overImage, downImage, disabledImage,\r
+ std::unique_ptr<Drawable> normalImage, overImage, downImage, disabledImage,\r
normalImageOn, overImageOn, downImageOn, disabledImageOn;\r
Drawable* currentImage = nullptr;\r
int edgeIndent = 3;\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<Drawable> normalImage, toggledOnImage;\r
+ std::unique_ptr<Drawable> normalImage, toggledOnImage;\r
Drawable* currentImage;\r
\r
void updateDrawable();\r
//==============================================================================\r
OwnedArray<ApplicationCommandInfo> commands;\r
ListenerList<ApplicationCommandManagerListener> listeners;\r
- ScopedPointer<KeyPressMappingSet> keyMappings;\r
+ std::unique_ptr<KeyPressMappingSet> keyMappings;\r
ApplicationCommandTarget* firstTarget = nullptr;\r
\r
void sendListenerInvokeCallback (const ApplicationCommandTarget::InvocationInfo&);\r
\r
XmlElement* KeyPressMappingSet::createXml (const bool saveDifferencesFromDefaultSet) const\r
{\r
- ScopedPointer<KeyPressMappingSet> defaultSet;\r
+ std::unique_ptr<KeyPressMappingSet> defaultSet;\r
\r
if (saveDifferencesFromDefaultSet)\r
{\r
}\r
\r
template <typename PointOrRect>\r
- static PointOrRect convertFromDistantParentSpace (const Component* parent, const Component& target, const PointOrRect& coordInParent)\r
+ static PointOrRect convertFromDistantParentSpace (const Component* parent, const Component& target, PointOrRect coordInParent)\r
{\r
auto* directParent = target.getParentComponent();\r
jassert (directParent != nullptr);\r
\r
if (peer != nullptr)\r
{\r
- ScopedPointer<ComponentPeer> oldPeerToDelete (peer);\r
+ std::unique_ptr<ComponentPeer> oldPeerToDelete (peer);\r
\r
wasFullscreen = peer->isFullScreen();\r
wasMinimised = peer->isMinimised();\r
BailOutChecker checker (this);\r
\r
const MouseEvent me (source, relativePos, source.getCurrentModifiers(), MouseInputSource::invalidPressure,\r
- MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation,\r
- MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY,\r
- this, this, time, relativePos, time, 0, false);\r
+ MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation,\r
+ MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY,\r
+ this, this, time, relativePos, time, 0, false);\r
\r
if (isCurrentlyBlockedByAnotherModalComponent())\r
{\r
\r
void Component::sendFakeMouseMove() const\r
{\r
- MouseInputSource mainMouse = Desktop::getInstance().getMainMouseSource();\r
+ auto mainMouse = Desktop::getInstance().getMainMouseSource();\r
\r
if (! mainMouse.isDragging())\r
mainMouse.triggerFakeMove();\r
else\r
{\r
// find the default child component..\r
- ScopedPointer<KeyboardFocusTraverser> traverser (createFocusTraverser());\r
+ std::unique_ptr<KeyboardFocusTraverser> traverser (createFocusTraverser());\r
\r
if (traverser != nullptr)\r
{\r
\r
if (parentComponent != nullptr)\r
{\r
- ScopedPointer<KeyboardFocusTraverser> traverser (createFocusTraverser());\r
+ std::unique_ptr<KeyboardFocusTraverser> traverser (createFocusTraverser());\r
\r
if (traverser != nullptr)\r
{\r
{\r
auto* c = ms.getComponentUnderMouse();\r
\r
- if ((c == this || (includeChildren && isParentOf (c)))\r
- && c->reallyContains (c->getLocalPoint (nullptr, ms.getScreenPosition().roundToInt()), false)\r
- && ((! ms.isTouch()) || ms.isDragging()))\r
- return true;\r
+ if (c == this || (includeChildren && isParentOf (c)))\r
+ if (ms.isDragging() || ! ms.isTouch())\r
+ if (c->reallyContains (c->getLocalPoint (nullptr, ms.getScreenPosition()).roundToInt(), false))\r
+ return true;\r
}\r
\r
return false;\r
}\r
\r
-bool Component::isMouseButtonDown() const\r
+bool Component::isMouseButtonDown (bool includeChildren) const\r
{\r
for (auto& ms : Desktop::getInstance().getMouseSources())\r
- if (ms.isDragging() && ms.getComponentUnderMouse() == this)\r
- return true;\r
+ {\r
+ auto* c = ms.getComponentUnderMouse();\r
+\r
+ if (c == this || (includeChildren && isParentOf (c)))\r
+ if (ms.isDragging())\r
+ return true;\r
+ }\r
\r
return false;\r
}\r
{\r
auto* c = ms.getComponentUnderMouse();\r
\r
- if ((c == this || (includeChildren && isParentOf (c)))\r
- && ((! ms.isTouch()) || ms.isDragging()))\r
- return true;\r
+ if (c == this || (includeChildren && isParentOf (c)))\r
+ if (ms.isDragging() || ! ms.isTouch())\r
+ return true;\r
}\r
\r
return false;\r
\r
bool JUCE_CALLTYPE Component::isMouseButtonDownAnywhere() noexcept\r
{\r
- return ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown();\r
+ return ModifierKeys::currentModifiers.isAnyMouseButtonDown();\r
}\r
\r
Point<int> Component::getMouseXYRelative() const\r
keyListeners->removeFirstMatchingValue (listenerToRemove);\r
}\r
\r
-bool Component::keyPressed (const KeyPress&) { return false; }\r
-bool Component::keyStateChanged (const bool /*isKeyDown*/) { return false; }\r
+bool Component::keyPressed (const KeyPress&) { return false; }\r
+bool Component::keyStateChanged (bool /*isKeyDown*/) { return false; }\r
\r
void Component::modifierKeysChanged (const ModifierKeys& modifiers)\r
{\r
void Component::internalModifierKeysChanged()\r
{\r
sendFakeMouseMove();\r
- modifierKeysChanged (ModifierKeys::getCurrentModifiers());\r
+ modifierKeysChanged (ModifierKeys::currentModifiers);\r
}\r
\r
//==============================================================================\r
Note that when a component is deleted, any child components it contains are NOT\r
automatically deleted. It's your responsibilty to manage their lifespan - you\r
may want to use helper methods like deleteAllChildren(), or less haphazard\r
- approaches like using ScopedPointers or normal object aggregation to manage them.\r
+ approaches like using std::unique_ptrs or normal object aggregation to manage them.\r
\r
If the component being deleted is currently the child of another one, then during\r
deletion, it will be removed from its parent, and the parent will receive a childrenChanged()\r
backwards-compatibility with legacy code, and should be viewed with extreme\r
suspicion by anyone attempting to write modern C++. In almost all cases, it's much\r
smarter to manage the lifetimes of your child components via modern RAII techniques\r
- such as simply making them member variables, or using ScopedPointer, OwnedArray, etc\r
- to manage their lifetimes appropriately.\r
+ such as simply making them member variables, or using std::unique_ptr, OwnedArray,\r
+ etc to manage their lifetimes appropriately.\r
@see removeAllChildren\r
*/\r
void deleteAllChildren();\r
\r
@see isMouseButtonDownAnywhere, isMouseOver, isMouseOverOrDragging\r
*/\r
- bool isMouseButtonDown() const;\r
+ bool isMouseButtonDown (bool includeChildren = false) const;\r
\r
/** True if the mouse is over this component, or if it's being dragged in this component.\r
This is a handy equivalent to (isMouseOver() || isMouseButtonDown()).\r
String componentName, componentID;\r
Component* parentComponent = nullptr;\r
Rectangle<int> boundsRelativeToParent;\r
- ScopedPointer<Positioner> positioner;\r
- ScopedPointer<AffineTransform> affineTransform;\r
+ std::unique_ptr<Positioner> positioner;\r
+ std::unique_ptr<AffineTransform> affineTransform;\r
Array<Component*> childComponentList;\r
WeakReference<LookAndFeel> lookAndFeel;\r
MouseCursor cursor;\r
ImageEffectFilter* effect = nullptr;\r
- ScopedPointer<CachedComponentImage> cachedImage;\r
+ std::unique_ptr<CachedComponentImage> cachedImage;\r
\r
class MouseListenerList;\r
friend class MouseListenerList;\r
friend struct ContainerDeletePolicy<MouseListenerList>;\r
- ScopedPointer<MouseListenerList> mouseListeners;\r
- ScopedPointer<Array<KeyListener*>> keyListeners;\r
+ std::unique_ptr<MouseListenerList> mouseListeners;\r
+ std::unique_ptr<Array<KeyListener*>> keyListeners;\r
ListenerList<ComponentListener> componentListeners;\r
NamedValueSet properties;\r
\r
auto pos = target->getLocalPoint (nullptr, lastFakeMouseMove);\r
auto now = Time::getCurrentTime();\r
\r
- const MouseEvent me (getMainMouseSource(), pos, ModifierKeys::getCurrentModifiers(), MouseInputSource::invalidPressure,\r
+ const MouseEvent me (getMainMouseSource(), pos, ModifierKeys::currentModifiers, MouseInputSource::invalidPressure,\r
MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation,\r
MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY,\r
target, target, now, pos, now, 0, false);\r
friend class DeletedAtShutdown;\r
friend class TopLevelWindowManager;\r
\r
- ScopedPointer<MouseInputSource::SourceList> mouseSources;\r
+ std::unique_ptr<MouseInputSource::SourceList> mouseSources;\r
\r
ListenerList<MouseListener> mouseListeners;\r
ListenerList<FocusChangeListener> focusListeners;\r
Array<Component*> desktopComponents;\r
Array<ComponentPeer*> peers;\r
\r
- ScopedPointer<Displays> displays;\r
+ std::unique_ptr<Displays> displays;\r
\r
Point<float> lastFakeMouseMove;\r
void sendMouseMove();\r
void incrementMouseClickCounter() noexcept;\r
void incrementMouseWheelCounter() noexcept;\r
\r
- ScopedPointer<LookAndFeel> defaultLookAndFeel;\r
+ std::unique_ptr<LookAndFeel> defaultLookAndFeel;\r
WeakReference<LookAndFeel> currentLookAndFeel;\r
\r
Component* kioskModeComponent = nullptr;\r
{\r
if (callback != nullptr)\r
{\r
- ScopedPointer<Callback> callbackDeleter (callback);\r
+ std::unique_ptr<Callback> callbackDeleter (callback);\r
\r
for (int i = stack.size(); --i >= 0;)\r
{\r
\r
if (! item->isActive)\r
{\r
- ScopedPointer<ModalItem> deleter (stack.removeAndReturn (i));\r
+ std::unique_ptr<ModalItem> deleter (stack.removeAndReturn (i));\r
Component::SafePointer<Component> compToDelete (item->autoDelete ? item->component : nullptr);\r
\r
for (int j = item->callbacks.size(); --j >= 0;)\r
auto asString = String::createStringFromData (data, (int) numBytes);\r
\r
XmlDocument doc (asString);\r
- ScopedPointer<XmlElement> outer (doc.getDocumentElement (true));\r
+ std::unique_ptr<XmlElement> outer (doc.getDocumentElement (true));\r
\r
if (outer != nullptr && outer->hasTagName ("svg"))\r
{\r
- ScopedPointer<XmlElement> svg (doc.getDocumentElement());\r
+ std::unique_ptr<XmlElement> svg (doc.getDocumentElement());\r
\r
if (svg != nullptr)\r
result = Drawable::createFromSVG (*svg);\r
void applyDrawableClipPath (Graphics&);\r
\r
Point<int> originRelativeToComponent;\r
- ScopedPointer<Drawable> drawableClipPath;\r
+ std::unique_ptr<Drawable> drawableClipPath;\r
\r
void nonConstDraw (Graphics&, float opacity, const AffineTransform&);\r
\r
{\r
if (xmlPath->hasTagNameIgnoringNamespace ("clipPath"))\r
{\r
- ScopedPointer<DrawableComposite> drawableClipPath (new DrawableComposite());\r
+ std::unique_ptr<DrawableComposite> drawableClipPath (new DrawableComposite());\r
\r
parseSubElements (xmlPath, *drawableClipPath, false);\r
\r
\r
auto link = xml->getStringAttribute ("xlink:href");\r
\r
- ScopedPointer<InputStream> inputStream;\r
+ std::unique_ptr<InputStream> inputStream;\r
MemoryOutputStream imageStream;\r
\r
if (link.startsWith ("data:"))\r
Drawable* Drawable::createFromSVGFile (const File& svgFile)\r
{\r
XmlDocument doc (svgFile);\r
- ScopedPointer<XmlElement> outer (doc.getDocumentElement (true));\r
+ std::unique_ptr<XmlElement> outer (doc.getDocumentElement (true));\r
\r
if (outer != nullptr && outer->hasTagName ("svg"))\r
{\r
- ScopedPointer<XmlElement> svgDocument (doc.getDocumentElement());\r
+ std::unique_ptr<XmlElement> svgDocument (doc.getDocumentElement());\r
\r
if (svgDocument != nullptr)\r
{\r
if (! tempFile.create().wasOk())\r
break;\r
\r
- ScopedPointer<FileOutputStream> outputStream = tempFile.createOutputStream();\r
+ std::unique_ptr<FileOutputStream> outputStream (tempFile.createOutputStream());\r
\r
if (outputStream == nullptr)\r
break;\r
\r
ContentSharer& owner;\r
const Array<Image> images;\r
- ScopedPointer<ImageFileFormat> imageFileFormat;\r
+ std::unique_ptr<ImageFileFormat> imageFileFormat;\r
String extension;\r
};\r
\r
\r
if (tempFile.create().wasOk())\r
{\r
- ScopedPointer<FileOutputStream> outputStream = tempFile.createOutputStream();\r
+ std::unique_ptr<FileOutputStream> outputStream (tempFile.createOutputStream());\r
\r
if (outputStream != nullptr)\r
{\r
{\r
#if JUCE_IOS || JUCE_ANDROID\r
startNewShare (callbackToUse);\r
- prepareImagesThread = new PrepareImagesThread (*this, images, imageFileFormatToUse);\r
+ prepareImagesThread.reset (new PrepareImagesThread (*this, images, imageFileFormatToUse));\r
#else\r
ignoreUnused (images, imageFileFormatToUse);\r
\r
{\r
#if JUCE_IOS || JUCE_ANDROID\r
startNewShare (callbackToUse);\r
- prepareDataThread = new PrepareDataThread (*this, mb);\r
+ prepareDataThread.reset (new PrepareDataThread (*this, mb));\r
#else\r
ignoreUnused (mb);\r
\r
virtual void shareText (const String& text) = 0;\r
};\r
\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
Pimpl* createPimpl();\r
\r
void startNewShare (std::function<void (bool, const String&)>);\r
\r
class PrepareImagesThread;\r
friend class PrepareImagesThread;\r
- ScopedPointer<PrepareImagesThread> prepareImagesThread;\r
+ std::unique_ptr<PrepareImagesThread> prepareImagesThread;\r
\r
class PrepareDataThread;\r
friend class PrepareDataThread;\r
- ScopedPointer<PrepareDataThread> prepareDataThread;\r
+ std::unique_ptr<PrepareDataThread> prepareDataThread;\r
\r
void filesToSharePrepared();\r
#endif\r
|| ((! isDir) && fileFilter->isFileSuitable (file))\r
|| (isDir && fileFilter->isDirectorySuitable (file)))\r
{\r
- ScopedPointer<FileInfo> info (new FileInfo());\r
+ std::unique_ptr<FileInfo> info (new FileInfo());\r
\r
info->filename = file.getFileName();\r
info->fileSize = fileSize;\r
CriticalSection fileListLock;\r
OwnedArray<FileInfo> files;\r
\r
- ScopedPointer<DirectoryIterator> fileFindHandle;\r
+ std::unique_ptr<DirectoryIterator> fileFindHandle;\r
bool volatile shouldStop;\r
\r
int useTimeSlice() override;\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<DirectoryContentsList> fileList;\r
+ std::unique_ptr<DirectoryContentsList> fileList;\r
const FileFilter* fileFilter;\r
\r
int flags;\r
Array<File> chosenFiles;\r
ListenerList<FileBrowserListener> listeners;\r
\r
- ScopedPointer<DirectoryContentsDisplayComponent> fileListComponent;\r
+ std::unique_ptr<DirectoryContentsDisplayComponent> fileListComponent;\r
FilePreviewComponent* previewComp;\r
ComboBox currentPathBox;\r
TextEditor filenameBox;\r
Label fileLabel;\r
- ScopedPointer<Button> goUpButton;\r
+ std::unique_ptr<Button> goUpButton;\r
TimeSliceThread thread;\r
bool wasProcessActive;\r
\r
virtual void runModally() = 0;\r
};\r
\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
//==============================================================================\r
Pimpl* createPimpl (int, FilePreviewComponent*);\r
//==============================================================================\r
ComboBox filenameBox;\r
String lastFilename;\r
- ScopedPointer<Button> browseButton;\r
+ std::unique_ptr<Button> browseButton;\r
int maxRecentFiles = 30;\r
bool isDir, isSaving, isFileDragOver = false;\r
String wildcard, enforcedSuffix, browseButtonText;\r
currentDetails.clear();\r
repaint();\r
\r
- ScopedPointer<FileInputStream> in (fileToLoad.createInputStream());\r
+ std::unique_ptr<FileInputStream> in (fileToLoad.createInputStream());\r
\r
if (in != nullptr && in->getFile().existsAsFile())\r
{\r
#include "misc/juce_DropShadower.cpp"\r
#include "misc/juce_JUCESplashScreen.cpp"\r
\r
-// these classes are C++11-only\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
- #include "layout/juce_FlexBox.cpp"\r
- #if JUCE_HAS_CONSTEXPR\r
- #include "layout/juce_GridItem.cpp"\r
- #include "layout/juce_Grid.cpp"\r
- #if JUCE_UNIT_TESTS\r
- #include "layout/juce_GridUnitTests.cpp"\r
- #endif\r
+#include "layout/juce_FlexBox.cpp"\r
+#if JUCE_HAS_CONSTEXPR\r
+ #include "layout/juce_GridItem.cpp"\r
+ #include "layout/juce_Grid.cpp"\r
+ #if JUCE_UNIT_TESTS\r
+ #include "layout/juce_GridUnitTests.cpp"\r
#endif\r
#endif\r
\r
\r
ID: juce_gui_basics\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE GUI core classes\r
description: Basic user-interface components and related classes.\r
website: http://www.juce.com/juce\r
class ApplicationCommandManagerListener;\r
class DrawableButton;\r
\r
- #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
class FlexBox;\r
#if JUCE_HAS_CONSTEXPR\r
class Grid;\r
#endif\r
- #endif\r
}\r
\r
#include "mouse/juce_MouseCursor.h"\r
#include "native/juce_linux_X11.h"\r
#endif\r
\r
-// these classes are C++11-only\r
-#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS\r
- #include "layout/juce_FlexItem.h"\r
- #include "layout/juce_FlexBox.h"\r
+#include "layout/juce_FlexItem.h"\r
+#include "layout/juce_FlexBox.h"\r
\r
- #if JUCE_HAS_CONSTEXPR\r
- #include "layout/juce_GridItem.h"\r
- #include "layout/juce_Grid.h"\r
- #endif\r
+#if JUCE_HAS_CONSTEXPR\r
+ #include "layout/juce_GridItem.h"\r
+ #include "layout/juce_Grid.h"\r
#endif\r
bool KeyPress::isCurrentlyDown() const\r
{\r
return isKeyCurrentlyDown (keyCode)\r
- && (ModifierKeys::getCurrentModifiers().getRawFlags() & ModifierKeys::allKeyboardModifiers)\r
+ && (ModifierKeys::currentModifiers.getRawFlags() & ModifierKeys::allKeyboardModifiers)\r
== (mods.getRawFlags() & ModifierKeys::allKeyboardModifiers);\r
}\r
\r
namespace juce\r
{\r
\r
-ModifierKeys::ModifierKeys() noexcept : flags (0) {}\r
-ModifierKeys::ModifierKeys (int rawFlags) noexcept : flags (rawFlags) {}\r
+ModifierKeys ModifierKeys::currentModifiers;\r
+\r
+ModifierKeys::ModifierKeys() noexcept : flags (0) {}\r
+ModifierKeys::ModifierKeys (int rawFlags) noexcept : flags (rawFlags) {}\r
ModifierKeys::ModifierKeys (const ModifierKeys& other) noexcept : flags (other.flags) {}\r
\r
ModifierKeys& ModifierKeys::operator= (const ModifierKeys other) noexcept\r
return *this;\r
}\r
\r
-ModifierKeys ModifierKeys::currentModifiers;\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiers() noexcept\r
-{\r
- return currentModifiers;\r
-}\r
-\r
int ModifierKeys::getNumMouseButtonsDown() const noexcept\r
{\r
int num = 0;\r
return num;\r
}\r
\r
+ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
+{\r
+ return ComponentPeer::getCurrentModifiersRealtime();\r
+}\r
+\r
} // namespace juce\r
int getNumMouseButtonsDown() const noexcept;\r
\r
//==============================================================================\r
+ /** This object represents the last-known state of the keyboard and mouse buttons. */\r
+ static ModifierKeys currentModifiers;\r
+\r
/** Creates a ModifierKeys object to represent the last-known state of the\r
keyboard and mouse buttons.\r
\r
- @see getCurrentModifiersRealtime\r
- */\r
- static ModifierKeys getCurrentModifiers() noexcept;\r
+ This method is here for backwards compatibility and there's no need to call it anymore,\r
+ you should use the public currentModifiers member directly.\r
+ */\r
+ static ModifierKeys getCurrentModifiers() noexcept { return currentModifiers; }\r
\r
/** Creates a ModifierKeys object to represent the current state of the\r
keyboard and mouse buttons.\r
\r
- This isn't often needed and isn't recommended, but will actively check all the\r
- mouse and key states rather than just returning their last-known state like\r
- getCurrentModifiers() does.\r
-\r
- This is only needed in special circumstances for up-to-date modifier information\r
- at times when the app's event loop isn't running normally.\r
-\r
- Another reason to avoid this method is that it's not stateless, and calling it may\r
- update the value returned by getCurrentModifiers(), which could cause subtle changes\r
- in the behaviour of some components.\r
+ This method is here for backwards compatibility and you should call ComponentPeer::getCurrentModifiersRealtime()\r
+ instead (which is what this method now does).\r
*/\r
static ModifierKeys getCurrentModifiersRealtime() noexcept;\r
\r
-\r
private:\r
- //==============================================================================\r
int flags;\r
-\r
- friend class ComponentPeer;\r
- friend class MouseInputSource;\r
- friend class MouseInputSourceInternal;\r
-\r
- static ModifierKeys currentModifiers;\r
- static void updateCurrentModifiers() noexcept;\r
};\r
\r
} // namespace juce\r
};\r
\r
WeakReference<Component> component;\r
- ScopedPointer<Component> proxy;\r
+ std::unique_ptr<Component> proxy;\r
\r
Rectangle<int> destination;\r
double destAlpha;\r
private:\r
//==============================================================================\r
OwnedArray<TypeHandler> types;\r
- ScopedPointer<Component> component;\r
+ std::unique_ptr<Component> component;\r
ImageProvider* imageProvider;\r
#if JUCE_DEBUG\r
WeakReference<Component> componentRef;\r
friend struct ContainerDeletePolicy<PanelSizes>;\r
friend struct ContainerDeletePolicy<PanelHolder>;\r
\r
- ScopedPointer<PanelSizes> currentSizes;\r
+ std::unique_ptr<PanelSizes> currentSizes;\r
OwnedArray<PanelHolder> holders;\r
ComponentAnimator animator;\r
int headerHeight;\r
strings.add (juce::StringArray::fromTokens (areaString, false));\r
\r
if (strings.size() > 0)\r
+ {\r
for (auto s : strings)\r
+ {\r
jassert (s.size() == strings[0].size()); // all rows must have the same number of columns\r
+ }\r
+ }\r
\r
return strings;\r
}\r
{\r
if (dw->getContentComponent() == component)\r
{\r
- ScopedPointer<MultiDocumentPanelWindow> (dw)->clearContentComponent();\r
+ std::unique_ptr<MultiDocumentPanelWindow> (dw)->clearContentComponent();\r
break;\r
}\r
}\r
{\r
for (int i = getNumChildComponents(); --i >= 0;)\r
{\r
- ScopedPointer<MultiDocumentPanelWindow> dw (dynamic_cast<MultiDocumentPanelWindow*> (getChildComponent (i)));\r
+ std::unique_ptr<MultiDocumentPanelWindow> dw (dynamic_cast<MultiDocumentPanelWindow*> (getChildComponent (i)));\r
\r
if (dw != nullptr)\r
dw->clearContentComponent();\r
{\r
for (int i = getNumChildComponents(); --i >= 0;)\r
{\r
- ScopedPointer<MultiDocumentPanelWindow> dw (dynamic_cast<MultiDocumentPanelWindow*> (getChildComponent (i)));\r
+ std::unique_ptr<MultiDocumentPanelWindow> dw (dynamic_cast<MultiDocumentPanelWindow*> (getChildComponent (i)));\r
\r
if (dw != nullptr)\r
{\r
//==============================================================================\r
LayoutMode mode = MaximisedWindowsWithTabs;\r
Array<Component*> components;\r
- ScopedPointer<TabbedComponent> tabComponent;\r
+ std::unique_ptr<TabbedComponent> tabComponent;\r
Colour backgroundColour { Colours::lightblue };\r
int maximumNumDocuments = 0, numDocsBeforeTabsUsed = 0;\r
\r
bool vertical, isDraggingThumb = false, autohides = true, userVisibilityFlag = false;\r
class ScrollbarButton;\r
friend struct ContainerDeletePolicy<ScrollbarButton>;\r
- ScopedPointer<ScrollbarButton> upButton, downButton;\r
+ std::unique_ptr<ScrollbarButton> upButton, downButton;\r
ListenerList<Listener> listeners;\r
\r
void handleAsyncUpdate() override;\r
TabbedButtonBar& owner;\r
int overlapPixels = 0;\r
\r
- ScopedPointer<Component> extraComponent;\r
+ std::unique_ptr<Component> extraComponent;\r
ExtraComponentPlacement extraCompPlacement = afterText;\r
\r
private:\r
private:\r
struct TabInfo\r
{\r
- ScopedPointer<TabBarButton> button;\r
+ std::unique_ptr<TabBarButton> button;\r
String name;\r
Colour colour;\r
};\r
class BehindFrontTabComp;\r
friend class BehindFrontTabComp;\r
friend struct ContainerDeletePolicy<BehindFrontTabComp>;\r
- ScopedPointer<BehindFrontTabComp> behindFrontTab;\r
- ScopedPointer<Button> extraTabsButton;\r
+ std::unique_ptr<BehindFrontTabComp> behindFrontTab;\r
+ std::unique_ptr<Button> extraTabsButton;\r
\r
void showExtraItemsMenu();\r
static void extraItemsMenuCallback (int, TabbedButtonBar*);\r
virtual TabBarButton* createTabButton (const String& tabName, int tabIndex);\r
\r
/** @internal */\r
- ScopedPointer<TabbedButtonBar> tabs;\r
+ std::unique_ptr<TabbedButtonBar> tabs;\r
\r
private:\r
//==============================================================================\r
{\r
// This sets the content comp to a null pointer before deleting the old one, in case\r
// anything tries to use the old one while it's in mid-deletion..\r
- ScopedPointer<Component> oldCompDeleter (contentComp);\r
+ std::unique_ptr<Component> oldCompDeleter (contentComp);\r
contentComp = nullptr;\r
}\r
else\r
~DragToScrollListener()\r
{\r
viewport.contentHolder.removeMouseListener (this);\r
+ Desktop::getInstance().removeGlobalMouseListener (this);\r
}\r
\r
void positionChanged (ViewportDragPosition&, double) override\r
\r
void mouseDown (const MouseEvent&) override\r
{\r
- offsetX.setPosition (offsetX.getPosition());\r
- offsetY.setPosition (offsetY.getPosition());\r
- ++numTouches;\r
+ if (! isGlobalMouseListener)\r
+ {\r
+ offsetX.setPosition (offsetX.getPosition());\r
+ offsetY.setPosition (offsetY.getPosition());\r
+\r
+ // switch to a global mouse listener so we still receive mouseUp events\r
+ // if the original event component is deleted\r
+ viewport.contentHolder.removeMouseListener (this);\r
+ Desktop::getInstance().addGlobalMouseListener (this);\r
+\r
+ isGlobalMouseListener = true;\r
+ }\r
}\r
\r
void mouseDrag (const MouseEvent& e) override\r
{\r
- if (numTouches == 1 && ! doesMouseEventComponentBlockViewportDrag (e.eventComponent))\r
+ if (Desktop::getInstance().getNumDraggingMouseSources() == 1 && ! doesMouseEventComponentBlockViewportDrag (e.eventComponent))\r
{\r
auto totalOffset = e.getOffsetFromDragStart().toFloat();\r
\r
\r
void mouseUp (const MouseEvent&) override\r
{\r
- if (--numTouches <= 0)\r
- {\r
- offsetX.endDrag();\r
- offsetY.endDrag();\r
- isDragging = false;\r
- numTouches = 0;\r
- }\r
+ if (isGlobalMouseListener && Desktop::getInstance().getNumDraggingMouseSources() == 0)\r
+ endDragAndClearGlobalMouseListener();\r
+ }\r
+\r
+ void endDragAndClearGlobalMouseListener()\r
+ {\r
+ offsetX.endDrag();\r
+ offsetY.endDrag();\r
+ isDragging = false;\r
+\r
+ viewport.contentHolder.addMouseListener (this, true);\r
+ Desktop::getInstance().removeGlobalMouseListener (this);\r
+\r
+ isGlobalMouseListener = false;\r
}\r
\r
bool doesMouseEventComponentBlockViewportDrag (const Component* eventComp)\r
Viewport& viewport;\r
ViewportDragPosition offsetX, offsetY;\r
Point<int> originalViewPos;\r
- int numTouches = 0;\r
bool isDragging = false;\r
+ bool isGlobalMouseListener = false;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DragToScrollListener)\r
};\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<ScrollBar> verticalScrollBar, horizontalScrollBar;\r
+ std::unique_ptr<ScrollBar> verticalScrollBar, horizontalScrollBar;\r
Component contentHolder;\r
WeakReference<Component> contentComp;\r
Rectangle<int> lastVisibleArea;\r
struct DragToScrollListener;\r
friend struct DragToScrollListener;\r
friend struct ContainerDeletePolicy<DragToScrollListener>;\r
- ScopedPointer<DragToScrollListener> dragToScrollListener;\r
+ std::unique_ptr<DragToScrollListener> dragToScrollListener;\r
\r
Point<int> viewportPosToCompPos (Point<int>) const;\r
\r
//==============================================================================\r
static Drawable* createDrawableFromSVG (const char* data)\r
{\r
- ScopedPointer<XmlElement> xml (XmlDocument::parse (data));\r
+ std::unique_ptr<XmlElement> xml (XmlDocument::parse (data));\r
jassert (xml != nullptr);\r
return Drawable::createFromSVG (*xml);\r
}\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<Drawable> folderImage, documentImage;\r
+ std::unique_ptr<Drawable> folderImage, documentImage;\r
\r
void drawShinyButtonShape (Graphics&,\r
float x, float y, float w, float h, float maxCornerSize,\r
bool dismissOnMouseUp, hideOnExit = false, disableMouseMoves = false, hasAnyJuceCompHadFocus = false;\r
int numColumns = 0, contentHeight = 0, childYOffset = 0;\r
Component::SafePointer<ItemComponent> currentChild;\r
- ScopedPointer<MenuWindow> activeSubMenu;\r
+ std::unique_ptr<MenuWindow> activeSubMenu;\r
Array<int> columnWidths;\r
uint32 windowCreationTime, lastFocusedTime, timeEnteredCurrentChildComp;\r
OwnedArray<MouseSourceState> mouseSourceStates;\r
const bool wasDown, const bool overScrollArea, const bool isOverAny)\r
{\r
isDown = window.hasBeenOver\r
- && (ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown()\r
- || ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown());\r
+ && (ModifierKeys::currentModifiers.isAnyMouseButtonDown()\r
+ || ComponentPeer::getCurrentModifiersRealtime().isAnyMouseButtonDown());\r
\r
if (! window.doesAnyJuceCompHaveFocus())\r
{\r
return items.isEmpty() ? nullptr\r
: new HelperClasses::MenuWindow (*this, nullptr, options,\r
! options.getTargetScreenArea().isEmpty(),\r
- ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown(),\r
+ ModifierKeys::currentModifiers.isAnyMouseButtonDown(),\r
managerOfChosenCommand);\r
}\r
\r
}\r
\r
ApplicationCommandManager* managerOfChosenCommand = nullptr;\r
- ScopedPointer<Component> component;\r
+ std::unique_ptr<Component> component;\r
WeakReference<Component> prevFocused, prevTopLevel;\r
\r
JUCE_DECLARE_NON_COPYABLE (PopupMenuCompletionCallback)\r
int PopupMenu::showWithOptionalCallback (const Options& options, ModalComponentManager::Callback* const userCallback,\r
const bool canBeModal)\r
{\r
- ScopedPointer<ModalComponentManager::Callback> userCallbackDeleter (userCallback);\r
- ScopedPointer<PopupMenuCompletionCallback> callback (new PopupMenuCompletionCallback());\r
+ std::unique_ptr<ModalComponentManager::Callback> userCallbackDeleter (userCallback);\r
+ std::unique_ptr<PopupMenuCompletionCallback> callback (new PopupMenuCompletionCallback());\r
\r
if (auto* window = createWindow (options, &(callback->managerOfChosenCommand)))\r
{\r
int itemID = 0;\r
\r
/** A sub-menu, or nullptr if there isn't one. */\r
- ScopedPointer<PopupMenu> subMenu;\r
+ std::unique_ptr<PopupMenu> subMenu;\r
\r
/** A drawable to use as an icon, or nullptr if there isn't one. */\r
- ScopedPointer<Drawable> image;\r
+ std::unique_ptr<Drawable> image;\r
\r
/** A custom component for the item to display, or nullptr if there isn't one. */\r
ReferenceCountedObjectPtr<CustomComponent> customComponent;\r
void sendReport (String, String&, StringPairArray&);\r
void changeListenerCallback (ChangeBroadcaster*) override;\r
\r
- ScopedPointer<ReportingThread> reportingThread;\r
+ std::unique_ptr<ReportingThread> reportingThread;\r
\r
JUCE_DECLARE_SINGLETON_SINGLETHREADED_MINIMAL (ReportingThreadContainer)\r
};\r
ReportingThreadContainer& threadContainer;\r
URL url;\r
String headers;\r
- ScopedPointer<WebInputStream> webStream;\r
+ std::unique_ptr<WebInputStream> webStream;\r
};\r
\r
//==============================================================================\r
{\r
}\r
\r
-Drawable* JUCESplashScreen::getSplashScreenLogo()\r
+std::unique_ptr<Drawable> JUCESplashScreen::getSplashScreenLogo()\r
{\r
const char* svgData = R"JUCESPLASHSCREEN(\r
<?xml version="1.0" encoding="UTF-8"?>\r
</svg>\r
)JUCESPLASHSCREEN";\r
\r
- ScopedPointer<XmlElement> svgXml (XmlDocument::parse (svgData));\r
- return Drawable::createFromSVG (*svgXml);\r
+ std::unique_ptr<XmlElement> svgXml (XmlDocument::parse (svgData));\r
+ return std::unique_ptr<Drawable> (Drawable::createFromSVG (*svgXml));\r
}\r
\r
void JUCESplashScreen::paint (Graphics& g)\r
JUCESplashScreen (Component& parentToAddTo);\r
~JUCESplashScreen();\r
\r
- static Drawable* getSplashScreenLogo();\r
+ static std::unique_ptr<Drawable> getSplashScreenLogo();\r
\r
private:\r
void paint (Graphics&) override;\r
bool hitTest (int, int) override;\r
void mouseUp (const MouseEvent&) override;\r
\r
- ScopedPointer<Drawable> content;\r
+ std::unique_ptr<Drawable> content;\r
CriticalSection appUsageReporting;\r
ComponentAnimator fader;\r
bool hasStartedFading = false;\r
{\r
hasCheckedForExternalDrag = true;\r
\r
- if (ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown())\r
+ if (ComponentPeer::getCurrentModifiersRealtime().isAnyMouseButtonDown())\r
{\r
StringArray files;\r
auto canMoveFiles = false;\r
\r
ModifierKeys getCurrentModifiers() const noexcept\r
{\r
- return ModifierKeys::getCurrentModifiers().withoutMouseButtons().withFlags (buttonState.getRawFlags());\r
+ return ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (buttonState.getRawFlags());\r
}\r
\r
ComponentPeer* getPeer() noexcept\r
\r
void setPeer (ComponentPeer& newPeer, Point<float> screenPos, Time time)\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
-\r
if (&newPeer != lastPeer)\r
{\r
setComponentUnderMouse (nullptr, screenPos, time);\r
{\r
// NB: when doing auto-repeat, we need to force an update of the current position and button state,\r
// because on some OSes the queue can get overloaded with messages so that mouse-events don't get through..\r
- if (s->isDragging() && ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown())\r
+ if (s->isDragging() && ComponentPeer::getCurrentModifiersRealtime().isAnyMouseButtonDown())\r
{\r
s->lastScreenPos = s->getRawScreenPosition();\r
s->triggerFakeMove();\r
owner.sharingFinished (false, {});\r
}\r
\r
- prepareFilesThread = new AndroidContentSharerPrepareFilesThread (*this, files, packageName, uriBase);\r
+ prepareFilesThread.reset (new AndroidContentSharerPrepareFilesThread (*this, files, packageName, uriBase));\r
}\r
\r
void shareText (const String& text) override\r
{\r
ignoreUnused (selection, selectionArgs, sortOrder);\r
\r
- StringArray requestedColumns = javaStringArrayToJuceStringArray (projection);\r
+ StringArray requestedColumns = javaStringArrayToJuce (projection);\r
StringArray supportedColumns = getSupportedColumns();\r
\r
StringArray resultColumns;\r
if (resultColumns.isEmpty())\r
return nullptr;\r
\r
- auto resultJavaColumns = juceStringArrayToJavaStringArray (resultColumns);\r
+ auto resultJavaColumns = juceStringArrayToJava (resultColumns);\r
\r
auto* env = getEnv();\r
\r
if (extension.isEmpty())\r
return nullptr;\r
\r
- return juceStringArrayToJavaStringArray (filterMimeTypes (getMimeTypesForFileExtension (extension),\r
+ return juceStringArrayToJava (filterMimeTypes (getMimeTypesForFileExtension (extension),\r
juceString (mimeTypeFilter.get())));\r
}\r
\r
return { index, filename, prepareFilesThread->getFilePaths()[index.getIntValue()] };\r
}\r
\r
- static LocalRef<jobjectArray> juceStringArrayToJavaStringArray (const StringArray& juceArray)\r
- {\r
- auto* env = getEnv();\r
-\r
- auto javaArray = LocalRef<jobjectArray> (env->NewObjectArray ((jsize) juceArray.size(),\r
- JavaString,\r
- javaString ("").get()));\r
-\r
- for (int i = 0; i < juceArray.size(); ++i)\r
- env->SetObjectArrayElement (javaArray, i, javaString (juceArray [i]).get());\r
-\r
- return javaArray;\r
- }\r
-\r
- static StringArray javaStringArrayToJuceStringArray (const LocalRef<jobjectArray>& javaArray)\r
- {\r
- if (javaArray.get() == 0)\r
- return {};\r
-\r
- auto* env = getEnv();\r
-\r
- const int size = env->GetArrayLength (javaArray.get());\r
-\r
- StringArray juceArray;\r
-\r
- for (int i = 0; i < size; ++i)\r
- {\r
- auto javaString = LocalRef<jstring> ((jstring) env->GetObjectArrayElement (javaArray.get(), i));\r
- juceArray.add (juceString (javaString.get()));\r
- }\r
-\r
- return juceArray;\r
- }\r
-\r
static StringArray getSupportedColumns()\r
{\r
return StringArray ("_display_name", "_size");\r
String packageName;\r
String uriBase;\r
\r
- ScopedPointer<AndroidContentSharerPrepareFilesThread> prepareFilesThread;\r
+ std::unique_ptr<AndroidContentSharerPrepareFilesThread> prepareFilesThread;\r
\r
bool succeeded = false;\r
String errorDescription;\r
lastMousePos = localToGlobal (pos);\r
\r
// this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before.\r
- handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, currentModifiers.withoutMouseButtons(),\r
+ handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons(),\r
MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, time, {}, index);\r
\r
if (isValidPeer (this))\r
\r
jassert (index < 64);\r
touchesDown = (touchesDown | (1 << (index & 63)));\r
- currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
- handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier),\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+ handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier),\r
MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, time, {}, index);\r
}\r
\r
touchesDown = (touchesDown & ~(1 << (index & 63)));\r
\r
if (touchesDown == 0)\r
- currentModifiers = currentModifiers.withoutMouseButtons();\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
\r
- handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, currentModifiers.withoutMouseButtons(), MouseInputSource::invalidPressure,\r
+ handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons(), MouseInputSource::invalidPressure,\r
MouseInputSource::invalidOrientation, time, {}, index);\r
}\r
\r
Component::unfocusAllComponents();\r
}\r
\r
+ void handleAppPausedCallback() {}\r
+\r
void handleAppResumedCallback()\r
{\r
if (Component* kiosk = Desktop::getInstance().getKioskModeComponent())\r
void handlePaintCallback (JNIEnv* env, jobject canvas, jobject paint)\r
{\r
jobject rect = env->CallObjectMethod (canvas, CanvasMinimal.getClipBounds);\r
- const int left = env->GetIntField (rect, AndroidRectClass.left);\r
- const int top = env->GetIntField (rect, AndroidRectClass.top);\r
- const int right = env->GetIntField (rect, AndroidRectClass.right);\r
- const int bottom = env->GetIntField (rect, AndroidRectClass.bottom);\r
+ const int left = env->GetIntField (rect, AndroidRect.left);\r
+ const int top = env->GetIntField (rect, AndroidRect.top);\r
+ const int right = env->GetIntField (rect, AndroidRect.right);\r
+ const int bottom = env->GetIntField (rect, AndroidRect.bottom);\r
env->DeleteLocalRef (rect);\r
\r
const Rectangle<int> clip (left, top, right - left, bottom - top);\r
}\r
\r
//==============================================================================\r
- static ModifierKeys currentModifiers;\r
static Point<float> lastMousePos;\r
static int64 touchesDown;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AndroidComponentPeer)\r
};\r
\r
-ModifierKeys AndroidComponentPeer::currentModifiers = 0;\r
Point<float> AndroidComponentPeer::lastMousePos;\r
int64 AndroidComponentPeer::touchesDown = 0;\r
AndroidComponentPeer* AndroidComponentPeer::frontWindow = nullptr;\r
JUCE_VIEW_CALLBACK (void, handleKeyUp, (JNIEnv* env, jobject /*view*/, jlong host, jint k, jint kc), handleKeyUpCallback ((int) k, (int) kc))\r
JUCE_VIEW_CALLBACK (void, handleBackButton, (JNIEnv* env, jobject /*view*/, jlong host), handleBackButtonCallback())\r
JUCE_VIEW_CALLBACK (void, handleKeyboardHidden, (JNIEnv* env, jobject /*view*/, jlong host), handleKeyboardHiddenCallback())\r
+JUCE_VIEW_CALLBACK (void, handleAppPaused, (JNIEnv* env, jobject /*view*/, jlong host), handleAppPausedCallback())\r
JUCE_VIEW_CALLBACK (void, handleAppResumed, (JNIEnv* env, jobject /*view*/, jlong host), handleAppResumedCallback())\r
\r
//==============================================================================\r
}\r
\r
//==============================================================================\r
-#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
- METHOD (getRotation, "getRotation", "()I")\r
-\r
-DECLARE_JNI_CLASS (Display, "android/view/Display");\r
-#undef JNI_CLASS_MEMBERS\r
-\r
-#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
- METHOD (getDefaultDisplay, "getDefaultDisplay", "()Landroid/view/Display;")\r
-\r
-DECLARE_JNI_CLASS (WindowManager, "android/view/WindowManager");\r
-#undef JNI_CLASS_MEMBERS\r
-\r
bool Desktop::canUseSemiTransparentWindows() noexcept\r
{\r
return true;\r
\r
if (windowManager.get() != 0)\r
{\r
- LocalRef<jobject> display = LocalRef<jobject> (env->CallObjectMethod (windowManager, WindowManager.getDefaultDisplay));\r
+ LocalRef<jobject> display = LocalRef<jobject> (env->CallObjectMethod (windowManager, AndroidWindowManager.getDefaultDisplay));\r
\r
if (display.get() != 0)\r
{\r
- int rotation = env->CallIntMethod (display, Display.getRotation);\r
+ int rotation = env->CallIntMethod (display, AndroidDisplay.getRotation);\r
\r
switch (rotation)\r
{\r
return false;\r
}\r
\r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
- currentModifiers = AndroidComponentPeer::currentModifiers;\r
-}\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
- return AndroidComponentPeer::currentModifiers;\r
-}\r
-\r
JUCE_API void JUCE_CALLTYPE Process::hide()\r
{\r
if (android.activity.callBooleanMethod (JuceAppActivity.moveTaskToBack, true) == 0)\r
namespace juce\r
{\r
\r
-template <> struct ContainerDeletePolicy<UIActivityViewController> { static void destroy (NSObject* o) { [o release]; } };\r
-template <> struct ContainerDeletePolicy<NSObject<UIPopoverPresentationControllerDelegate>> { static void destroy (NSObject* o) { [o release]; } };\r
-\r
-//==============================================================================\r
class ContentSharer::ContentSharerNativeImpl : public ContentSharer::Pimpl,\r
private Component\r
{\r
: owner (cs)\r
{\r
static PopoverDelegateClass cls;\r
- popoverDelegate = [cls.createInstance() init];\r
+ popoverDelegate.reset ([cls.createInstance() init]);\r
}\r
\r
~ContentSharerNativeImpl()\r
return;\r
}\r
\r
- controller = [[UIActivityViewController alloc] initWithActivityItems: items\r
- applicationActivities: nil];\r
+ controller.reset ([[UIActivityViewController alloc] initWithActivityItems: items\r
+ applicationActivities: nil]);\r
\r
controller.get().excludedActivityTypes = nil;\r
\r
}\r
\r
if (auto* parentController = peer->controller)\r
- [parentController showViewController: controller sender: parentController];\r
+ [parentController showViewController: controller.get() sender: parentController];\r
\r
if (peer->view.window != nil)\r
peer->view.window.autoresizesSubviews = YES;\r
\r
ContentSharer& owner;\r
UIViewComponentPeer* peer = nullptr;\r
- ScopedPointer<UIActivityViewController> controller;\r
- ScopedPointer<NSObject<UIPopoverPresentationControllerDelegate>> popoverDelegate;\r
+ std::unique_ptr<UIActivityViewController, NSObjectDeleter> controller;\r
+ std::unique_ptr<NSObject<UIPopoverPresentationControllerDelegate>, NSObjectDeleter> popoverDelegate;\r
\r
bool succeeded = false;\r
String errorDescription;\r
namespace juce\r
{\r
\r
-//==============================================================================\r
-template <> struct ContainerDeletePolicy<UIDocumentPickerViewController> { static void destroy (NSObject* o) { [o release]; } };\r
-template <> struct ContainerDeletePolicy<NSObject<UIDocumentPickerDelegate>> { static void destroy (NSObject* o) { [o release]; } };\r
-\r
class FileChooser::Native : private Component,\r
public FileChooser::Pimpl\r
{\r
String firstFileExtension;\r
\r
static FileChooserDelegateClass cls;\r
- delegate = [cls.createInstance() init];\r
- FileChooserDelegateClass::setOwner (delegate, this);\r
+ delegate.reset ([cls.createInstance() init]);\r
+ FileChooserDelegateClass::setOwner (delegate.get(), this);\r
\r
auto utTypeArray = createNSArrayFromStringArray (getUTTypesForWildcards (owner.filters, firstFileExtension));\r
\r
}\r
\r
auto url = [[NSURL alloc] initFileURLWithPath: juceStringToNS (currentFileOrDirectory.getFullPathName())];\r
- controller = [[UIDocumentPickerViewController alloc] initWithURL: url\r
- inMode: pickerMode];\r
+ controller.reset ([[UIDocumentPickerViewController alloc] initWithURL: url\r
+ inMode: pickerMode]);\r
[url release];\r
}\r
else\r
{\r
- controller = [[UIDocumentPickerViewController alloc] initWithDocumentTypes: utTypeArray\r
- inMode: UIDocumentPickerModeOpen];\r
+ controller.reset ([[UIDocumentPickerViewController alloc] initWithDocumentTypes: utTypeArray\r
+ inMode: UIDocumentPickerModeOpen]);\r
}\r
\r
- [controller setDelegate: delegate];\r
- [controller setModalTransitionStyle: UIModalTransitionStyleCrossDissolve];\r
+ [controller.get() setDelegate: delegate.get()];\r
+ [controller.get() setModalTransitionStyle: UIModalTransitionStyleCrossDissolve];\r
\r
setOpaque (false);\r
\r
peer = newPeer;\r
\r
if (auto* parentController = peer->controller)\r
- [parentController showViewController: controller sender: parentController];\r
+ [parentController showViewController: controller.get() sender: parentController];\r
\r
if (peer->view.window != nil)\r
peer->view.window.autoresizesSubviews = YES;\r
\r
//==============================================================================\r
FileChooser& owner;\r
- ScopedPointer<NSObject<UIDocumentPickerDelegate>> delegate;\r
- ScopedPointer<UIDocumentPickerViewController> controller;\r
+ std::unique_ptr<NSObject<UIDocumentPickerDelegate>, NSObjectDeleter> delegate;\r
+ std::unique_ptr<UIDocumentPickerViewController, NSObjectDeleter> controller;\r
UIViewComponentPeer* peer = nullptr;\r
\r
static FileChooserDelegateClass fileChooserDelegateClass;\r
JuceUIView* view;\r
JuceUIViewController* controller;\r
bool isSharedWindow, fullScreen, insideDrawRect, isAppex;\r
- static ModifierKeys currentModifiers;\r
\r
static int64 getMouseTime (UIEvent* e) noexcept\r
{\r
return false;\r
}\r
\r
-ModifierKeys UIViewComponentPeer::currentModifiers;\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
- return UIViewComponentPeer::currentModifiers;\r
-}\r
-\r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
- currentModifiers = UIViewComponentPeer::currentModifiers;\r
-}\r
-\r
Point<float> juce_lastMousePos;\r
\r
//==============================================================================\r
const int64 time = getMouseTime (event);\r
const int touchIndex = currentTouches.getIndexOfTouch (this, touch);\r
\r
- ModifierKeys modsToSend (currentModifiers);\r
+ ModifierKeys modsToSend (ModifierKeys::currentModifiers);\r
\r
if (isDown)\r
{\r
if ([touch phase] != UITouchPhaseBegan)\r
continue;\r
\r
- currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
- modsToSend = currentModifiers;\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+ modsToSend = ModifierKeys::currentModifiers;\r
\r
// this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before.\r
handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend.withoutMouseButtons(),\r
if (isCancel)\r
{\r
currentTouches.clearTouch (touchIndex);\r
- modsToSend = currentModifiers = currentModifiers.withoutMouseButtons();\r
+ modsToSend = ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
}\r
\r
// NB: some devices return 0 or 1.0 if pressure is unknown, so we'll clip our value to a believable range:\r
}\r
}];\r
\r
- MessageManager::callAsync ([self,application,app] { app->suspended(); });\r
+ MessageManager::callAsync ([app] { app->suspended(); });\r
#else\r
ignoreUnused (application);\r
app->suspended();\r
private:\r
int result;\r
bool resultReceived;\r
- ScopedPointer<ModalComponentManager::Callback> callback;\r
+ std::unique_ptr<ModalComponentManager::Callback> callback;\r
const bool isAsync;\r
\r
#if JUCE_USE_NEW_IOS_ALERTWINDOW\r
Component* /*associatedComponent*/,\r
ModalComponentManager::Callback* callback)\r
{\r
- ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"OK",\r
- nil, callback, callback != nullptr));\r
+ std::unique_ptr<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"OK",\r
+ nil, callback, callback != nullptr));\r
\r
if (callback == nullptr)\r
return mb->getResult() == 1;\r
Component* /*associatedComponent*/,\r
ModalComponentManager::Callback* callback)\r
{\r
- ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"Yes", @"No", callback, callback != nullptr));\r
+ std::unique_ptr<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"Yes", @"No", callback, callback != nullptr));\r
\r
if (callback == nullptr)\r
return mb->getResult();\r
Component* /*associatedComponent*/,\r
ModalComponentManager::Callback* callback)\r
{\r
- ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"No", @"Yes", nil, callback, callback != nullptr));\r
+ std::unique_ptr<iOSMessageBox> mb (new iOSMessageBox (title, message, @"No", @"Yes", nil, callback, callback != nullptr));\r
\r
if (callback == nullptr)\r
return mb->getResult();\r
{\r
XRandrWrapper& xrandr = XRandrWrapper::getInstance();\r
\r
- ScopedPointer<XRRScreenResources> screens;\r
+ std::unique_ptr<XRRScreenResources> screens;\r
\r
const int numMonitors = ScreenCount (display);\r
RROutput mainDisplay = xrandr.getOutputPrimary (display, RootWindow (display, 0));\r
\r
for (int i = 0; i < numMonitors; ++i)\r
{\r
- if ((screens = xrandr.getScreenResources (display, RootWindow (display, i))).get())\r
+ screens.reset (xrandr.getScreenResources (display, RootWindow (display, i)));\r
+\r
+ if (screens != nullptr)\r
{\r
for (int j = 0; j < screens->noutput; ++j)\r
{\r
if (! mainDisplay)\r
mainDisplay = screens->outputs[j];\r
\r
- ScopedPointer<XRROutputInfo> output;\r
+ std::unique_ptr<XRROutputInfo> output (xrandr.getOutputInfo (display, screens.get(), screens->outputs[j]));\r
\r
- if ((output = xrandr.getOutputInfo (display, screens.get(), screens->outputs[j])).get())\r
+ if (output != nullptr)\r
{\r
if (! output->crtc)\r
continue;\r
\r
- ScopedPointer<XRRCrtcInfo> crtc;\r
+ std::unique_ptr<XRRCrtcInfo> crtc (xrandr.getCrtcInfo (display, screens.get(), output->crtc));\r
\r
- if ((crtc = xrandr.getCrtcInfo (display, screens.get(), output->crtc)).get())\r
+ if (crtc != nullptr)\r
{\r
ExtendedInfo e;\r
e.totalBounds = Rectangle<int> (crtc->x, crtc->y,\r
\r
display = XWindowSystem::getInstance()->displayRef();\r
\r
- atoms = new Atoms (display);\r
- dragState = new DragState (display);\r
- repainter = new LinuxRepaintManager (*this, display);\r
+ atoms.reset (new Atoms (display));\r
+ dragState.reset (new DragState (display));\r
+ repainter.reset (new LinuxRepaintManager (*this, display));\r
\r
if (isAlwaysOnTop)\r
++numAlwaysOnTopPeers;\r
createWindow (parentToAddTo);\r
\r
setTitle (component.getName());\r
+\r
+ getNativeRealtimeModifiers = []\r
+ {\r
+ ScopedXDisplay xDisplay;\r
+\r
+ if (auto display = xDisplay.display)\r
+ {\r
+ Window root, child;\r
+ int x, y, winx, winy;\r
+ unsigned int mask;\r
+ int mouseMods = 0;\r
+\r
+ ScopedXLock xlock (display);\r
+\r
+ if (XQueryPointer (display, RootWindow (display, DefaultScreen (display)),\r
+ &root, &child, &x, &y, &winx, &winy, &mask) != False)\r
+ {\r
+ if ((mask & Button1Mask) != 0) mouseMods |= ModifierKeys::leftButtonModifier;\r
+ if ((mask & Button2Mask) != 0) mouseMods |= ModifierKeys::middleButtonModifier;\r
+ if ((mask & Button3Mask) != 0) mouseMods |= ModifierKeys::rightButtonModifier;\r
+ }\r
+\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
+ }\r
+\r
+ return ModifierKeys::currentModifiers;\r
+ };\r
}\r
\r
~LinuxComponentPeer()\r
\r
void handleKeyPressEvent (XKeyEvent& keyEvent)\r
{\r
- auto oldMods = currentModifiers;\r
+ auto oldMods = ModifierKeys::currentModifiers;\r
\r
char utf8 [64] = { 0 };\r
juce_wchar unicodeChar = 0;\r
keyCode = (int) unicodeChar;\r
\r
if (keyCode < 0x20)\r
- keyCode = (int) XkbKeycodeToKeysym (display, (::KeyCode) keyEvent.keycode, 0, currentModifiers.isShiftDown() ? 1 : 0);\r
+ keyCode = (int) XkbKeycodeToKeysym (display, (::KeyCode) keyEvent.keycode, 0, ModifierKeys::currentModifiers.isShiftDown() ? 1 : 0);\r
\r
keyDownChange = (sym != NoSymbol) && ! updateKeyModifiersFromSym (sym, true);\r
}\r
if (utf8[0] != 0 || ((sym & 0xff00) == 0 && sym >= 8))\r
keyPressed = true;\r
\r
- if (oldMods != currentModifiers)\r
+ if (oldMods != ModifierKeys::currentModifiers)\r
handleModifierKeysChange();\r
\r
if (keyDownChange)\r
sym = XkbKeycodeToKeysym (display, (::KeyCode) keyEvent.keycode, 0, 0);\r
}\r
\r
- auto oldMods = currentModifiers;\r
+ auto oldMods = ModifierKeys::currentModifiers;\r
const bool keyDownChange = (sym != NoSymbol) && ! updateKeyModifiersFromSym (sym, false);\r
\r
- if (oldMods != currentModifiers)\r
+ if (oldMods != ModifierKeys::currentModifiers)\r
handleModifierKeysChange();\r
\r
if (keyDownChange)\r
\r
void handleButtonPressEvent (const XButtonPressedEvent& buttonPressEvent, int buttonModifierFlag)\r
{\r
- currentModifiers = currentModifiers.withFlags (buttonModifierFlag);\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (buttonModifierFlag);\r
toFront (true);\r
- handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (buttonPressEvent), currentModifiers,\r
+ handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (buttonPressEvent), ModifierKeys::currentModifiers,\r
MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (buttonPressEvent), {});\r
}\r
\r
{\r
switch (pointerMap[mapIndex])\r
{\r
- case Keys::LeftButton: currentModifiers = currentModifiers.withoutFlags (ModifierKeys::leftButtonModifier); break;\r
- case Keys::RightButton: currentModifiers = currentModifiers.withoutFlags (ModifierKeys::rightButtonModifier); break;\r
- case Keys::MiddleButton: currentModifiers = currentModifiers.withoutFlags (ModifierKeys::middleButtonModifier); break;\r
+ case Keys::LeftButton: ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutFlags (ModifierKeys::leftButtonModifier); break;\r
+ case Keys::RightButton: ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutFlags (ModifierKeys::rightButtonModifier); break;\r
+ case Keys::MiddleButton: ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutFlags (ModifierKeys::middleButtonModifier); break;\r
default: break;\r
}\r
}\r
if (dragState->dragging)\r
handleExternalDragButtonReleaseEvent();\r
\r
- handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (buttonRelEvent), currentModifiers,\r
+ handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (buttonRelEvent), ModifierKeys::currentModifiers,\r
MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (buttonRelEvent));\r
\r
clearLastMousePos();\r
if (dragState->dragging)\r
handleExternalDragMotionNotify();\r
\r
- handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (movedEvent), currentModifiers,\r
+ handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (movedEvent), ModifierKeys::currentModifiers,\r
MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (movedEvent));\r
}\r
\r
\r
clearLastMousePos();\r
\r
- if (! currentModifiers.isAnyMouseButtonDown())\r
+ if (! ModifierKeys::currentModifiers.isAnyMouseButtonDown())\r
{\r
updateKeyModifiers ((int) enterEvent.state);\r
- handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (enterEvent), currentModifiers,\r
+ handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (enterEvent), ModifierKeys::currentModifiers,\r
MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (enterEvent));\r
}\r
}\r
// Suppress the normal leave if we've got a pointer grab, or if\r
// it's a bogus one caused by clicking a mouse button when running\r
// in a Window manager\r
- if (((! currentModifiers.isAnyMouseButtonDown()) && leaveEvent.mode == NotifyNormal)\r
+ if (((! ModifierKeys::currentModifiers.isAnyMouseButtonDown()) && leaveEvent.mode == NotifyNormal)\r
|| leaveEvent.mode == NotifyUngrab)\r
{\r
updateKeyModifiers ((int) leaveEvent.state);\r
- handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (leaveEvent), currentModifiers,\r
+ handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (leaveEvent), ModifierKeys::currentModifiers,\r
MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (leaveEvent));\r
}\r
}\r
\r
//==============================================================================\r
bool dontRepaint;\r
-\r
- static ModifierKeys currentModifiers;\r
static bool isActiveApplication;\r
\r
private:\r
image.clear (i - totalArea.getPosition());\r
\r
{\r
- ScopedPointer<LowLevelGraphicsContext> context (peer.getComponent().getLookAndFeel()\r
- .createGraphicsContext (image, -totalArea.getPosition(), adjustedList));\r
+ std::unique_ptr<LowLevelGraphicsContext> context (peer.getComponent().getLookAndFeel()\r
+ .createGraphicsContext (image, -totalArea.getPosition(), adjustedList));\r
context->addTransform (AffineTransform::scale ((float) peer.currentScaleFactor));\r
peer.handlePaint (*context);\r
}\r
JUCE_DECLARE_NON_COPYABLE (LinuxRepaintManager)\r
};\r
\r
- ScopedPointer<Atoms> atoms;\r
- ScopedPointer<LinuxRepaintManager> repainter;\r
+ std::unique_ptr<Atoms> atoms;\r
+ std::unique_ptr<LinuxRepaintManager> repainter;\r
\r
friend class LinuxRepaintManager;\r
Window windowH = {}, parentWindow = {}, keyProxy = {};\r
if ((status & ControlMask) != 0) keyMods |= ModifierKeys::ctrlModifier;\r
if ((status & Keys::AltMask) != 0) keyMods |= ModifierKeys::altModifier;\r
\r
- currentModifiers = currentModifiers.withOnlyMouseButtons().withFlags (keyMods);\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withOnlyMouseButtons().withFlags (keyMods);\r
\r
Keys::numLock = ((status & Keys::NumLockMask) != 0);\r
Keys::capsLock = ((status & LockMask) != 0);\r
break;\r
}\r
\r
- currentModifiers = press ? currentModifiers.withFlags (modifier)\r
- : currentModifiers.withoutFlags (modifier);\r
+ ModifierKeys::currentModifiers = press ? ModifierKeys::currentModifiers.withFlags (modifier)\r
+ : ModifierKeys::currentModifiers.withoutFlags (modifier);\r
\r
return isModifier;\r
}\r
\r
void resetExternalDragState()\r
{\r
- dragState = new DragState (display);\r
+ dragState.reset (new DragState (display));\r
}\r
\r
void sendDragAndDropMessage (XClientMessageEvent& msg)\r
resetExternalDragState();\r
}\r
\r
- ScopedPointer<DragState> dragState;\r
+ std::unique_ptr<DragState> dragState;\r
DragInfo dragInfo;\r
Atom dragAndDropCurrentMimeType;\r
Window dragAndDropSourceWindow;\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LinuxComponentPeer)\r
};\r
\r
-ModifierKeys LinuxComponentPeer::currentModifiers;\r
bool LinuxComponentPeer::isActiveApplication = false;\r
Point<int> LinuxComponentPeer::lastMousePos;\r
::Display* LinuxComponentPeer::display = nullptr;\r
JUCE_API void JUCE_CALLTYPE Process::makeForegroundProcess() {}\r
JUCE_API void JUCE_CALLTYPE Process::hide() {}\r
\r
-//==============================================================================\r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
- currentModifiers = LinuxComponentPeer::currentModifiers;\r
-}\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
- ScopedXDisplay xDisplay;\r
-\r
- if (auto display = xDisplay.display)\r
- {\r
- Window root, child;\r
- int x, y, winx, winy;\r
- unsigned int mask;\r
- int mouseMods = 0;\r
-\r
- ScopedXLock xlock (display);\r
-\r
- if (XQueryPointer (display, RootWindow (display, DefaultScreen (display)),\r
- &root, &child, &x, &y, &winx, &winy, &mask) != False)\r
- {\r
- if ((mask & Button1Mask) != 0) mouseMods |= ModifierKeys::leftButtonModifier;\r
- if ((mask & Button2Mask) != 0) mouseMods |= ModifierKeys::middleButtonModifier;\r
- if ((mask & Button3Mask) != 0) mouseMods |= ModifierKeys::rightButtonModifier;\r
- }\r
-\r
- LinuxComponentPeer::currentModifiers = LinuxComponentPeer::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
- }\r
-\r
- return LinuxComponentPeer::currentModifiers;\r
-}\r
-\r
-\r
//==============================================================================\r
void Desktop::setKioskComponent (Component* comp, bool enableOrDisable, bool /* allowMenusAndBars */)\r
{\r
}\r
\r
//==============================================================================\r
-template <> struct ContainerDeletePolicy<NSSavePanel> { static void destroy (NSObject* o) { [o release]; } };\r
-\r
class FileChooser::Native : public Component,\r
public FileChooser::Pimpl\r
{\r
\r
void runModally() override\r
{\r
- ScopedPointer<TemporaryMainMenuWithStandardCommands> tempMenu;\r
+ std::unique_ptr<TemporaryMainMenuWithStandardCommands> tempMenu;\r
\r
if (JUCEApplicationBase::isStandaloneApp())\r
tempMenu.reset (new TemporaryMainMenuWithStandardCommands());\r
auto result = [panel runModal];\r
#else\r
auto result = [panel runModalForDirectory: juceStringToNS (startingDirectory)\r
- file: juceStringToNS (filename)];\r
+ file: juceStringToNS (filename)];\r
#endif\r
\r
finished (result);\r
static JuceMainMenuHandler* instance;\r
\r
MenuBarModel* currentModel = nullptr;\r
- ScopedPointer<PopupMenu> extraAppleMenuItems;\r
+ std::unique_ptr<PopupMenu> extraAppleMenuItems;\r
uint32 lastUpdateTime = 0;\r
NSObject* callback = nil;\r
String recentItemsMenuName;\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RecentFilesMenuItem)\r
};\r
\r
- ScopedPointer<RecentFilesMenuItem> recent;\r
+ std::unique_ptr<RecentFilesMenuItem> recent;\r
\r
//==============================================================================\r
static NSMenuItem* findMenuItemWithCommandID (NSMenu* const menu, int commandID)\r
\r
private:\r
MenuBarModel* const oldMenu;\r
- ScopedPointer<PopupMenu> oldAppleMenu;\r
+ std::unique_ptr<PopupMenu> oldAppleMenu;\r
String oldRecentItems;\r
NSInteger editMenuIndex;\r
\r
setAlpha (alpha);\r
\r
setTitle (component.getName());\r
+\r
+ getNativeRealtimeModifiers = []\r
+ {\r
+ #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6\r
+ if ([NSEvent respondsToSelector: @selector (modifierFlags)])\r
+ NSViewComponentPeer::updateModifiers ([NSEvent modifierFlags]);\r
+ #endif\r
+\r
+ return ModifierKeys::currentModifiers;\r
+ };\r
}\r
\r
~NSViewComponentPeer()\r
if (! Process::isForegroundProcess())\r
Process::makeForegroundProcess();\r
\r
- currentModifiers = currentModifiers.withFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
sendMouseEvent (ev);\r
}\r
\r
void redirectMouseUp (NSEvent* ev)\r
{\r
- currentModifiers = currentModifiers.withoutFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
sendMouseEvent (ev);\r
showArrowCursorIfNeeded();\r
}\r
\r
void redirectMouseDrag (NSEvent* ev)\r
{\r
- currentModifiers = currentModifiers.withFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (getModifierForButtonNumber ([ev buttonNumber]));\r
sendMouseEvent (ev);\r
}\r
\r
void redirectMouseMove (NSEvent* ev)\r
{\r
- currentModifiers = currentModifiers.withoutMouseButtons();\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
\r
NSPoint windowPos = [ev locationInWindow];\r
\r
sendMouseEvent (ev);\r
else\r
// moved into another window which overlaps this one, so trigger an exit\r
- handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, currentModifiers,\r
+ handleMouseEvent (MouseInputSource::InputSourceType::mouse, { -1.0f, -1.0f }, ModifierKeys::currentModifiers,\r
getMousePressure (ev), MouseInputSource::invalidOrientation, getMouseTime (ev));\r
\r
showArrowCursorIfNeeded();\r
void redirectMouseEnter (NSEvent* ev)\r
{\r
Desktop::getInstance().getMainMouseSource().forceMouseCursorUpdate();\r
- currentModifiers = currentModifiers.withoutMouseButtons();\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
sendMouseEvent (ev);\r
}\r
\r
void redirectMouseExit (NSEvent* ev)\r
{\r
- currentModifiers = currentModifiers.withoutMouseButtons();\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
sendMouseEvent (ev);\r
}\r
\r
void sendMouseEvent (NSEvent* ev)\r
{\r
updateModifiers (ev);\r
- handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (ev, view), currentModifiers,\r
+ handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (ev, view), ModifierKeys::currentModifiers,\r
getMousePressure (ev), MouseInputSource::invalidOrientation, getMouseTime (ev));\r
}\r
\r
if (intScale != 1)\r
clip.scaleAll (intScale);\r
\r
- ScopedPointer<LowLevelGraphicsContext> context (component.getLookAndFeel()\r
- .createGraphicsContext (temp, offset * intScale, clip));\r
+ std::unique_ptr<LowLevelGraphicsContext> context (component.getLookAndFeel()\r
+ .createGraphicsContext (temp, offset * intScale, clip));\r
\r
if (intScale != 1)\r
context->addTransform (AffineTransform::scale (displayScale));\r
if ((flags & NSEventModifierFlagOption) != 0) m |= ModifierKeys::altModifier;\r
if ((flags & NSEventModifierFlagCommand) != 0) m |= ModifierKeys::commandModifier;\r
\r
- currentModifiers = currentModifiers.withOnlyMouseButtons().withFlags (m);\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withOnlyMouseButtons().withFlags (m);\r
}\r
\r
static void updateKeysDown (NSEvent* ev, bool isKeyDown)\r
RectangleList<float> deferredRepaints;\r
uint32 lastRepaintTime;\r
\r
- static ModifierKeys currentModifiers;\r
static ComponentPeer* currentlyFocusedPeer;\r
static Array<int> keysCurrentlyDown;\r
static int insideToFrontCall;\r
\r
\r
//==============================================================================\r
-ModifierKeys NSViewComponentPeer::currentModifiers;\r
ComponentPeer* NSViewComponentPeer::currentlyFocusedPeer = nullptr;\r
Array<int> NSViewComponentPeer::keysCurrentlyDown;\r
\r
return false;\r
}\r
\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
- #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6\r
- if ([NSEvent respondsToSelector: @selector (modifierFlags)])\r
- NSViewComponentPeer::updateModifiers ((NSUInteger) [NSEvent modifierFlags]);\r
- #endif\r
-\r
- return NSViewComponentPeer::currentModifiers;\r
-}\r
-\r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
- currentModifiers = NSViewComponentPeer::currentModifiers;\r
-}\r
-\r
-\r
//==============================================================================\r
bool MouseInputSource::SourceList::addSource()\r
{\r
ModalComponentManager::Callback* callback, const char* b1, const char* b2, const char* b3,\r
bool runAsync)\r
{\r
- ScopedPointer<OSXMessageBox> mb (new OSXMessageBox (iconType, title, message, b1, b2, b3,\r
- callback, runAsync));\r
+ std::unique_ptr<OSXMessageBox> mb (new OSXMessageBox (iconType, title, message, b1, b2, b3,\r
+ callback, runAsync));\r
if (! runAsync)\r
return mb->getResult();\r
\r
private:\r
AlertWindow::AlertIconType iconType;\r
String title, message;\r
- ScopedPointer<ModalComponentManager::Callback> callback;\r
+ std::unique_ptr<ModalComponentManager::Callback> callback;\r
const char* button1;\r
const char* button2;\r
const char* button3;\r
IOPMAssertionID assertionID;\r
};\r
\r
- ScopedPointer<PMAssertion> assertion;\r
+ std::unique_ptr<PMAssertion> assertion;\r
#else\r
ScreenSaverDefeater()\r
{\r
#endif\r
};\r
\r
-static ScopedPointer<ScreenSaverDefeater> screenSaverDefeater;\r
+static std::unique_ptr<ScreenSaverDefeater> screenSaverDefeater;\r
\r
void Desktop::setScreenSaverEnabled (const bool isEnabled)\r
{\r
private Thread\r
{\r
public:\r
- typedef ReferenceCountedObjectPtr<Win32NativeFileChooser> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<Win32NativeFileChooser>;\r
\r
enum { charsAvailableForResult = 32768 };\r
\r
if (! selectsDirectories)\r
{\r
if (previewComp != nullptr)\r
- customComponent = new CustomComponentHolder (previewComp);\r
+ customComponent.reset (new CustomComponentHolder (previewComp));\r
\r
setupFilters();\r
}\r
//==============================================================================\r
Component::SafePointer<Component> owner;\r
String title, filtersString;\r
- ScopedPointer<CustomComponentHolder> customComponent;\r
+ std::unique_ptr<CustomComponentHolder> customComponent;\r
String initialPath, returnedString, defaultExtension;\r
\r
WaitableEvent threadHasReference;\r
\r
if (customComponent)\r
{\r
- Component::SafePointer<Component> custom (customComponent);\r
+ Component::SafePointer<Component> custom (customComponent.get());\r
\r
RECT r, cr;\r
GetWindowRect (hdlg, &r);\r
if ((windowStyleFlags & windowHasDropShadow) != 0\r
&& ((! hasTitleBar()) || SystemStats::getOperatingSystemType() < SystemStats::WinVista))\r
{\r
- shadower = component.getLookAndFeel().createDropShadowerForComponent (&component);\r
+ shadower.reset (component.getLookAndFeel().createDropShadowerForComponent (&component));\r
\r
if (shadower != nullptr)\r
shadower->setOwner (&component);\r
\r
// make sure that the on-screen keyboard code is loaded\r
OnScreenKeyboard::getInstance();\r
+\r
+ getNativeRealtimeModifiers = []\r
+ {\r
+ HWNDComponentPeer::updateKeyModifiers();\r
+\r
+ int mouseMods = 0;\r
+ if (HWNDComponentPeer::isKeyDown (VK_LBUTTON)) mouseMods |= ModifierKeys::leftButtonModifier;\r
+ if (HWNDComponentPeer::isKeyDown (VK_RBUTTON)) mouseMods |= ModifierKeys::rightButtonModifier;\r
+ if (HWNDComponentPeer::isKeyDown (VK_MBUTTON)) mouseMods |= ModifierKeys::middleButtonModifier;\r
+\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
+\r
+ return ModifierKeys::currentModifiers;\r
+ };\r
}\r
\r
~HWNDComponentPeer()\r
keyMods = (keyMods & ~ModifierKeys::ctrlModifier) | ModifierKeys::altModifier;\r
}\r
\r
- currentModifiers = currentModifiers.withOnlyMouseButtons().withFlags (keyMods);\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withOnlyMouseButtons().withFlags (keyMods);\r
}\r
\r
static void updateModifiersFromWParam (const WPARAM wParam)\r
if (wParam & MK_RBUTTON) mouseMods |= ModifierKeys::rightButtonModifier;\r
if (wParam & MK_MBUTTON) mouseMods |= ModifierKeys::middleButtonModifier;\r
\r
- currentModifiers = currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
updateKeyModifiers();\r
}\r
\r
//==============================================================================\r
bool dontRepaint;\r
-\r
- static ModifierKeys currentModifiers;\r
static ModifierKeys modifiersAtLastCallback;\r
\r
//==============================================================================\r
\r
private:\r
HWND hwnd, parentToAddTo;\r
- ScopedPointer<DropShadower> shadower;\r
+ std::unique_ptr<DropShadower> shadower;\r
RenderingEngineType currentRenderingEngine;\r
#if JUCE_DIRECT2D\r
- ScopedPointer<Direct2DLowLevelGraphicsContext> direct2DContext;\r
+ std::unique_ptr<Direct2DLowLevelGraphicsContext> direct2DContext;\r
#endif\r
uint32 lastPaintTime = 0;\r
ULONGLONG lastMagnifySize = 0;\r
offscreenImage.clear (i);\r
\r
{\r
- ScopedPointer<LowLevelGraphicsContext> context (component.getLookAndFeel()\r
+ std::unique_ptr<LowLevelGraphicsContext> context (component.getLookAndFeel()\r
.createGraphicsContext (offscreenImage, Point<int> (-x, -y), contextClip));\r
handlePaint (*context);\r
}\r
}\r
\r
//==============================================================================\r
- void doMouseEvent (Point<float> position, float pressure, float orientation = 0.0f, ModifierKeys mods = currentModifiers)\r
+ void doMouseEvent (Point<float> position, float pressure, float orientation = 0.0f, ModifierKeys mods = ModifierKeys::currentModifiers)\r
{\r
handleMouseEvent (MouseInputSource::InputSourceType::mouse, position, mods, pressure, orientation, getMouseEventTime());\r
}\r
if (currentRenderingEngine != direct2DRenderingEngine)\r
direct2DContext = nullptr;\r
else if (direct2DContext == nullptr)\r
- direct2DContext = new Direct2DLowLevelGraphicsContext (hwnd);\r
+ direct2DContext.reset (new Direct2DLowLevelGraphicsContext (hwnd));\r
}\r
#endif\r
\r
\r
void doMouseMove (Point<float> position, bool isMouseDownEvent)\r
{\r
- ModifierKeys modsToSend (currentModifiers);\r
+ ModifierKeys modsToSend (ModifierKeys::currentModifiers);\r
\r
// this will be handled by WM_TOUCH\r
if (isTouchEvent() || areOtherTouchSourcesActive())\r
// This avoids a rare stuck-button problem when focus is lost unexpectedly, but must\r
// not be called as part of a move, in case it's actually a mouse-drag from another\r
// app which ends up here when we get focus before the mouse is released..\r
- if (isMouseDownEvent)\r
- ModifierKeys::getCurrentModifiersRealtime();\r
+ if (isMouseDownEvent && getNativeRealtimeModifiers != nullptr)\r
+ getNativeRealtimeModifiers();\r
\r
updateKeyModifiers();\r
\r
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client\r
if (modProvider != nullptr)\r
- currentModifiers = currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
#endif\r
\r
TRACKMOUSEEVENT tme;\r
\r
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client\r
if (modProvider != nullptr)\r
- currentModifiers = currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
#endif\r
\r
isDragging = true;\r
\r
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client\r
if (modProvider != nullptr)\r
- currentModifiers = currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (modProvider->getWin32Modifiers());\r
#endif\r
\r
const bool wasDragging = isDragging;\r
const auto time = getMouseEventTime();\r
const auto pos = globalToLocal ({ touch.x / 100.0f, touch.y / 100.0f });\r
const auto pressure = touchPressure;\r
- auto modsToSend = currentModifiers;\r
+ auto modsToSend = ModifierKeys::currentModifiers;\r
\r
if (isDown)\r
{\r
- currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
- modsToSend = currentModifiers;\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+ modsToSend = ModifierKeys::currentModifiers;\r
\r
// this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before.\r
handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend.withoutMouseButtons(),\r
else if (isUp)\r
{\r
modsToSend = modsToSend.withoutMouseButtons();\r
- currentModifiers = modsToSend;\r
+ ModifierKeys::currentModifiers = modsToSend;\r
currentTouches.clearTouch (touchIndex);\r
\r
if (! currentTouches.areAnyTouchesActive())\r
}\r
else\r
{\r
- modsToSend = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+ modsToSend = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
}\r
\r
handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend,\r
\r
if (isUp)\r
{\r
- handleMouseEvent (MouseInputSource::InputSourceType::touch, { -10.0f, -10.0f }, currentModifiers.withoutMouseButtons(),\r
+ handleMouseEvent (MouseInputSource::InputSourceType::touch, { -10.0f, -10.0f }, ModifierKeys::currentModifiers.withoutMouseButtons(),\r
pressure, orientation, time, {}, touchIndex);\r
\r
if (! isValidPeer (this))\r
if (isCancel)\r
{\r
currentTouches.clear();\r
- currentModifiers = currentModifiers.withoutMouseButtons();\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
}\r
}\r
\r
bool handlePenInput (POINTER_PEN_INFO penInfo, Point<float> pos, const float pressure, bool isDown, bool isUp)\r
{\r
const auto time = getMouseEventTime();\r
- ModifierKeys modsToSend (currentModifiers);\r
+ ModifierKeys modsToSend (ModifierKeys::currentModifiers);\r
PenDetails penDetails;\r
\r
penDetails.rotation = (penInfo.penMask & PEN_MASK_ROTATION) ? degreesToRadians (static_cast<float> (penInfo.rotation)) : MouseInputSource::invalidRotation;\r
auto pInfoFlags = penInfo.pointerInfo.pointerFlags;\r
\r
if ((pInfoFlags & POINTER_FLAG_FIRSTBUTTON) != 0)\r
- currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier);\r
else if ((pInfoFlags & POINTER_FLAG_SECONDBUTTON) != 0)\r
- currentModifiers = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::rightButtonModifier);\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::rightButtonModifier);\r
\r
if (isDown)\r
{\r
- modsToSend = currentModifiers;\r
+ modsToSend = ModifierKeys::currentModifiers;\r
\r
// this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before.\r
handleMouseEvent (MouseInputSource::InputSourceType::pen, pos, modsToSend.withoutMouseButtons(),\r
else if (isUp || ! (pInfoFlags & POINTER_FLAG_INCONTACT))\r
{\r
modsToSend = modsToSend.withoutMouseButtons();\r
- currentModifiers = currentModifiers.withoutMouseButtons();\r
+ ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withoutMouseButtons();\r
}\r
\r
handleMouseEvent (MouseInputSource::InputSourceType::pen, pos, modsToSend, pressure,\r
\r
if (isUp)\r
{\r
- handleMouseEvent (MouseInputSource::InputSourceType::pen, { -10.0f, -10.0f }, currentModifiers,\r
+ handleMouseEvent (MouseInputSource::InputSourceType::pen, { -10.0f, -10.0f }, ModifierKeys::currentModifiers,\r
pressure, MouseInputSource::invalidOrientation, time, penDetails);\r
\r
if (! isValidPeer (this))\r
//==============================================================================\r
void sendModifierKeyChangeIfNeeded()\r
{\r
- if (modifiersAtLastCallback != currentModifiers)\r
+ if (modifiersAtLastCallback != ModifierKeys::currentModifiers)\r
{\r
- modifiersAtLastCallback = currentModifiers;\r
+ modifiersAtLastCallback = ModifierKeys::currentModifiers;\r
handleModifierKeysChange();\r
}\r
}\r
key = (int) keyChar;\r
\r
// avoid sending junk text characters for some control-key combinations\r
- if (textChar < ' ' && currentModifiers.testFlags (ModifierKeys::ctrlModifier | ModifierKeys::altModifier))\r
+ if (textChar < ' ' && ModifierKeys::currentModifiers.testFlags (ModifierKeys::ctrlModifier | ModifierKeys::altModifier))\r
textChar = 0;\r
}\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HWNDComponentPeer)\r
};\r
\r
-ModifierKeys HWNDComponentPeer::currentModifiers;\r
-ModifierKeys HWNDComponentPeer::modifiersAtLastCallback;\r
-\r
MultiTouchMapper<DWORD> HWNDComponentPeer::currentTouches;\r
+ModifierKeys HWNDComponentPeer::modifiersAtLastCallback;\r
\r
ComponentPeer* Component::createNewPeer (int styleFlags, void* parentHWND)\r
{\r
(HWND) parentHWND, true);\r
}\r
\r
-\r
JUCE_IMPLEMENT_SINGLETON (HWNDComponentPeer::WindowClassHolder)\r
\r
-//==============================================================================\r
-void ModifierKeys::updateCurrentModifiers() noexcept\r
-{\r
- currentModifiers = HWNDComponentPeer::currentModifiers;\r
-}\r
-\r
-ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept\r
-{\r
- HWNDComponentPeer::updateKeyModifiers();\r
-\r
- int mouseMods = 0;\r
- if (HWNDComponentPeer::isKeyDown (VK_LBUTTON)) mouseMods |= ModifierKeys::leftButtonModifier;\r
- if (HWNDComponentPeer::isKeyDown (VK_RBUTTON)) mouseMods |= ModifierKeys::rightButtonModifier;\r
- if (HWNDComponentPeer::isKeyDown (VK_MBUTTON)) mouseMods |= ModifierKeys::middleButtonModifier;\r
-\r
- HWNDComponentPeer::currentModifiers\r
- = HWNDComponentPeer::currentModifiers.withoutMouseButtons().withFlags (mouseMods);\r
-\r
- return HWNDComponentPeer::currentModifiers;\r
-}\r
-\r
//==============================================================================\r
bool KeyPress::isKeyCurrentlyDown (const int keyCode)\r
{\r
UINT flags;\r
HWND owner;\r
String title, message;\r
- ScopedPointer<ModalComponentManager::Callback> callback;\r
+ std::unique_ptr<ModalComponentManager::Callback> callback;\r
\r
static UINT getMessageBoxFlags (AlertWindow::AlertIconType iconType) noexcept\r
{\r
Component* associatedComponent,\r
ModalComponentManager::Callback* callback)\r
{\r
- ScopedPointer<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
- MB_OKCANCEL, callback, callback != nullptr));\r
+ std::unique_ptr<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
+ MB_OKCANCEL, callback, callback != nullptr));\r
if (callback == nullptr)\r
return mb->getResult() != 0;\r
\r
Component* associatedComponent,\r
ModalComponentManager::Callback* callback)\r
{\r
- ScopedPointer<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
- MB_YESNOCANCEL, callback, callback != nullptr));\r
+ std::unique_ptr<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
+ MB_YESNOCANCEL, callback, callback != nullptr));\r
if (callback == nullptr)\r
return mb->getResult();\r
\r
Component* associatedComponent,\r
ModalComponentManager::Callback* callback)\r
{\r
- ScopedPointer<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
- MB_YESNO, callback, callback != nullptr));\r
+ std::unique_ptr<WindowsMessageBox> mb (new WindowsMessageBox (iconType, title, message, associatedComponent,\r
+ MB_YESNO, callback, callback != nullptr));\r
if (callback == nullptr)\r
return mb->getResult();\r
\r
}\r
};\r
\r
-static ScopedPointer<ScreenSaverDefeater> screenSaverDefeater;\r
+static std::unique_ptr<ScreenSaverDefeater> screenSaverDefeater;\r
\r
void Desktop::setScreenSaverEnabled (const bool isEnabled)\r
{\r
if (isEnabled)\r
screenSaverDefeater = nullptr;\r
else if (screenSaverDefeater == nullptr)\r
- screenSaverDefeater = new ScreenSaverDefeater();\r
+ screenSaverDefeater.reset (new ScreenSaverDefeater());\r
}\r
\r
bool Desktop::isScreenSaverEnabled()\r
\r
if (! expanded)\r
{\r
- g.setColour (findColour (PropertyComponent::labelTextColourId).withAlpha (0.4f));\r
+ g.setColour (findColour (TextEditor::backgroundColourId).contrasting().withAlpha (0.4f));\r
g.drawFittedText ("+ " + String (numHidden) + " more", getLookAndFeel().getPropertyComponentContentPosition (*this)\r
.removeFromBottom (20).withTrimmedLeft (10),\r
Justification::centredLeft, 1);\r
//==============================================================================\r
void MultiChoicePropertyComponent::lookAndFeelChanged()\r
{\r
- auto iconColour = findColour (PropertyComponent::labelTextColourId);\r
+ auto iconColour = findColour (TextEditor::backgroundColourId).contrasting();\r
expandButton.setColours (iconColour, iconColour.darker(), iconColour.darker());\r
}\r
\r
class LabelComp;\r
friend class LabelComp;\r
\r
- ScopedPointer<LabelComp> textEditor;\r
+ std::unique_ptr<LabelComp> textEditor;\r
ListenerList<Listener> listenerList;\r
\r
void callListeners();\r
repaint();\r
\r
{\r
- ScopedPointer<Label> newLabel (getLookAndFeel().createComboBoxTextBox (*this));\r
+ std::unique_ptr<Label> newLabel (getLookAndFeel().createComboBoxTextBox (*this));\r
jassert (newLabel != nullptr);\r
\r
if (label != nullptr)\r
bool isButtonDown = false, menuActive = false, scrollWheelEnabled = false;\r
float mouseWheelAccumulator = 0;\r
ListenerList<Listener> listeners;\r
- ScopedPointer<Label> label;\r
+ std::unique_ptr<Label> label;\r
String textWhenNothingSelected, noChoicesMessage;\r
EditableState labelEditableState = editableUnknown;\r
\r
if (editor != nullptr)\r
{\r
WeakReference<Component> deletionChecker (this);\r
- ScopedPointer<TextEditor> outgoingEditor;\r
+ std::unique_ptr<TextEditor> outgoingEditor;\r
std::swap (outgoingEditor, editor);\r
\r
editorAboutToBeHidden (outgoingEditor.get());\r
String lastTextValue;\r
Font font { 15.0f };\r
Justification justification = Justification::centredLeft;\r
- ScopedPointer<TextEditor> editor;\r
+ std::unique_ptr<TextEditor> editor;\r
ListenerList<Listener> listeners;\r
WeakReference<Component> ownerComponent;\r
BorderSize<int> border { 1, 5, 1, 5 };\r
}\r
\r
ListBox& owner;\r
- ScopedPointer<Component> customComponent;\r
+ std::unique_ptr<Component> customComponent;\r
int row = -1;\r
bool selected = false, isDragging = false, isDraggingToScroll = false, selectRowOnMouseUp = false;\r
\r
friend class ListViewport;\r
friend class TableListBox;\r
ListBoxModel* model;\r
- ScopedPointer<ListViewport> viewport;\r
- ScopedPointer<Component> headerComponent;\r
- ScopedPointer<MouseListener> mouseMoveSelector;\r
+ std::unique_ptr<ListViewport> viewport;\r
+ std::unique_ptr<Component> headerComponent;\r
+ std::unique_ptr<MouseListener> mouseMoveSelector;\r
SparseSet<int> selected;\r
int totalItems = 0, rowHeight = 22, minimumRowWidth = 0;\r
int outlineThickness = 0;\r
{\r
int v = std::abs (roundToInt (normRange.interval * 10000000));\r
\r
- while ((v % 10) == 0)\r
+ while ((v % 10) == 0 && numDecimalPlaces > 0)\r
{\r
--numDecimalPlaces;\r
v /= 10;\r
\r
void setRange (double newMin, double newMax, double newInt)\r
{\r
- normRange = NormalisableRange<double> (newMin, newMax, newInt);\r
+ normRange = NormalisableRange<double> (newMin, newMax, newInt,\r
+ normRange.skew, normRange.symmetricSkew);\r
updateRange();\r
}\r
\r
int pixelsForFullDragExtent = 250;\r
Time lastMouseWheelTime;\r
Rectangle<int> sliderRect;\r
- ScopedPointer<DragInProgress> currentDrag;\r
+ std::unique_ptr<DragInProgress> currentDrag;\r
\r
TextEntryBoxPosition textBoxPos;\r
String textSuffix;\r
int popupHoverTimeout = 2000;\r
double lastPopupDismissal = 0.0;\r
\r
- ScopedPointer<Label> valueBox;\r
- ScopedPointer<Button> incButton, decButton;\r
+ std::unique_ptr<Label> valueBox;\r
+ std::unique_ptr<Button> incButton, decButton;\r
\r
//==============================================================================\r
struct PopupDisplayComponent : public BubbleComponent,\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PopupDisplayComponent)\r
};\r
\r
- ScopedPointer<PopupDisplayComponent> popupDisplay;\r
+ std::unique_ptr<PopupDisplayComponent> popupDisplay;\r
Component* parentForPopupDisplay = nullptr;\r
\r
//==============================================================================\r
JUCE_PUBLIC_IN_DLL_BUILD (class Pimpl)\r
friend class Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
void init (SliderStyle, TextEntryBoxPosition);\r
\r
\r
void TableHeaderComponent::restoreFromString (const String& storedVersion)\r
{\r
- ScopedPointer<XmlElement> storedXml (XmlDocument::parse (storedVersion));\r
+ std::unique_ptr<XmlElement> storedXml (XmlDocument::parse (storedVersion));\r
int index = 0;\r
\r
if (storedXml != nullptr && storedXml->hasTagName ("TABLELAYOUT"))\r
\r
OwnedArray<ColumnInfo> columns;\r
Array<Listener*> listeners;\r
- ScopedPointer<Component> dragOverlayComp;\r
+ std::unique_ptr<Component> dragOverlayComp;\r
class DragOverlayComp;\r
\r
bool columnsChanged = false, columnsResized = false, sortChanged = false;\r
return false;\r
\r
// (overridden to avoid forwarding key events to the parent)\r
- return ! ModifierKeys::getCurrentModifiers().isCommandDown();\r
+ return ! ModifierKeys::currentModifiers.isCommandDown();\r
}\r
\r
//==============================================================================\r
struct InsertAction;\r
struct RemoveAction;\r
\r
- ScopedPointer<Viewport> viewport;\r
+ std::unique_ptr<Viewport> viewport;\r
TextHolderComponent* textHolder;\r
BorderSize<int> borderSize { 1, 1, 1, 3 };\r
Justification justification { Justification::left };\r
bool consumeEscAndReturnKeys = true;\r
\r
UndoManager undoManager;\r
- ScopedPointer<CaretComponent> caret;\r
+ std::unique_ptr<CaretComponent> caret;\r
Range<int> selection;\r
int leftIndent = 4, topIndent = 4;\r
unsigned int lastTransactionTime = 0;\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<Button> missingItemsButton;\r
+ std::unique_ptr<Button> missingItemsButton;\r
bool vertical = false, isEditingActive = false;\r
ToolbarItemStyle toolbarStyle = iconsOnly;\r
class MissingItemsComponent;\r
const int itemId;\r
ToolbarEditingMode mode;\r
Toolbar::ToolbarItemStyle toolbarStyle;\r
- ScopedPointer<Component> overlayComp;\r
+ std::unique_ptr<Component> overlayComp;\r
int dragOffsetX, dragOffsetY;\r
bool isActive, isBeingDragged, isBeingUsedAsAButton;\r
Rectangle<int> contentArea;\r
\r
void TreeView::deleteRootItem()\r
{\r
- const ScopedPointer<TreeViewItem> deleter (rootItem);\r
+ const std::unique_ptr<TreeViewItem> deleter (rootItem);\r
setRootItem (nullptr);\r
}\r
\r
\r
private:\r
TreeViewItem& treeViewItem;\r
- ScopedPointer<XmlElement> oldOpenness;\r
+ std::unique_ptr<XmlElement> oldOpenness;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpennessRestorer)\r
};\r
friend struct ContainerDeletePolicy<InsertPointHighlight>;\r
friend struct ContainerDeletePolicy<TargetGroupHighlight>;\r
\r
- ScopedPointer<TreeViewport> viewport;\r
+ std::unique_ptr<TreeViewport> viewport;\r
CriticalSection nodeAlterationLock;\r
TreeViewItem* rootItem = nullptr;\r
- ScopedPointer<InsertPointHighlight> dragInsertPointHighlight;\r
- ScopedPointer<TargetGroupHighlight> dragTargetGroupHighlight;\r
+ std::unique_ptr<InsertPointHighlight> dragInsertPointHighlight;\r
+ std::unique_ptr<TargetGroupHighlight> dragTargetGroupHighlight;\r
int indentSize = -1;\r
bool defaultOpenness = false, needsRecalculating = true, rootItemVisible = true;\r
bool multiSelectEnabled = false, openCloseButtonsVisible = true;\r
}\r
}\r
\r
- if (key.isKeyCode (KeyPress::escapeKey) && escapeKeyCancels && buttons.size() == 0)\r
+ if (key.isKeyCode (KeyPress::escapeKey) && escapeKeyCancels)\r
{\r
exitModalState (0);\r
return true;\r
auto& lf = associatedComponent != nullptr ? associatedComponent->getLookAndFeel()\r
: LookAndFeel::getDefaultLookAndFeel();\r
\r
- ScopedPointer<Component> alertBox (lf.createAlertWindow (title, message, button1, button2, button3,\r
- iconType, numButtons, associatedComponent));\r
+ std::unique_ptr<Component> alertBox (lf.createAlertWindow (title, message, button1, button2, button3,\r
+ iconType, numButtons, associatedComponent));\r
\r
jassert (alertBox != nullptr); // you have to return one of these!\r
\r
callout.dismiss();\r
}\r
\r
- ScopedPointer<Component> content;\r
+ std::unique_ptr<Component> content;\r
CallOutBox callout;\r
\r
JUCE_DECLARE_NON_COPYABLE (CallOutBoxCallback)\r
//==============================================================================\r
void ComponentPeer::handlePaint (LowLevelGraphicsContext& contextToPaintTo)\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
-\r
Graphics g (contextToPaintTo);\r
\r
if (component.isTransformed())\r
\r
bool ComponentPeer::handleKeyPress (const int keyCode, const juce_wchar textCharacter)\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
-\r
return handleKeyPress (KeyPress (keyCode,\r
- ModifierKeys::getCurrentModifiers().withoutMouseButtons(),\r
+ ModifierKeys::currentModifiers.withoutMouseButtons(),\r
textCharacter));\r
}\r
\r
\r
bool ComponentPeer::handleKeyUpOrDown (const bool isKeyDown)\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
bool keyWasUsed = false;\r
\r
for (auto* target = getTargetForKeyPress(); target != nullptr; target = target->getParentComponent())\r
\r
void ComponentPeer::handleModifierKeysChange()\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
-\r
auto* target = Desktop::getInstance().getMainMouseSource().getComponentUnderMouse();\r
\r
if (target == nullptr)\r
//==============================================================================\r
void ComponentPeer::handleBroughtToFront()\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
component.internalBroughtToFront();\r
}\r
\r
\r
void ComponentPeer::handleMovedOrResized()\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
-\r
const bool nowMinimised = isMinimised();\r
\r
if (component.flags.hasHeavyweightPeerFlag && ! nowMinimised)\r
\r
void ComponentPeer::handleFocusGain()\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
-\r
if (component.isParentOf (lastFocusedComponent)\r
&& lastFocusedComponent->isShowing()\r
&& lastFocusedComponent->getWantsKeyboardFocus())\r
\r
void ComponentPeer::handleFocusLoss()\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
-\r
if (component.hasKeyboardFocus (true))\r
{\r
lastFocusedComponent = Component::currentlyFocusedComponent;\r
\r
void ComponentPeer::handleScreenSizeChange()\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
-\r
component.parentSizeChanged();\r
handleMovedOrResized();\r
}\r
\r
bool ComponentPeer::handleDragMove (const ComponentPeer::DragInfo& info)\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
-\r
auto* compUnderMouse = component.getComponentAt (info.position);\r
auto* lastTarget = dragAndDropTargetComponent.get();\r
Component* newTarget = nullptr;\r
//==============================================================================\r
void ComponentPeer::handleUserClosingWindow()\r
{\r
- ModifierKeys::updateCurrentModifiers();\r
component.userTriedToCloseWindow();\r
}\r
\r
int ComponentPeer::getCurrentRenderingEngine() const { return 0; }\r
void ComponentPeer::setCurrentRenderingEngine (int index) { jassert (index == 0); ignoreUnused (index); }\r
\r
+//==============================================================================\r
+std::function<ModifierKeys()> ComponentPeer::getNativeRealtimeModifiers = nullptr;\r
+\r
+ModifierKeys ComponentPeer::getCurrentModifiersRealtime() noexcept\r
+{\r
+ if (getNativeRealtimeModifiers != nullptr)\r
+ return getNativeRealtimeModifiers();\r
+\r
+ return ModifierKeys::currentModifiers;\r
+}\r
+\r
+\r
} // namespace juce\r
virtual int getCurrentRenderingEngine() const;\r
virtual void setCurrentRenderingEngine (int index);\r
\r
+ //==============================================================================\r
+ /** On desktop platforms this method will check all the mouse and key states and return\r
+ a ModifierKeys object representing them.\r
+\r
+ This isn't recommended and is only needed in special circumstances for up-to-date\r
+ modifier information at times when the app's event loop isn't running normally.\r
+\r
+ Another reason to avoid this method is that it's not stateless and calling it may\r
+ update the ModifierKeys::currentModifiers object, which could cause subtle changes\r
+ in the behaviour of some components.\r
+ */\r
+ static ModifierKeys getCurrentModifiersRealtime() noexcept;\r
+\r
protected:\r
//==============================================================================\r
Component& component;\r
const int styleFlags;\r
Rectangle<int> lastNonFullscreenBounds;\r
ComponentBoundsConstrainer* constrainer = nullptr;\r
+ static std::function<ModifierKeys()> getNativeRealtimeModifiers;\r
\r
private:\r
//==============================================================================\r
//==============================================================================\r
int titleBarHeight = 26, menuBarHeight = 24, requiredButtons;\r
bool positionTitleBarButtonsOnLeft, drawTitleTextCentred = true;\r
- ScopedPointer<Button> titleBarButtons [3];\r
+ std::unique_ptr<Button> titleBarButtons [3];\r
Image titleBarIcon;\r
- ScopedPointer<Component> menuBar;\r
+ std::unique_ptr<Component> menuBar;\r
MenuBarModel* menuBarModel = nullptr;\r
\r
class ButtonListenerProxy;\r
friend struct ContainerDeletePolicy<ButtonListenerProxy>;\r
- ScopedPointer<ButtonListenerProxy> buttonListener;\r
+ std::unique_ptr<ButtonListenerProxy> buttonListener;\r
\r
void repaintTitleBar();\r
\r
void addAndMakeVisible (Component*, int zOrder = -1);\r
#endif\r
\r
- ScopedPointer<ResizableCornerComponent> resizableCorner;\r
- ScopedPointer<ResizableBorderComponent> resizableBorder;\r
+ std::unique_ptr<ResizableCornerComponent> resizableCorner;\r
+ std::unique_ptr<ResizableBorderComponent> resizableBorder;\r
\r
private:\r
//==============================================================================\r
void timerCallback() override;\r
\r
double progress;\r
- ScopedPointer<AlertWindow> alertWindow;\r
+ std::unique_ptr<AlertWindow> alertWindow;\r
String message;\r
CriticalSection messageLock;\r
const int timeOutMsWhenCancelling;\r
String TooltipWindow::getTipFor (Component& c)\r
{\r
if (Process::isForegroundProcess()\r
- && ! ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown())\r
+ && ! ModifierKeys::currentModifiers.isAnyMouseButtonDown())\r
{\r
if (auto* ttc = dynamic_cast<TooltipClient*> (&c))\r
if (! c.isCurrentlyBlockedByAnotherModalComponent())\r
method. If you do this, it's best to call the base class's getDesktopWindowStyleFlags()\r
method, then add or remove whatever flags are necessary from this value before returning it.\r
*/\r
-\r
jassert ((windowStyleFlags & ~ComponentPeer::windowIsSemiTransparent)\r
== (getDesktopWindowStyleFlags() & ~ComponentPeer::windowIsSemiTransparent));\r
\r
friend class TopLevelWindowManager;\r
friend class ResizableWindow;\r
bool useDropShadow = true, useNativeTitleBar = false, isCurrentlyActive = false;\r
- ScopedPointer<DropShadower> shadower;\r
+ std::unique_ptr<DropShadower> shadower;\r
\r
void setWindowActive (bool);\r
\r
double xOffset = 0;\r
CodeDocument::Position caretPos, selectionStart, selectionEnd;\r
\r
- ScopedPointer<CaretComponent> caret;\r
+ std::unique_ptr<CaretComponent> caret;\r
ScrollBar verticalScrollBar { true }, horizontalScrollBar { false };\r
ApplicationCommandManager* appCommandManager = nullptr;\r
\r
class Pimpl;\r
friend class Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
class GutterComponent;\r
friend class GutterComponent;\r
friend struct ContainerDeletePolicy<GutterComponent>;\r
- ScopedPointer<GutterComponent> gutter;\r
+ std::unique_ptr<GutterComponent> gutter;\r
\r
enum DragType\r
{\r
private:\r
class Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> control;\r
+ std::unique_ptr<Pimpl> control;\r
bool mouseEventsAllowed = true;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ActiveXControlComponent)\r
{\r
public:\r
//==============================================================================\r
- /** Create an initially-empty container. */\r
- AndroidViewComponent();\r
+ /** Create an initially-empty container. The optional flag should be left as\r
+ false in most of the cases. Currently it is only set to true as a workaround\r
+ for a web browser bug, where scrolling would be very slow and it would\r
+ randomly scroll in an opposite direction of scrolling.\r
+ */\r
+ AndroidViewComponent (bool embedAsSiblingRatherThanChild = false);\r
\r
/** Destructor. */\r
~AndroidViewComponent();\r
\r
private:\r
class Pimpl;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
+\r
+ bool embedAsSiblingRatherThanChild;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AndroidViewComponent)\r
};\r
private:\r
class Pimpl;\r
friend class Pimpl;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UIViewComponent)\r
};\r
\r
class Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
};\r
\r
#endif\r
\r
ID: juce_gui_extra\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE extended GUI classes\r
description: Miscellaneous GUI classes for specialised tasks.\r
website: http://www.juce.com/juce\r
\r
Colour colour;\r
float h, s, v;\r
- ScopedPointer<Slider> sliders[4];\r
- ScopedPointer<ColourSpaceView> colourSpace;\r
- ScopedPointer<HueSelectorComp> hueSelector;\r
+ std::unique_ptr<Slider> sliders[4];\r
+ std::unique_ptr<ColourSpaceView> colourSpace;\r
+ std::unique_ptr<HueSelectorComp> hueSelector;\r
OwnedArray<SwatchComponent> swatchComponents;\r
const int flags;\r
int edgeGap;\r
KeyMappingEditorComponent& owner;\r
const CommandID commandID;\r
const int keyNum;\r
- ScopedPointer<KeyEntryWindow> currentKeyEntryWindow;\r
+ std::unique_ptr<KeyEntryWindow> currentKeyEntryWindow;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChangeKeyButton)\r
};\r
friend class TopLevelItem;\r
friend struct ContainerDeletePolicy<ChangeKeyButton>;\r
friend struct ContainerDeletePolicy<TopLevelItem>;\r
- ScopedPointer<TopLevelItem> treeItem;\r
+ std::unique_ptr<TopLevelItem> treeItem;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KeyMappingEditorComponent)\r
};\r
CPlusPlusCodeTokeniser tokeniser;\r
CodeEditorComponent sourceEditor;\r
CodeDocument::Position valueStart, valueEnd;\r
- ScopedPointer<Component> customComp;\r
+ std::unique_ptr<Component> customComp;\r
bool wasHex = false;\r
\r
JUCE_DECLARE_NON_COPYABLE (LivePropertyEditorBase)\r
private:\r
//==============================================================================\r
String currentPageName;\r
- ScopedPointer<Component> currentPage;\r
+ std::unique_ptr<Component> currentPage;\r
OwnedArray<DrawableButton> buttons;\r
int buttonSize;\r
\r
\r
LockScreenAppearance lockScreenAppearance = showPartially; /**< Optional. */\r
\r
- ScopedPointer<Notification> publicVersion; /**< Optional: if you set lockScreenAppearance to showPartially,\r
- then you can provide "public version" of your notification\r
- that will be displayed on the lock screen. This way you can\r
- control what information is visible when the screen is locked. */\r
+ std::unique_ptr<Notification> publicVersion; /**< Optional: if you set lockScreenAppearance to showPartially,\r
+ then you can provide "public version" of your notification\r
+ that will be displayed on the lock screen. This way you can\r
+ control what information is visible when the screen is locked. */\r
\r
String groupSortKey; /**< Optional: Used to order notifications within the same group. Available from Android API 20 or above. */\r
bool groupSummary = false; /**< Optional: if true, then this notification will be a group summary of the group set with groupId.\r
struct Pimpl;\r
friend struct Pimpl;\r
\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
#endif\r
};\r
\r
private:\r
//==============================================================================\r
JUCE_PUBLIC_IN_DLL_BUILD (class Pimpl)\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SystemTrayIconComponent)\r
};\r
private:\r
//==============================================================================\r
class Pimpl;\r
- ScopedPointer<Pimpl> browser;\r
+ std::unique_ptr<Pimpl> browser;\r
bool blankPageShown = false, unloadPageWhenBrowserIsHidden;\r
String lastURL;\r
StringArray lastHeaders;\r
class AndroidViewComponent::Pimpl : public ComponentMovementWatcher\r
{\r
public:\r
- Pimpl (jobject v, Component& comp)\r
+ Pimpl (jobject v, Component& comp, bool makeSiblingRatherThanChild = false)\r
: ComponentMovementWatcher (&comp),\r
view (v),\r
- owner (comp)\r
+ owner (comp),\r
+ embedAsSiblingRatherThanChild (makeSiblingRatherThanChild)\r
{\r
if (owner.isShowing())\r
componentPeerChanged();\r
componentPeerChanged();\r
}\r
\r
+ void componentBroughtToFront (Component& comp) override\r
+ {\r
+ ComponentMovementWatcher::componentBroughtToFront (comp);\r
+\r
+ // Ensure that the native component doesn't get obscured.\r
+ if (embedAsSiblingRatherThanChild)\r
+ getEnv()->CallVoidMethod (view, AndroidView.bringToFront);\r
+ }\r
+\r
Rectangle<int> getViewBounds() const\r
{\r
auto* env = getEnv();\r
{\r
jobject peerView = (jobject) currentPeer->getNativeHandle();\r
\r
+ // NB: Assuming a parent is always of ViewGroup type\r
auto* env = getEnv();\r
- auto parentView = env->CallObjectMethod (peerView, AndroidView.getParent);\r
\r
- // Assuming a parent is always of ViewGroup type\r
- env->CallVoidMethod (parentView, AndroidViewGroup.addView, view.get());\r
+ if (embedAsSiblingRatherThanChild)\r
+ {\r
+ // This is a workaround for a bug in a web browser component where\r
+ // scrolling would be very slow and occassionally would scroll in\r
+ // opposite direction to dragging direction. In normal circumstances,\r
+ // the native view should be a child of peerView instead.\r
+ auto parentView = LocalRef<jobject> (env->CallObjectMethod (peerView, AndroidView.getParent));\r
+ env->CallVoidMethod (parentView, AndroidViewGroup.addView, view.get());\r
+ }\r
+ else\r
+ {\r
+ env->CallVoidMethod (peerView, AndroidViewGroup.addView, view.get());\r
+ }\r
\r
componentMovedOrResized (false, false);\r
}\r
}\r
\r
Component& owner;\r
+ bool embedAsSiblingRatherThanChild;\r
ComponentPeer* currentPeer = nullptr;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl)\r
};\r
\r
//==============================================================================\r
-AndroidViewComponent::AndroidViewComponent() {}\r
+AndroidViewComponent::AndroidViewComponent (bool makeSiblingRatherThanChild)\r
+ : embedAsSiblingRatherThanChild (makeSiblingRatherThanChild)\r
+{\r
+}\r
+\r
AndroidViewComponent::~AndroidViewComponent() {}\r
\r
void AndroidViewComponent::setView (void* view)\r
pimpl.reset();\r
\r
if (view != nullptr)\r
- pimpl.reset (new Pimpl ((jobject) view, *this));\r
+ pimpl.reset (new Pimpl ((jobject) view, *this, embedAsSiblingRatherThanChild));\r
}\r
}\r
\r
propertiesDynamicObject->setProperty ("clickAction", juceString (clickAction.get()));\r
propertiesDynamicObject->setProperty ("bodyLocalizationKey", juceString (bodyLocalizationKey.get()));\r
propertiesDynamicObject->setProperty ("titleLocalizationKey", juceString (titleLocalizationKey.get()));\r
- propertiesDynamicObject->setProperty ("bodyLocalizationArgs", jobjectArrayToStringArray (bodyLocalizationArgs));\r
- propertiesDynamicObject->setProperty ("titleLocalizationArgs", jobjectArrayToStringArray (titleLocalizationArgs));\r
+ propertiesDynamicObject->setProperty ("bodyLocalizationArgs", javaStringArrayToJuce (bodyLocalizationArgs));\r
+ propertiesDynamicObject->setProperty ("titleLocalizationArgs", javaStringArrayToJuce (titleLocalizationArgs));\r
propertiesDynamicObject->setProperty ("link", link.get() != 0 ? juceString ((jstring) env->CallObjectMethod (link, AndroidUri.toString)) : String());\r
}\r
\r
\r
return n;\r
}\r
-\r
- static StringArray jobjectArrayToStringArray (const LocalRef<jobjectArray>& array)\r
- {\r
- if (array == 0)\r
- return {};\r
-\r
- auto* env = getEnv();\r
-\r
- const int size = env->GetArrayLength (array.get());\r
-\r
- StringArray stringArray;\r
-\r
- for (int i = 0; i < size; ++i)\r
- stringArray.add (juceString ((jstring) env->GetObjectArrayElement (array.get(), (jsize) i)));\r
-\r
- return stringArray;\r
- }\r
#endif\r
\r
void setupChannels (const Array<ChannelGroup>& groups, const Array<Channel>& channels)\r
{\r
public:\r
Pimpl (WebBrowserComponent& o)\r
- : owner (o)\r
+ : AndroidViewComponent (true),\r
+ owner (o)\r
{\r
auto* env = getEnv();\r
\r
// we need to open URL manually.\r
\r
URL urlToUse = URL (url).withPOSTData (*postData);\r
-\r
- connectionThread = nullptr;\r
- connectionThread = new ConnectionThread (*this, urlToUse, *headers);\r
+ connectionThread.reset (new ConnectionThread (*this, urlToUse, *headers));\r
}\r
}\r
\r
}\r
\r
Pimpl& owner;\r
- ScopedPointer<WebInputStream> webInputStream;\r
+ std::unique_ptr<WebInputStream> webInputStream;\r
Result result;\r
};\r
\r
WebBrowserComponent& owner;\r
GlobalRef juceWebChromeClient;\r
GlobalRef juceWebViewClient;\r
- ScopedPointer<ConnectionThread> connectionThread;\r
+ std::unique_ptr<ConnectionThread> connectionThread;\r
WaitableEvent responseReadyEvent;\r
\r
WeakReference<Pimpl>::Master masterReference;\r
{\r
setOpaque (true);\r
\r
- addAndMakeVisible (browser = new Pimpl (*this));\r
+ browser.reset (new Pimpl (*this));\r
+ addAndMakeVisible (browser.get());\r
}\r
\r
WebBrowserComponent::~WebBrowserComponent()\r
namespace juce\r
{\r
\r
-#if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
-template <> struct ContainerDeletePolicy<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>> { static void destroy (NSObject* o) { [o release]; } };\r
-#endif\r
-\r
namespace PushNotificationsDelegateDetails\r
{\r
//==============================================================================\r
}\r
else\r
{\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
if (a.style == Action::text)\r
{\r
return [UNTextInputNotificationAction actionWithIdentifier: juceStringToNS (a.identifier)\r
return [UNNotificationAction actionWithIdentifier: juceStringToNS (a.identifier)\r
title: juceStringToNS (a.title)\r
options: NSUInteger (a.destructive << 1 | (! a.triggerInBackground) << 2)];\r
- #else\r
+ #else\r
return nullptr;\r
- #endif\r
+ #endif\r
}\r
}\r
\r
}\r
else\r
{\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
auto* actions = [NSMutableArray arrayWithCapacity: (NSUInteger) c.actions.size()];\r
\r
for (const auto& a : c.actions)\r
actions: actions\r
intentIdentifiers: @[]\r
options: c.sendDismissAction ? UNNotificationCategoryOptionCustomDismissAction : 0];\r
- #else\r
+ #else\r
return nullptr;\r
- #endif\r
+ #endif\r
}\r
}\r
\r
return notification;\r
}\r
\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
UNNotificationRequest* juceNotificationToUNNotificationRequest (const PushNotifications::Notification& n)\r
{\r
// content\r
\r
return request;\r
}\r
- #endif\r
+ #endif\r
\r
String getUserResponseFromNSDictionary (NSDictionary* dictionary)\r
{\r
}\r
\r
//==============================================================================\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
double getIntervalSecFromUNNotificationTrigger (UNNotificationTrigger* t)\r
{\r
if (t != nil)\r
{\r
return unNotificationRequestToJuceNotification (n.request);\r
}\r
- #endif\r
+ #endif\r
\r
PushNotifications::Notification uiLocalNotificationToJuceNotification (UILocalNotification* n)\r
{\r
return category;\r
}\r
\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
Action unNotificationActionToAction (UNNotificationAction* a)\r
{\r
Action action;\r
\r
return category;\r
}\r
- #endif\r
+ #endif\r
\r
PushNotifications::Notification nsDictionaryToJuceNotification (NSDictionary* dictionary)\r
{\r
{\r
PushNotificationsDelegate() : delegate ([getClass().createInstance() init])\r
{\r
- Class::setThis (delegate, this);\r
+ Class::setThis (delegate.get(), this);\r
\r
id<UIApplicationDelegate> appDelegate = [[UIApplication sharedApplication] delegate];\r
\r
SEL selector = NSSelectorFromString (@"setPushNotificationsDelegateToUse:");\r
\r
if ([appDelegate respondsToSelector: selector])\r
- [appDelegate performSelector: selector withObject: delegate];\r
+ [appDelegate performSelector: selector withObject: delegate.get()];\r
}\r
\r
virtual ~PushNotificationsDelegate() {}\r
NSDictionary* responseInfo,\r
void (^completionHandler)()) = 0;\r
\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
virtual void willPresentNotificationWithCompletionHandler (UNNotification* notification,\r
void (^completionHandler)(UNNotificationPresentationOptions options)) = 0;\r
\r
virtual void didReceiveNotificationResponseWithCompletionHandler (UNNotificationResponse* response,\r
void (^completionHandler)()) = 0;\r
- #endif\r
+ #endif\r
\r
protected:\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
- ScopedPointer<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>> delegate;\r
- #else\r
- ScopedPointer<NSObject<UIApplicationDelegate>> delegate;\r
- #endif\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ std::unique_ptr<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>, NSObjectDeleter> delegate;\r
+ #else\r
+ std::unique_ptr<NSObject<UIApplicationDelegate>, NSObjectDeleter> delegate;\r
+ #endif\r
\r
private:\r
//==============================================================================\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
struct Class : public ObjCClass<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>>\r
{\r
Class() : ObjCClass<NSObject<UIApplicationDelegate, UNUserNotificationCenterDelegate>> ("JucePushNotificationsDelegate_")\r
- #else\r
+ #else\r
struct Class : public ObjCClass<NSObject<UIApplicationDelegate>>\r
{\r
Class() : ObjCClass<NSObject<UIApplicationDelegate>> ("JucePushNotificationsDelegate_")\r
- #endif\r
+ #endif\r
{\r
addIvar<PushNotificationsDelegate*> ("self");\r
\r
addMethod (@selector (application:handleActionWithIdentifier:forLocalNotification:completionHandler:), handleActionForLocalNotificationCompletionHandler, "v@:@@@@");\r
addMethod (@selector (application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:), handleActionForLocalNotificationWithResponseCompletionHandler, "v@:@@@@@");\r
\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
addMethod (@selector (userNotificationCenter:willPresentNotification:withCompletionHandler:), willPresentNotificationWithCompletionHandler, "v@:@@@");\r
addMethod (@selector (userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:), didReceiveNotificationResponseWithCompletionHandler, "v@:@@@");\r
- #endif\r
+ #endif\r
\r
registerClass();\r
}\r
NSDictionary* responseInfo,\r
void (^completionHandler)()) { getThis (self). handleActionForLocalNotificationWithResponseCompletionHandler (actionIdentifier, notification, responseInfo, completionHandler); }\r
\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
static void willPresentNotificationWithCompletionHandler (id self, SEL, UNUserNotificationCenter*,\r
UNNotification* notification,\r
void (^completionHandler)(UNNotificationPresentationOptions options)) { getThis (self).willPresentNotificationWithCompletionHandler (notification, completionHandler); }\r
static void didReceiveNotificationResponseWithCompletionHandler (id self, SEL, UNUserNotificationCenter*,\r
UNNotificationResponse* response,\r
void (^completionHandler)()) { getThis (self).didReceiveNotificationResponseWithCompletionHandler (response, completionHandler); }\r
- #endif\r
+ #endif\r
};\r
\r
//==============================================================================\r
completionHandler();\r
}\r
\r
- #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
void willPresentNotificationWithCompletionHandler (UNNotification* notification,\r
void (^completionHandler)(UNNotificationPresentationOptions options)) override\r
{\r
owner.listeners.call ([&] (Listener& l) { l.handleNotificationAction (! remote, n, actionString, responseString); });\r
completionHandler();\r
}\r
- #endif\r
+ #endif\r
\r
void subscribeToTopic (const String& topic) { ignoreUnused (topic); }\r
void unsubscribeFromTopic (const String& topic) { ignoreUnused (topic); }\r
\r
unsigned long windowHandle;\r
ssize_t actual = read (inChannel, &windowHandle, sizeof (windowHandle));\r
+\r
if (actual != sizeof (windowHandle))\r
{\r
killChild();\r
return;\r
}\r
\r
- receiver = new CommandReceiver (this, inChannel);\r
+ receiver.reset (new CommandReceiver (this, inChannel));\r
startThread();\r
\r
- xembed = new XEmbedComponent (windowHandle);\r
- owner.addAndMakeVisible (xembed);\r
+ xembed.reset (new XEmbedComponent (windowHandle));\r
+ owner.addAndMakeVisible (xembed.get());\r
}\r
\r
void quit()\r
\r
private:\r
WebBrowserComponent& owner;\r
- ScopedPointer<CommandReceiver> receiver;\r
+ std::unique_ptr<CommandReceiver> receiver;\r
int childProcess = 0, inChannel = 0, outChannel = 0;\r
int threadControl[2];\r
- ScopedPointer<XEmbedComponent> xembed;\r
+ std::unique_ptr<XEmbedComponent> xembed;\r
WaitableEvent threadBlocker;\r
};\r
\r
class SharedKeyWindow : public ReferenceCountedObject\r
{\r
public:\r
- typedef ReferenceCountedObjectPtr<SharedKeyWindow> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<SharedKeyWindow>;\r
\r
//==============================================================================\r
Window getHandle() { return keyProxy; }\r
private:\r
static void frameChanged (id self, SEL, NSNotification*)\r
{\r
- if (NSViewResizeWatcher* const target = getIvar<NSViewResizeWatcher*> (self, "target"))\r
+ if (auto* target = getIvar<NSViewResizeWatcher*> (self, "target"))\r
target->viewResized();\r
}\r
\r
private NSViewResizeWatcher\r
{\r
public:\r
- NSViewAttachment (NSView* const v, Component& comp)\r
+ NSViewAttachment (NSView* v, Component& comp)\r
: ComponentMovementWatcher (&comp),\r
view (v), owner (comp),\r
currentPeer (nullptr)\r
\r
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override\r
{\r
- if (ComponentPeer* const peer = owner.getTopLevelComponent()->getPeer())\r
+ if (auto* peer = owner.getTopLevelComponent()->getPeer())\r
{\r
- NSRect r = makeNSRect (peer->getAreaCoveredBy (owner));\r
+ auto r = makeNSRect (peer->getAreaCoveredBy (owner));\r
r.origin.y = [[view superview] frame].size.height - (r.origin.y + r.size.height);\r
[view setFrame: r];\r
}\r
\r
void componentPeerChanged() override\r
{\r
- ComponentPeer* const peer = owner.getPeer();\r
+ auto* peer = owner.getPeer();\r
\r
if (currentPeer != peer)\r
{\r
\r
if (peer != nullptr)\r
{\r
- NSView* const peerView = (NSView*) peer->getNativeHandle();\r
+ auto peerView = (NSView*) peer->getNativeHandle();\r
[peerView addSubview: view];\r
componentMovedOrResized (false, false);\r
}\r
\r
NSView* const view;\r
\r
- typedef ReferenceCountedObjectPtr<NSViewAttachment> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<NSViewAttachment>;\r
+\r
private:\r
Component& owner;\r
ComponentPeer* currentPeer;\r
NSViewComponent::NSViewComponent() {}\r
NSViewComponent::~NSViewComponent() {}\r
\r
-void NSViewComponent::setView (void* const view)\r
+void NSViewComponent::setView (void* view)\r
{\r
if (view != getView())\r
{\r
- NSViewAttachment::Ptr old = attachment;\r
+ auto old = attachment;\r
\r
attachment = nullptr;\r
\r
{\r
if (attachment != nullptr)\r
{\r
- NSRect r = [static_cast<NSViewAttachment*> (attachment.get())->view frame];\r
+ auto r = [static_cast<NSViewAttachment*> (attachment.get())->view frame];\r
setBounds (Rectangle<int> ((int) r.size.width, (int) r.size.height));\r
}\r
}\r
(static_cast<NSViewAttachment*> (attachment.get()))->updateAlpha();\r
}\r
\r
-ReferenceCountedObject* NSViewComponent::attachViewToComponent (Component& comp, void* const view)\r
+ReferenceCountedObject* NSViewComponent::attachViewToComponent (Component& comp, void* view)\r
{\r
return new NSViewAttachment ((NSView*) view, comp);\r
}\r
namespace juce\r
{\r
\r
-template <> struct ContainerDeletePolicy<NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate>> { static void destroy (NSObject* o) { [o release]; } };\r
-\r
namespace PushNotificationsDelegateDetailsOsx\r
{\r
using Action = PushNotifications::Notification::Action;\r
{\r
PushNotificationsDelegate() : delegate ([getClass().createInstance() init])\r
{\r
- Class::setThis (delegate, this);\r
+ Class::setThis (delegate.get(), this);\r
\r
id<NSApplicationDelegate> appDelegate = [[NSApplication sharedApplication] delegate];\r
\r
SEL selector = NSSelectorFromString (@"setPushNotificationsDelegate:");\r
\r
if ([appDelegate respondsToSelector: selector])\r
- [appDelegate performSelector: selector withObject: delegate];\r
+ [appDelegate performSelector: selector withObject: delegate.get()];\r
\r
- [NSUserNotificationCenter defaultUserNotificationCenter].delegate = delegate;\r
+ [NSUserNotificationCenter defaultUserNotificationCenter].delegate = delegate.get();\r
}\r
\r
virtual ~PushNotificationsDelegate()\r
virtual bool shouldPresentNotification (NSUserNotification* notification) = 0;\r
\r
protected:\r
- ScopedPointer<NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate>> delegate;\r
+ std::unique_ptr<NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate>, NSObjectDeleter> delegate;\r
\r
private:\r
struct Class : public ObjCClass<NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate>>\r
}\r
else\r
{\r
- auto eventMods = ModifierKeys::getCurrentModifiersRealtime();\r
+ auto eventMods = ComponentPeer::getCurrentModifiersRealtime();\r
\r
if (([e modifierFlags] & NSEventModifierFlagCommand) != 0)\r
eventMods = eventMods.withFlags (ModifierKeys::commandModifier);\r
peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse,\r
{ (float) (GET_X_LPARAM (lParam) + activeXRect.left - peerRect.left),\r
(float) (GET_Y_LPARAM (lParam) + activeXRect.top - peerRect.top) },\r
- ModifierKeys::getCurrentModifiersRealtime(),\r
+ ComponentPeer::getCurrentModifiersRealtime(),\r
MouseInputSource::invalidPressure,\r
MouseInputSource::invalidOrientation,\r
getMouseEventTime());\r
auto controlBounds = peer->getAreaCoveredBy (*this);\r
auto hwnd = (HWND) peer->getNativeHandle();\r
\r
- ScopedPointer<Pimpl> newControl (new Pimpl (hwnd, *this));\r
+ std::unique_ptr<Pimpl> newControl (new Pimpl (hwnd, *this));\r
\r
HRESULT hr = OleCreate (*(const IID*) controlIID, __uuidof (IOleObject), 1 /*OLERENDER_DRAW*/, 0,\r
newControl->clientSite, newControl->storage,\r
\r
if (newControl->control->DoVerb (OLEIVERB_SHOW, 0, newControl->clientSite, 0, hwnd, &rect) == S_OK)\r
{\r
- control = newControl;\r
+ control.reset (newControl.release());\r
control->controlHWND = ActiveXHelpers::getHWND (this);\r
\r
if (control->controlHWND != 0)\r
}\r
else\r
{\r
- ModifierKeys eventMods (ModifierKeys::getCurrentModifiersRealtime());\r
+ ModifierKeys eventMods (ComponentPeer::getCurrentModifiersRealtime());\r
\r
if (lParam == WM_LBUTTONDOWN || lParam == WM_LBUTTONDBLCLK)\r
eventMods = eventMods.withFlags (ModifierKeys::leftButtonModifier);\r
if (JuceWindowIdentifier::isJUCEWindow (hwnd))\r
if (ComponentPeer* peer = (ComponentPeer*) GetWindowLongPtr (hwnd, 8))\r
if (SystemTrayIconComponent* const iconComp = dynamic_cast<SystemTrayIconComponent*> (&(peer->getComponent())))\r
- return iconComp->pimpl;\r
+ return iconComp->pimpl.get();\r
\r
return nullptr;\r
}\r
unloadPageWhenBrowserIsHidden (unloadPageWhenBrowserIsHidden_)\r
{\r
setOpaque (true);\r
- addAndMakeVisible (browser);\r
+ addAndMakeVisible (browser.get());\r
}\r
\r
WebBrowserComponent::~WebBrowserComponent()\r
class Draggable3DOrientation\r
{\r
public:\r
- typedef Vector3D<float> VectorType;\r
- typedef Quaternion<float> QuaternionType;\r
+ using VectorType = Vector3D<float>;\r
+ using QuaternionType = Quaternion<float>;\r
\r
/** Creates a Draggable3DOrientation, initially set up to be aligned along the X axis. */\r
Draggable3DOrientation (float objectRadius = 0.5f) noexcept\r
rectangle is assumed to be the centre of the object that will be rotated, and\r
the size of the rectangle will be used to scale the object radius - see setRadius().\r
*/\r
- void setViewport (const Rectangle<int>& newArea) noexcept\r
+ void setViewport (Rectangle<int> newArea) noexcept\r
{\r
area = newArea;\r
}\r
template <typename Type>\r
void mouseDrag (Point<Type> mousePos) noexcept\r
{\r
- const VectorType oldPos (projectOnSphere (lastMouse));\r
+ auto oldPos = projectOnSphere (lastMouse);\r
lastMouse = mousePosToProportion (mousePos.toFloat());\r
- const VectorType newPos (projectOnSphere (lastMouse));\r
+ auto newPos = projectOnSphere (lastMouse);\r
\r
quaternion *= rotationFromMove (oldPos, newPos);\r
}\r
QuaternionType quaternion;\r
Point<float> lastMouse;\r
\r
- Point<float> mousePosToProportion (const Point<float> mousePos) const noexcept\r
+ Point<float> mousePosToProportion (Point<float> mousePos) const noexcept\r
{\r
- const int scale = (jmin (area.getWidth(), area.getHeight()) / 2);\r
+ auto scale = jmin (area.getWidth(), area.getHeight()) / 2;\r
\r
// You must call setViewport() to give this object a valid window size before\r
// calling any of the mouse input methods!\r
jassert (scale > 0);\r
\r
- return Point<float> ((mousePos.x - (float) area.getCentreX()) / (float) scale,\r
- ((float) area.getCentreY() - mousePos.y) / (float) scale);\r
+ return { (mousePos.x - (float) area.getCentreX()) / (float) scale,\r
+ ((float) area.getCentreY() - mousePos.y) / (float) scale };\r
}\r
\r
- VectorType projectOnSphere (const Point<float> pos) const noexcept\r
+ VectorType projectOnSphere (Point<float> pos) const noexcept\r
{\r
- const float radiusSquared = radius * radius;\r
- const float xySquared = pos.x * pos.x + pos.y * pos.y;\r
+ auto radiusSquared = radius * radius;\r
+ auto xySquared = pos.x * pos.x + pos.y * pos.y;\r
\r
- return VectorType (pos.x, pos.y,\r
- xySquared < radiusSquared * 0.5f ? std::sqrt (radiusSquared - xySquared)\r
- : (radiusSquared / (2.0f * std::sqrt (xySquared))));\r
+ return { pos.x, pos.y,\r
+ xySquared < radiusSquared * 0.5f ? std::sqrt (radiusSquared - xySquared)\r
+ : (radiusSquared / (2.0f * std::sqrt (xySquared))) };\r
}\r
\r
QuaternionType rotationFromMove (const VectorType& from, const VectorType& to) const noexcept\r
{\r
- VectorType rotationAxis (to ^ from);\r
+ auto rotationAxis = (to ^ from);\r
\r
if (rotationAxis.lengthIsBelowEpsilon())\r
rotationAxis = VectorType::xAxis();\r
\r
- const float d = jlimit (-1.0f, 1.0f, (from - to).length() / (2.0f * radius));\r
+ auto d = jlimit (-1.0f, 1.0f, (from - to).length() / (2.0f * radius));\r
\r
return QuaternionType::fromAngle (2.0f * std::asin (d), rotationAxis);\r
}\r
\r
ID: juce_opengl\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE OpenGL classes\r
description: Classes for rendering OpenGL in a JUCE window.\r
website: http://www.juce.com/juce\r
bool /*useMultisampling*/,\r
OpenGLVersion)\r
{\r
- dummyComponent = new DummyComponent (*this);\r
+ dummyComponent.reset (new DummyComponent (*this));\r
createNativeWindow (component);\r
\r
PIXELFORMATDESCRIPTOR pfd;\r
NativeContext& context;\r
};\r
\r
- ScopedPointer<DummyComponent> dummyComponent;\r
- ScopedPointer<ComponentPeer> nativeWindow;\r
+ std::unique_ptr<DummyComponent> dummyComponent;\r
+ std::unique_ptr<ComponentPeer> nativeWindow;\r
HGLRC renderContext;\r
HDC dc;\r
OpenGLContext* context = {};\r
void createNativeWindow (Component& component)\r
{\r
auto* topComp = component.getTopLevelComponent();\r
- nativeWindow = createNonRepaintingEmbeddedWindowsPeer (*dummyComponent, topComp->getWindowHandle());\r
+ nativeWindow.reset (createNonRepaintingEmbeddedWindowsPeer (*dummyComponent, topComp->getWindowHandle()));\r
\r
if (auto* peer = topComp->getPeer())\r
updateWindowPosition (peer->getAreaCoveredBy (component));\r
clearRegionInFrameBuffer (invalid);\r
\r
{\r
- ScopedPointer<LowLevelGraphicsContext> g (createOpenGLGraphicsContext (context, cachedImageFrameBuffer));\r
+ std::unique_ptr<LowLevelGraphicsContext> g (createOpenGLGraphicsContext (context, cachedImageFrameBuffer));\r
g->clipToRectangleList (invalid);\r
g->addTransform (transform);\r
\r
\r
//==============================================================================\r
friend class NativeContext;\r
- ScopedPointer<NativeContext> nativeContext;\r
+ std::unique_ptr<NativeContext> nativeContext;\r
\r
OpenGLContext& context;\r
Component& component;\r
Atomic<int> needsUpdate { 1 }, destroying;\r
uint32 lastMMLockReleaseTime = 0;\r
\r
- ScopedPointer<ThreadPool> renderThread;\r
+ std::unique_ptr<ThreadPool> renderThread;\r
ReferenceCountedArray<OpenGLContext::AsyncWorker, CriticalSection> workQueue;\r
MessageManager::Lock messageManagerLock;\r
\r
NativeContext* nativeContext = nullptr;\r
OpenGLRenderer* renderer = nullptr;\r
double currentRenderScale = 1.0;\r
- ScopedPointer<Attachment> attachment;\r
+ std::unique_ptr<Attachment> attachment;\r
OpenGLPixelFormat openGLPixelFormat;\r
void* contextToShareWith = nullptr;\r
OpenGLVersion versionRequired = defaultGLVersion;\r
//==============================================================================\r
struct AsyncWorker : public ReferenceCountedObject\r
{\r
- typedef ReferenceCountedObjectPtr<AsyncWorker> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<AsyncWorker>;\r
virtual void operator() (OpenGLContext&) = 0;\r
virtual ~AsyncWorker() {}\r
};\r
{\r
if (savedState != nullptr)\r
{\r
- ScopedPointer<SavedState> state;\r
+ std::unique_ptr<SavedState> state;\r
std::swap (state, savedState);\r
\r
if (state->restore (context, *this))\r
private:\r
class Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
class SavedState;\r
friend struct ContainerDeletePolicy<SavedState>;\r
- ScopedPointer<SavedState> savedState;\r
+ std::unique_ptr<SavedState> savedState;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenGLFrameBuffer)\r
};\r
private ImagePixelData::Listener\r
{\r
CachedImageList (OpenGLContext& c) noexcept\r
- : context (c), totalSize (0), maxCacheSize (c.getImageCacheSize()) {}\r
+ : context (c), maxCacheSize (c.getImageCacheSize()) {}\r
\r
static CachedImageList* get (OpenGLContext& c)\r
{\r
const char cacheValueID[] = "CachedImages";\r
- CachedImageList* list = static_cast<CachedImageList*> (c.getAssociatedObject (cacheValueID));\r
+ auto list = static_cast<CachedImageList*> (c.getAssociatedObject (cacheValueID));\r
\r
if (list == nullptr)\r
{\r
\r
TextureInfo getTextureFor (const Image& image)\r
{\r
- ImagePixelData* const pixelData = image.getPixelData();\r
-\r
- CachedImage* c = findCachedImage (pixelData);\r
+ auto pixelData = image.getPixelData();\r
+ auto* c = findCachedImage (pixelData);\r
\r
if (c == nullptr)\r
{\r
- if (OpenGLFrameBuffer* const fb = OpenGLImageType::getFrameBufferFrom (image))\r
+ if (auto fb = OpenGLImageType::getFrameBufferFrom (image))\r
{\r
TextureInfo t;\r
t.textureID = fb->getTextureID();\r
CachedImage (CachedImageList& list, ImagePixelData* im)\r
: owner (list), pixelData (im),\r
lastUsed (Time::getCurrentTime()),\r
- imageSize ((size_t) (im->width * im->height)),\r
- textureNeedsReloading (true)\r
+ imageSize ((size_t) (im->width * im->height))\r
{\r
pixelData->listeners.add (&owner);\r
}\r
t.fullHeightProportion = t.imageHeight / (float) texture.getHeight();\r
\r
lastUsed = Time::getCurrentTime();\r
-\r
return t;\r
}\r
\r
OpenGLTexture texture;\r
Time lastUsed;\r
const size_t imageSize;\r
- bool textureNeedsReloading;\r
+ bool textureNeedsReloading = true;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CachedImage)\r
};\r
\r
- typedef ReferenceCountedObjectPtr<CachedImageList> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<CachedImageList>;\r
\r
private:\r
OpenGLContext& context;\r
OwnedArray<CachedImage> images;\r
- size_t totalSize, maxCacheSize;\r
+ size_t totalSize = 0;\r
+ const size_t maxCacheSize;\r
\r
bool canUseContext() const noexcept\r
{\r
\r
void imageDataChanged (ImagePixelData* im) override\r
{\r
- if (CachedImage* c = findCachedImage (im))\r
+ if (auto* c = findCachedImage (im))\r
c->textureNeedsReloading = true;\r
}\r
\r
{\r
for (int i = images.size(); --i >= 0;)\r
{\r
- CachedImage& ci = *images.getUnchecked(i);\r
+ auto& ci = *images.getUnchecked(i);\r
\r
if (ci.pixelData == im)\r
{\r
}\r
}\r
\r
- CachedImage* findCachedImage (ImagePixelData* const pixelData) const\r
+ CachedImage* findCachedImage (ImagePixelData* pixelData) const\r
{\r
- for (int i = 0; i < images.size(); ++i)\r
- {\r
- CachedImage* c = images.getUnchecked(i);\r
-\r
- if (c->pixelData == pixelData)\r
- return c;\r
- }\r
+ for (auto& i : images)\r
+ if (i->pixelData == pixelData)\r
+ return i;\r
\r
- return nullptr;\r
+ return {};\r
}\r
\r
void removeOldestItem()\r
{\r
CachedImage* oldest = nullptr;\r
\r
- for (int i = 0; i < images.size(); ++i)\r
- {\r
- CachedImage* c = images.getUnchecked(i);\r
-\r
- if (oldest == nullptr || c->lastUsed < oldest->lastUsed)\r
- oldest = c;\r
- }\r
+ for (auto& i : images)\r
+ if (oldest == nullptr || i->lastUsed < oldest->lastUsed)\r
+ oldest = i;\r
\r
if (oldest != nullptr)\r
{\r
maskTexture (context)\r
{}\r
\r
- typedef ReferenceCountedObjectPtr<ShaderPrograms> Ptr;\r
+ using Ptr = ReferenceCountedObjectPtr<ShaderPrograms>;\r
\r
//==============================================================================\r
struct ShaderProgramHolder\r
}\r
\r
OpenGLShaderProgram::Attribute positionAttribute, colourAttribute;\r
-\r
- private:\r
OpenGLShaderProgram::Uniform screenBounds;\r
+ std::function<void(OpenGLShaderProgram&)> onShaderActivated;\r
};\r
\r
struct MaskedShaderParams\r
{\r
struct BlendingMode\r
{\r
- BlendingMode() noexcept\r
- : blendingEnabled (false), srcFunction (0), dstFunction (0)\r
- {}\r
+ BlendingMode() noexcept {}\r
\r
void resync() noexcept\r
{\r
}\r
\r
private:\r
- bool blendingEnabled;\r
- GLenum srcFunction, dstFunction;\r
+ bool blendingEnabled = false;\r
+ GLenum srcFunction = 0, dstFunction = 0;\r
};\r
\r
//==============================================================================\r
//==============================================================================\r
struct ActiveTextures\r
{\r
- ActiveTextures (const OpenGLContext& c) noexcept\r
- : texturesEnabled (0), currentActiveTexture (-1), context (c)\r
+ ActiveTextures (const OpenGLContext& c) noexcept : context (c)\r
{}\r
\r
void clear() noexcept\r
setActiveTexture (0);\r
bindTexture (texture1);\r
}\r
+\r
JUCE_CHECK_OPENGL_ERROR\r
}\r
\r
\r
private:\r
GLuint currentTextureID[3];\r
- int texturesEnabled, currentActiveTexture;\r
+ int texturesEnabled = 0, currentActiveTexture = -1;\r
const OpenGLContext& context;\r
\r
ActiveTextures& operator= (const ActiveTextures&);\r
shader.program.use();\r
shader.bindAttributes (context);\r
\r
+ if (shader.onShaderActivated)\r
+ shader.onShaderActivated (shader.program);\r
+\r
currentBounds = bounds;\r
shader.set2DBounds (bounds.toFloat());\r
\r
//==============================================================================\r
struct SavedState : public RenderingHelpers::SavedStateBase<SavedState>\r
{\r
- typedef RenderingHelpers::SavedStateBase<SavedState> BaseClass;\r
+ using BaseClass = RenderingHelpers::SavedStateBase<SavedState>;\r
\r
SavedState (GLState* s) : BaseClass (s->target.bounds), state (s)\r
{}\r
}\r
}\r
\r
- typedef RenderingHelpers::GlyphCache<RenderingHelpers::CachedGlyphEdgeTable<SavedState>, SavedState> GlyphCacheType;\r
+ using GlyphCacheType = RenderingHelpers::GlyphCache<RenderingHelpers::CachedGlyphEdgeTable<SavedState>, SavedState>;\r
\r
void drawGlyph (int glyphNumber, const AffineTransform& trans)\r
{\r
auto t = transform.getTransformWith (AffineTransform::scale (fontHeight * font.getHorizontalScale(), fontHeight)\r
.followedBy (trans));\r
\r
- const ScopedPointer<EdgeTable> et (font.getTypeface()->getEdgeTableForGlyph (glyphNumber, t, fontHeight));\r
+ const std::unique_ptr<EdgeTable> et (font.getTypeface()->getEdgeTableForGlyph (glyphNumber, t, fontHeight));\r
\r
if (et != nullptr)\r
fillShape (new EdgeTableRegionType (*et), false);\r
\r
private:\r
Image transparencyLayer;\r
- ScopedPointer<Target> previousTarget;\r
+ std::unique_ptr<Target> previousTarget;\r
\r
SavedState& operator= (const SavedState&);\r
};\r
return nullptr;\r
}\r
\r
- static CustomProgram* getOrCreate (LowLevelGraphicsContext& gc, const String& hashName, const String& code, String& errorMessage)\r
+ static CustomProgram* getOrCreate (LowLevelGraphicsContext& gc, const String& hashName,\r
+ const String& code, String& errorMessage)\r
{\r
if (auto* c = get (hashName))\r
return c;\r
\r
if (errorMessage.isEmpty())\r
{\r
- if (OpenGLContext* context = OpenGLContext::getCurrentContext())\r
+ if (auto context = OpenGLContext::getCurrentContext())\r
{\r
context->setAssociatedObject (hashName.toRawUTF8(), c);\r
return c;\r
{\r
String errorMessage;\r
\r
- if (CustomProgram* c = CustomProgram::getOrCreate (gc, hashName, code, errorMessage))\r
+ if (auto c = CustomProgram::getOrCreate (gc, hashName, code, errorMessage))\r
return &(c->program);\r
\r
- return nullptr;\r
+ return {};\r
}\r
\r
void OpenGLGraphicsContextCustomShader::fillRect (LowLevelGraphicsContext& gc, Rectangle<int> area) const\r
{\r
String errorMessage;\r
\r
- if (OpenGLRendering::ShaderContext* sc = dynamic_cast<OpenGLRendering::ShaderContext*> (&gc))\r
- if (CustomProgram* c = CustomProgram::getOrCreate (gc, hashName, code, errorMessage))\r
+ if (auto sc = dynamic_cast<OpenGLRendering::ShaderContext*> (&gc))\r
+ {\r
+ if (auto c = CustomProgram::getOrCreate (gc, hashName, code, errorMessage))\r
+ {\r
+ c->onShaderActivated = onShaderActivated;\r
sc->fillRectWithCustomShader (*c, area);\r
+ }\r
+ }\r
}\r
\r
Result OpenGLGraphicsContextCustomShader::checkCompilation (LowLevelGraphicsContext& gc)\r
/** Creates a graphics context object that will render into the given OpenGL target.\r
The caller is responsible for deleting this object when no longer needed.\r
*/\r
-LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext& target,\r
- int width, int height);\r
+LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext&, int width, int height);\r
\r
-/** Creates a graphics context object that will render into the given OpenGL target.\r
+/** Creates a graphics context object that will render into the given OpenGL framebuffer.\r
The caller is responsible for deleting this object when no longer needed.\r
*/\r
-LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext& context,\r
- OpenGLFrameBuffer& target);\r
+LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext&, OpenGLFrameBuffer&);\r
\r
-/** Creates a graphics context object that will render into the given OpenGL target.\r
+/** Creates a graphics context object that will render into the given OpenGL framebuffer,\r
+ with the given size.\r
The caller is responsible for deleting this object when no longer needed.\r
*/\r
-LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext& context,\r
+LowLevelGraphicsContext* createOpenGLGraphicsContext (OpenGLContext&,\r
unsigned int frameBufferID,\r
int width, int height);\r
\r
/** Returns the code that was used to create this object. */\r
const String& getFragmentShaderCode() const noexcept { return code; }\r
\r
+ /** Optional lambda that will be called when the shader is activated, to allow\r
+ user code to do setup tasks.\r
+ */\r
+ std::function<void(OpenGLShaderProgram&)> onShaderActivated;\r
+\r
private:\r
String code, hashName;\r
\r
OpenGLContext* currentContext = OpenGLContext::getCurrentContext();\r
jassert (currentContext != nullptr); // an OpenGL image can only be created when a valid context is active!\r
\r
- ScopedPointer<OpenGLFrameBufferImage> im (new OpenGLFrameBufferImage (*currentContext, width, height));\r
+ std::unique_ptr<OpenGLFrameBufferImage> im (new OpenGLFrameBufferImage (*currentContext, width, height));\r
\r
if (! im->initialise())\r
return ImagePixelData::Ptr();\r
\r
#include "juce_osc.h"\r
\r
-#ifndef JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT\r
- #ifndef JUCE_DEMO_RUNNER\r
- #error "juce_osc module requires your compiler to have a newer version of the standard library"\r
- #endif\r
-#else\r
-\r
#include "osc/juce_OSCTypes.cpp"\r
#include "osc/juce_OSCTimeTag.cpp"\r
#include "osc/juce_OSCArgument.cpp"\r
#include "osc/juce_OSCBundle.cpp"\r
#include "osc/juce_OSCReceiver.cpp"\r
#include "osc/juce_OSCSender.cpp"\r
-\r
-#endif\r
\r
ID: juce_osc\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE OSC classes\r
description: Open Sound Control implementation.\r
website: http://www.juce.com/juce\r
#include <juce_core/juce_core.h>\r
#include <juce_events/juce_events.h>\r
\r
-#ifndef JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT\r
- #ifndef JUCE_DEMO_RUNNER\r
- #error "juce_osc module requires your compiler to have a newer version of the standard library"\r
- #endif\r
-#else\r
-\r
//==============================================================================\r
#include "osc/juce_OSCTypes.h"\r
#include "osc/juce_OSCTimeTag.h"\r
#include "osc/juce_OSCBundle.h"\r
#include "osc/juce_OSCReceiver.h"\r
#include "osc/juce_OSCSender.h"\r
-\r
-#endif\r
template <typename CharPointerType>\r
class OSCPatternMatcherImpl\r
{\r
- typedef CharPointerType CharPtr;\r
+ using CharPtr = CharPointerType;\r
\r
public:\r
//==============================================================================\r
template <typename OSCAddressType>\r
struct OSCAddressTokeniser\r
{\r
- typedef OSCAddressTokeniserTraits<OSCAddressType> Traits;\r
+ using Traits = OSCAddressTokeniserTraits<OSCAddressType>;\r
\r
//==============================================================================\r
static bool isPrintableASCIIChar (juce_wchar c) noexcept\r
bundle = nullptr;\r
\r
if (other.isMessage())\r
- message = new OSCMessage (other.getMessage());\r
+ message.reset (new OSCMessage (other.getMessage()));\r
else\r
- bundle = new OSCBundle (other.getBundle());\r
+ bundle.reset (new OSCBundle (other.getBundle()));\r
}\r
}\r
\r
\r
private:\r
//==============================================================================\r
- ScopedPointer<OSCMessage> message;\r
- ScopedPointer<OSCBundle> bundle;\r
+ std::unique_ptr<OSCMessage> message;\r
+ std::unique_ptr<OSCBundle> bundle;\r
};\r
\r
//==============================================================================\r
if (input.getNumBytesRemaining() < 4)\r
throw OSCFormatError ("OSC input stream exhausted while reading string");\r
\r
- const size_t posBegin = (size_t) getPosition();\r
- String s (input.readString());\r
- const size_t posEnd = (size_t) getPosition();\r
+ auto posBegin = (size_t) getPosition();\r
+ auto s = input.readString();\r
+ auto posEnd = (size_t) getPosition();\r
\r
if (static_cast<const char*> (getData()) [posEnd - 1] != '\0')\r
throw OSCFormatError ("OSC input stream exhausted before finding null terminator of string");\r
if (input.getNumBytesRemaining() < 4)\r
throw OSCFormatError ("OSC input stream exhausted while reading blob");\r
\r
- const size_t blobDataSize = (size_t) input.readIntBigEndian();\r
+ auto blobDataSize = (size_t) input.readIntBigEndian();\r
\r
if ((size_t) input.getNumBytesRemaining() < (blobDataSize + 3) % 4)\r
throw OSCFormatError ("OSC input stream exhausted before reaching end of blob");\r
\r
MemoryBlock blob;\r
\r
- const size_t bytesRead = input.readIntoMemoryBlock (blob, (ssize_t) blobDataSize);\r
+ auto bytesRead = input.readIntoMemoryBlock (blob, (ssize_t) blobDataSize);\r
readPaddingZeros (bytesRead);\r
\r
return blob;\r
//==============================================================================\r
OSCMessage readMessage()\r
{\r
- OSCAddressPattern ap = readAddressPattern();\r
- OSCTypeList types = readTypeTagString();\r
+ auto ap = readAddressPattern();\r
+ auto types = readTypeTagString();\r
\r
OSCMessage msg (ap);\r
\r
struct OSCReceiver::Pimpl : private Thread,\r
private MessageListener\r
{\r
- Pimpl() : Thread ("JUCE OSC server")\r
+ Pimpl (const String& threadName) : Thread (threadName)\r
{\r
}\r
\r
addListenerWithAddress (listenerToAdd, addressToMatch, listenersWithAddress);\r
}\r
\r
- void addListener (ListenerWithOSCAddress<RealtimeCallback>* listenerToAdd,\r
- OSCAddress addressToMatch)\r
+ void addListener (ListenerWithOSCAddress<RealtimeCallback>* listenerToAdd, OSCAddress addressToMatch)\r
{\r
addListenerWithAddress (listenerToAdd, addressToMatch, realtimeListenersWithAddress);\r
}\r
\r
try\r
{\r
- OSCBundle::Element content = inStream.readElementWithKnownSize (dataSize);\r
+ auto content = inStream.readElementWithKnownSize (dataSize);\r
\r
// realtime listeners should receive the OSC content first - and immediately\r
// on this thread:\r
//==============================================================================\r
void callListeners (const OSCBundle::Element& content)\r
{\r
- typedef OSCReceiver::Listener<OSCReceiver::MessageLoopCallback> Listener;\r
+ using Listener = OSCReceiver::Listener<OSCReceiver::MessageLoopCallback>;\r
\r
if (content.isMessage())\r
{\r
\r
void callRealtimeListeners (const OSCBundle::Element& content)\r
{\r
- typedef OSCReceiver::Listener<OSCReceiver::RealtimeCallback> Listener;\r
+ using Listener = OSCReceiver::Listener<OSCReceiver::RealtimeCallback>;\r
\r
if (content.isMessage())\r
{\r
};\r
\r
//==============================================================================\r
-OSCReceiver::OSCReceiver() : pimpl (new Pimpl())\r
+OSCReceiver::OSCReceiver (const String& threadName) : pimpl (new Pimpl (threadName))\r
+{\r
+}\r
+\r
+OSCReceiver::OSCReceiver() : OSCReceiver ("JUCE OSC server")\r
{\r
}\r
\r
{\r
public:\r
//==============================================================================\r
- /** Constructs a new OSCReceiver. */\r
+ /** Creates an OSCReceiver. */\r
OSCReceiver();\r
\r
+ /** Creates an OSCReceiver with a specific name for its thread. */\r
+ OSCReceiver (const String& threadName);\r
+\r
/** Destructor. */\r
~OSCReceiver();\r
\r
The arguments passed are the pointer to and the data of the buffer that\r
the OSCReceiver has failed to parse.\r
*/\r
- typedef std::function<void (const char* data, int dataSize)> FormatErrorHandler;\r
+ using FormatErrorHandler = std::function<void (const char* data, int dataSize)>;\r
\r
/** Installs a custom error handler which is called in case the receiver\r
encounters a stream it cannot parse as an OSC bundle or OSC message.\r
struct Pimpl;\r
friend struct Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
friend struct OSCReceiverCallbackMessage;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OSCReceiver)\r
struct Pimpl;\r
friend struct Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OSCSender)\r
};\r
struct Pimpl;\r
friend struct Pimpl;\r
\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
#endif\r
};\r
\r
\r
ID: juce_product_unlocking\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE Online marketplace support\r
description: Classes for online product authentication\r
website: http://www.juce.com/juce\r
OnlineUnlockStatus::UnlockResult result;\r
String email, password;\r
\r
- ScopedPointer<TextButton> cancelButton;\r
+ std::unique_ptr<TextButton> cancelButton;\r
\r
JUCE_LEAK_DETECTOR (OnlineUnlockForm::OverlayComp)\r
};\r
\r
private:\r
OnlineUnlockStatus& status;\r
- ScopedPointer<BubbleMessageComponent> bubble;\r
+ std::unique_ptr<BubbleMessageComponent> bubble;\r
\r
bool showOverlayCancelButton;\r
\r
RSAKey key (rsaPublicKey);\r
jassert (key.isValid());\r
\r
- ScopedPointer<XmlElement> xml;\r
+ std::unique_ptr<XmlElement> xml;\r
\r
if (! val.isZero())\r
{\r
\r
static bool canConnectToWebsite (const URL& url)\r
{\r
- ScopedPointer<InputStream> in (url.createInputStream (false, nullptr, nullptr, String(), 2000, nullptr));\r
+ std::unique_ptr<InputStream> in (url.createInputStream (false, nullptr, nullptr, String(), 2000, nullptr));\r
return in != nullptr;\r
}\r
\r
\r
DBG ("Reply from server: " << reply);\r
\r
- ScopedPointer<XmlElement> xml (XmlDocument::parse (reply));\r
+ std::unique_ptr<XmlElement> xml (XmlDocument::parse (reply));\r
\r
if (xml != nullptr)\r
return handleXmlReply (*xml);\r
\r
private:\r
CriticalSection streamCreationLock;\r
- ScopedPointer<WebInputStream> stream;\r
+ std::unique_ptr<WebInputStream> stream;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TracktionMarketplaceStatus)\r
};\r
serviceConnection.get(), 1 /*BIND_AUTO_CREATE*/);\r
\r
if (threadPool == nullptr)\r
- threadPool = new ThreadPool (1);\r
+ threadPool.reset (new ThreadPool (1));\r
}\r
\r
~Pimpl()\r
//==============================================================================\r
InAppPurchases& owner;\r
GlobalRef inAppBillingService, serviceConnection;\r
- ScopedPointer<ThreadPool> threadPool;\r
+ std::unique_ptr<ThreadPool> threadPool;\r
\r
CriticalSection getProductsInformationJobResultsLock,\r
getProductsBoughtJobResultsLock,\r
namespace juce\r
{\r
\r
-template <> struct ContainerDeletePolicy<SKProductsRequest> { static void destroy (NSObject* o) { [o release]; } };\r
-template <> struct ContainerDeletePolicy<SKReceiptRefreshRequest> { static void destroy (NSObject* o) { [o release]; } };\r
-template <> struct ContainerDeletePolicy<NSObject<SKProductsRequestDelegate,SKPaymentTransactionObserver>> { static void destroy (NSObject* o) { [o release]; } };\r
-\r
-\r
-//==============================================================================\r
struct SKDelegateAndPaymentObserver\r
{\r
SKDelegateAndPaymentObserver() : delegate ([getClass().createInstance() init])\r
{\r
- Class::setThis (delegate, this);\r
+ Class::setThis (delegate.get(), this);\r
}\r
\r
virtual ~SKDelegateAndPaymentObserver() {}\r
virtual void updatedDownloads (SKPaymentQueue*, NSArray<SKDownload*>*) = 0;\r
\r
protected:\r
- ScopedPointer<NSObject<SKProductsRequestDelegate, SKPaymentTransactionObserver>> delegate;\r
+ std::unique_ptr<NSObject<SKProductsRequestDelegate, SKPaymentTransactionObserver>, NSObjectDeleter> delegate;\r
\r
private:\r
struct Class : public ObjCClass<NSObject<SKProductsRequestDelegate, SKPaymentTransactionObserver>>\r
};\r
\r
Type type;\r
- ScopedPointer<SKProductsRequest> request;\r
+ std::unique_ptr<SKProductsRequest, NSObjectDeleter> request;\r
};\r
\r
/** Represents a pending request started from [SKReceiptRefreshRequest start]. */\r
struct PendingReceiptRefreshRequest\r
{\r
String subscriptionsSharedSecret;\r
- ScopedPointer<SKReceiptRefreshRequest> request;\r
+ std::unique_ptr<SKReceiptRefreshRequest, NSObjectDeleter> request;\r
};\r
\r
/** Represents a transaction with pending downloads. Only after all downloads\r
};\r
\r
//==============================================================================\r
- Pimpl (InAppPurchases& p) : owner (p) { [[SKPaymentQueue defaultQueue] addTransactionObserver: delegate]; }\r
- ~Pimpl() noexcept { [[SKPaymentQueue defaultQueue] removeTransactionObserver: delegate]; }\r
+ Pimpl (InAppPurchases& p) : owner (p) { [[SKPaymentQueue defaultQueue] addTransactionObserver: delegate.get()]; }\r
+ ~Pimpl() noexcept { [[SKPaymentQueue defaultQueue] removeTransactionObserver: delegate.get()]; }\r
\r
//==============================================================================\r
bool isInAppPurchasesSupported() const { return true; }\r
{\r
auto* productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithArray: createNSArrayFromStringArray (productIdentifiers)]];\r
\r
- pendingProductInfoRequests.add (new PendingProductInfoRequest {PendingProductInfoRequest::Type::query, productsRequest});\r
+ pendingProductInfoRequests.add (new PendingProductInfoRequest { PendingProductInfoRequest::Type::query,\r
+ std::unique_ptr<SKProductsRequest, NSObjectDeleter> (productsRequest) });\r
\r
- productsRequest.delegate = delegate;\r
+ productsRequest.delegate = delegate.get();\r
[productsRequest start];\r
}\r
\r
auto* productIdentifiers = [NSArray arrayWithObject: juceStringToNS (productIdentifier)];\r
auto* productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:productIdentifiers]];\r
\r
- pendingProductInfoRequests.add (new PendingProductInfoRequest {PendingProductInfoRequest::Type::purchase, productsRequest});\r
+ pendingProductInfoRequests.add (new PendingProductInfoRequest { PendingProductInfoRequest::Type::purchase,\r
+ std::unique_ptr<SKProductsRequest, NSObjectDeleter> (productsRequest) });\r
\r
- productsRequest.delegate = delegate;\r
+ productsRequest.delegate = delegate.get();\r
[productsRequest start];\r
}\r
\r
{\r
auto* receiptRequest = [[SKReceiptRefreshRequest alloc] init];\r
\r
- pendingReceiptRefreshRequests.add (new PendingReceiptRefreshRequest {subscriptionsSharedSecret,\r
- [receiptRequest retain]});\r
- receiptRequest.delegate = delegate;\r
+ pendingReceiptRefreshRequests.add (new PendingReceiptRefreshRequest { subscriptionsSharedSecret,\r
+ std::unique_ptr<SKReceiptRefreshRequest, NSObjectDeleter> ([receiptRequest retain]) });\r
+ receiptRequest.delegate = delegate.get();\r
[receiptRequest start];\r
}\r
}\r
{\r
auto& pendingRequest = *pendingProductInfoRequests[i];\r
\r
- if (pendingRequest.request == request)\r
+ if (pendingRequest.request.get() == request)\r
{\r
if (pendingRequest.type == PendingProductInfoRequest::Type::query) notifyProductsInfoReceived (response.products);\r
else if (pendingRequest.type == PendingProductInfoRequest::Type::purchase) startPurchase (response.products);\r
{\r
auto& pendingRequest = *pendingReceiptRefreshRequests[i];\r
\r
- if (pendingRequest.request == receiptRefreshRequest)\r
+ if (pendingRequest.request.get() == receiptRefreshRequest)\r
{\r
processReceiptRefreshResponseWithSubscriptionsSharedSecret (pendingRequest.subscriptionsSharedSecret);\r
pendingReceiptRefreshRequests.remove (i);\r
{\r
auto& pendingRequest = *pendingReceiptRefreshRequests[i];\r
\r
- if (pendingRequest.request == receiptRefreshRequest)\r
+ if (pendingRequest.request.get() == receiptRefreshRequest)\r
{\r
auto errorDetails = error != nil ? (", " + nsStringToJuce ([error localizedDescription])) : String();\r
owner.listeners.call ([&] (Listener& l) { l.purchasesListRestored ({}, false, NEEDS_TRANS ("Receipt fetch failed") + errorDetails); });\r
namespace juce\r
{\r
\r
-#if JUCE_MAC || JUCE_IOS\r
+#if JUCE_MAC\r
#include "../native/juce_mac_CameraDevice.h"\r
#elif JUCE_WINDOWS\r
#include "../native/juce_win32_CameraDevice.h"\r
+#elif JUCE_IOS\r
+ #if JUCE_CLANG\r
+ #pragma clang diagnostic push\r
+ #pragma clang diagnostic ignored "-Wunguarded-availability-new"\r
+ #endif\r
+\r
+ #include "../native/juce_ios_CameraDevice.h"\r
+\r
+ #if JUCE_CLANG\r
+ #pragma clang diagnostic pop\r
+ #endif\r
#elif JUCE_ANDROID\r
#include "../native/juce_android_CameraDevice.h"\r
#endif\r
\r
+#if JUCE_ANDROID || JUCE_IOS\r
+//==============================================================================\r
+class CameraDevice::CameraFactory\r
+{\r
+public:\r
+ static CameraFactory& getInstance()\r
+ {\r
+ static CameraFactory factory;\r
+ return factory;\r
+ }\r
+\r
+ void openCamera (int index, OpenCameraResultCallback resultCallback,\r
+ int minWidth, int minHeight, int maxWidth, int maxHeight, bool useHighQuality)\r
+ {\r
+ auto cameraId = getAvailableDevices()[index];\r
+\r
+ if (getCameraIndex (cameraId) != -1)\r
+ {\r
+ // You are trying to open the same camera twice.\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ std::unique_ptr<CameraDevice> device (new CameraDevice (cameraId, index,\r
+ minWidth, minHeight, maxWidth,\r
+ maxHeight, useHighQuality));\r
+\r
+ camerasToOpen.add ({ nextRequestId++,\r
+ std::unique_ptr<CameraDevice> (device.release()),\r
+ resultCallback });\r
+\r
+ auto& pendingOpen = camerasToOpen.getReference (camerasToOpen.size() - 1);\r
+\r
+ pendingOpen.device->pimpl->open ([this](const String& deviceId, const String& error)\r
+ {\r
+ int index = getCameraIndex (deviceId);\r
+\r
+ if (index == -1)\r
+ return;\r
+\r
+ auto& pendingOpen = camerasToOpen.getReference (index);\r
+\r
+ if (error.isEmpty())\r
+ pendingOpen.resultCallback (pendingOpen.device.release(), error);\r
+ else\r
+ pendingOpen.resultCallback (nullptr, error);\r
+\r
+ int id = pendingOpen.requestId;\r
+\r
+ MessageManager::callAsync ([this, id]() { removeRequestWithId (id); });\r
+ });\r
+ }\r
+\r
+private:\r
+ int getCameraIndex (const String& cameraId) const\r
+ {\r
+ for (int i = 0; i < camerasToOpen.size(); ++i)\r
+ {\r
+ auto& pendingOpen = camerasToOpen.getReference (i);\r
+\r
+ if (pendingOpen.device->pimpl->getCameraId() == cameraId)\r
+ return i;\r
+ }\r
+\r
+ return -1;\r
+ }\r
+\r
+ void removeRequestWithId (int id)\r
+ {\r
+ for (int i = camerasToOpen.size(); --i >= 0;)\r
+ {\r
+ if (camerasToOpen.getReference (i).requestId == id)\r
+ {\r
+ camerasToOpen.remove (i);\r
+ return;\r
+ }\r
+ }\r
+ }\r
+\r
+ struct PendingCameraOpen\r
+ {\r
+ int requestId;\r
+ std::unique_ptr<CameraDevice> device;\r
+ OpenCameraResultCallback resultCallback;\r
+ };\r
+\r
+ Array<PendingCameraOpen> camerasToOpen;\r
+ static int nextRequestId;\r
+};\r
+\r
+int CameraDevice::CameraFactory::nextRequestId = 0;\r
+\r
+#endif\r
+\r
//==============================================================================\r
CameraDevice::CameraDevice (const String& nm, int index, int minWidth, int minHeight, int maxWidth, int maxHeight, bool useHighQuality)\r
- : name (nm), pimpl (new Pimpl (name, index, minWidth, minHeight, maxWidth, maxHeight, useHighQuality))\r
+ : name (nm), pimpl (new Pimpl (*this, name, index, minWidth, minHeight, maxWidth, maxHeight, useHighQuality))\r
{\r
}\r
\r
CameraDevice::~CameraDevice()\r
{\r
+ jassert (juce::MessageManager::getInstance()->currentThreadHasLockedMessageManager());\r
+\r
stopRecording();\r
pimpl.reset();\r
}\r
return new ViewerComponent (*this);\r
}\r
\r
+void CameraDevice::takeStillPicture (std::function<void (const Image&)> pictureTakenCallback)\r
+{\r
+ pimpl->takeStillPicture (pictureTakenCallback);\r
+}\r
+\r
void CameraDevice::startRecordingToFile (const File& file, int quality)\r
{\r
stopRecording();\r
int maxWidth, int maxHeight,\r
bool useHighQuality)\r
{\r
- if (ScopedPointer<CameraDevice> d = new CameraDevice (getAvailableDevices() [index], index,\r
- minWidth, minHeight, maxWidth, maxHeight, useHighQuality))\r
- if (d->pimpl->openedOk())\r
- return d.release();\r
+ jassert (juce::MessageManager::getInstance()->currentThreadHasLockedMessageManager());\r
+\r
+ #if ! JUCE_ANDROID && ! JUCE_IOS\r
+ std::unique_ptr<CameraDevice> d (new CameraDevice (getAvailableDevices() [index], index,\r
+ minWidth, minHeight, maxWidth, maxHeight, useHighQuality));\r
+ if (d != nullptr && d->pimpl->openedOk())\r
+ return d.release();\r
+ #else\r
+ ignoreUnused (index, minWidth, minHeight);\r
+ ignoreUnused (maxWidth, maxHeight, useHighQuality);\r
+\r
+ // Use openDeviceAsync to open a camera device on iOS or Android.\r
+ jassertfalse;\r
+ #endif\r
\r
return nullptr;\r
}\r
\r
+void CameraDevice::openDeviceAsync (int index, OpenCameraResultCallback resultCallback,\r
+ int minWidth, int minHeight, int maxWidth, int maxHeight, bool useHighQuality)\r
+{\r
+ jassert (juce::MessageManager::getInstance()->currentThreadHasLockedMessageManager());\r
+\r
+ if (resultCallback == nullptr)\r
+ {\r
+ // A valid callback must be passed.\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ #if JUCE_ANDROID || JUCE_IOS\r
+ CameraFactory::getInstance().openCamera (index, static_cast<OpenCameraResultCallback&&> (resultCallback),\r
+ minWidth, minHeight, maxWidth, maxHeight, useHighQuality);\r
+ #else\r
+ auto* device = openDevice (index, minWidth, minHeight, maxWidth, maxHeight, useHighQuality);\r
+\r
+ resultCallback (device, device != nullptr ? String() : "Could not open camera device");\r
+ #endif\r
+}\r
+\r
} // namespace juce\r
Controls any video capture devices that might be available.\r
\r
Use getAvailableDevices() to list the devices that are attached to the\r
- system, then call openDevice to open one for use. Once you have a CameraDevice\r
- object, you can get a viewer component from it, and use its methods to\r
- stream to a file or capture still-frames.\r
+ system, then call openDevice() or openDeviceAsync() to open one for use.\r
+ Once you have a CameraDevice object, you can get a viewer component from it,\r
+ and use its methods to stream to a file or capture still-frames.\r
\r
@tags{Video}\r
*/\r
//==============================================================================\r
/** Returns a list of the available cameras on this machine.\r
\r
- You can open one of these devices by calling openDevice().\r
+ You can open one of these devices by calling openDevice() or openDeviceAsync().\r
*/\r
static StringArray getAvailableDevices();\r
\r
- /** Opens a camera device.\r
+ /** Synchronously opens a camera device. This function should not be used on iOS or\r
+ Android, use openDeviceAsync() instead.\r
\r
The index parameter indicates which of the items returned by getAvailableDevices()\r
to open.\r
\r
The size constraints allow the method to choose between different resolutions if\r
- the camera supports this. If the resolution cam't be specified (e.g. on the Mac)\r
+ the camera supports this. If the resolution can't be specified (e.g. on the Mac)\r
then these will be ignored.\r
\r
On Mac, if highQuality is false, then the camera will be opened in preview mode\r
int maxWidth = 1024, int maxHeight = 768,\r
bool highQuality = true);\r
\r
+ using OpenCameraResultCallback = std::function<void (CameraDevice*, const String& /*error*/)>;\r
+\r
+ /** Asynchronously opens a camera device on iOS (iOS 7+) or Android (API 21+).\r
+ On other platforms, the function will simply call openDevice(). Upon completion,\r
+ resultCallback will be invoked with valid CameraDevice* and an empty error\r
+ String on success, or nullptr CameraDevice and a non-empty error String on failure.\r
+\r
+ This is the preferred method of opening a camera device, because it works on all\r
+ platforms, whereas synchronous openDevice() does not work on iOS & Android.\r
+\r
+ The index parameter indicates which of the items returned by getAvailableDevices()\r
+ to open.\r
+\r
+ The size constraints allow the method to choose between different resolutions if\r
+ the camera supports this. If the resolution can't be specified then these will be\r
+ ignored.\r
+\r
+ On iOS, if you want to switch a device, it is more efficient to open a new device\r
+ before closing the older one, because this way both devices can share the same\r
+ underlying camera session. Otherwise, the session needs to be close first, and this\r
+ is a lengthy process that can take several seconds.\r
+\r
+ The Android implementation currently supports a maximum recording resolution of\r
+ 1080p. Choosing a larger size will result in larger pictures taken, but the video\r
+ will be capped at 1080p.\r
+ */\r
+ static void openDeviceAsync (int deviceIndex,\r
+ OpenCameraResultCallback resultCallback,\r
+ int minWidth = 128, int minHeight = 64,\r
+ int maxWidth = 1024, int maxHeight = 768,\r
+ bool highQuality = true);\r
+\r
//==============================================================================\r
/** Returns the name of this device */\r
const String& getName() const noexcept { return name; }\r
\r
/** Creates a component that can be used to display a preview of the\r
video from this camera.\r
+\r
+ Note: while you can change the size of the preview component, the actual\r
+ preview display may be smaller than the size requested, because the correct\r
+ aspect ratio is maintained automatically.\r
*/\r
Component* createViewerComponent();\r
\r
//==============================================================================\r
+ /** Triggers a still picture capture. Upon completion, pictureTakenCallback will\r
+ be invoked on a message thread.\r
+\r
+ On Android, before calling takeStillPicture(), you need to create a preview with\r
+ createViewerComponent() and you need to make it visible on screen.\r
+\r
+ Android does not support simultaneous video recording and still picture capture.\r
+ */\r
+ void takeStillPicture (std::function<void (const Image&)> pictureTakenCallback);\r
+\r
/** Starts recording video to the specified file.\r
\r
You should use getFileExtension() to find out the correct extension to\r
\r
The quality parameter can be 0, 1, or 2, to indicate low, medium, or high. It may\r
or may not be used, depending on the driver.\r
+\r
+ On Android, before calling startRecordingToFile(), you need to create a preview with\r
+ createViewerComponent() and you need to make it visible on screen.\r
+\r
+ The Android camera also requires exclusive access to the audio device, so make sure\r
+ you close any open audio devices with AudioDeviceManager::closeAudioDevice() first.\r
+\r
+ Android does not support simultaneous video recording and still picture capture.\r
+\r
+ @see AudioDeviceManager::closeAudioDevice, AudioDeviceManager::restartLastAudioDevice\r
*/\r
void startRecordingToFile (const File& file, int quality = 2);\r
\r
*/\r
Time getTimeOfFirstRecordedFrame() const;\r
\r
+ /** Set this callback to be notified whenever an error occurs. You may need to close\r
+ and reopen the device to be able to use it further. */\r
+ std::function<void (const String& /*error*/)> onErrorOccurred;\r
+\r
//==============================================================================\r
/**\r
- Receives callbacks with images from a CameraDevice.\r
+ Receives callbacks with individual frames from a CameraDevice. It is mainly\r
+ useful for processing multiple frames that has to be done as quickly as\r
+ possible. The callbacks can be called from any thread.\r
+\r
+ If you just need to take one picture, you should use takeStillPicture() instead.\r
\r
@see CameraDevice::addListener\r
*/\r
This may be called by any thread, so be careful about thread-safety,\r
and make sure that you process the data as quickly as possible to\r
avoid glitching!\r
+\r
+ Simply add a listener to be continuously notified about new frames becoming\r
+ available and remove the listener when you no longer need new frames.\r
+\r
+ If you just need to take one picture, use takeStillPicture() instead.\r
+\r
+ @see CameraDevice::takeStillPicture\r
*/\r
virtual void imageReceived (const Image& image) = 0;\r
};\r
struct Pimpl;\r
friend struct Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
struct ViewerComponent;\r
friend struct ViewerComponent;\r
CameraDevice (const String& name, int index,\r
int minWidth, int minHeight, int maxWidth, int maxHeight, bool highQuality);\r
\r
+ #if JUCE_ANDROID || JUCE_IOS\r
+ class CameraFactory;\r
+ #endif\r
+\r
+ #if JUCE_ANDROID\r
+ friend void juce_cameraDeviceStateClosed (int64);\r
+ friend void juce_cameraDeviceStateDisconnected (int64);\r
+ friend void juce_cameraDeviceStateError (int64, int);\r
+ friend void juce_cameraDeviceStateOpened (int64, void*);\r
+\r
+ friend void juce_cameraCaptureSessionActive (int64, void*);\r
+ friend void juce_cameraCaptureSessionClosed (int64, void*);\r
+ friend void juce_cameraCaptureSessionConfigureFailed (int64, void*);\r
+ friend void juce_cameraCaptureSessionConfigured (int64, void*);\r
+ friend void juce_cameraCaptureSessionReady (int64, void*);\r
+\r
+ friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+ friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+\r
+ friend void juce_deviceOrientationChanged (int64, int);\r
+ #endif\r
+\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CameraDevice)\r
};\r
\r
\r
ID: juce_video\r
vendor: juce\r
- version: 5.3.1\r
+ version: 5.3.2\r
name: JUCE video playback and capture classes\r
description: Classes for playing video and capturing camera input.\r
website: http://www.juce.com/juce\r
\r
//=============================================================================\r
/** Config: JUCE_USE_CAMERA\r
- Enables web-cam support using the CameraDevice class (Mac and Windows).\r
+ Enables camera support using the CameraDevice class (Mac, Windows, iOS, Android).\r
*/\r
#ifndef JUCE_USE_CAMERA\r
#define JUCE_USE_CAMERA 0\r
#endif\r
\r
-#if ! (JUCE_MAC || JUCE_WINDOWS)\r
+#ifndef JUCE_CAMERA_LOG_ENABLED\r
+ #define JUCE_CAMERA_LOG_ENABLED 0\r
+#endif\r
+\r
+#if JUCE_CAMERA_LOG_ENABLED\r
+ #define JUCE_CAMERA_LOG(x) DBG(x)\r
+#else\r
+ #define JUCE_CAMERA_LOG(x) {}\r
+#endif\r
+\r
+#if ! (JUCE_MAC || JUCE_WINDOWS || JUCE_IOS || JUCE_ANDROID)\r
#undef JUCE_USE_CAMERA\r
#endif\r
\r
==============================================================================\r
*/\r
\r
+#if __ANDROID_API__ >= 21\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ STATICMETHOD (valueOf, "valueOf", "(Ljava/lang/String;)Landroid/graphics/Bitmap$CompressFormat;")\r
+\r
+DECLARE_JNI_CLASS (AndroidBitmapCompressFormat, "android/graphics/Bitmap$CompressFormat");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (close, "close", "()V") \\r
+ METHOD (createCaptureRequest, "createCaptureRequest", "(I)Landroid/hardware/camera2/CaptureRequest$Builder;") \\r
+ METHOD (createCaptureSession, "createCaptureSession", "(Ljava/util/List;Landroid/hardware/camera2/CameraCaptureSession$StateCallback;Landroid/os/Handler;)V")\r
+\r
+DECLARE_JNI_CLASS (AndroidCameraDevice, "android/hardware/camera2/CameraDevice");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (close, "close", "()V") \\r
+ METHOD (getPlanes, "getPlanes", "()[Landroid/media/Image$Plane;")\r
+\r
+DECLARE_JNI_CLASS (AndroidImage, "android/media/Image");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getBuffer, "getBuffer", "()Ljava/nio/ByteBuffer;")\r
+\r
+DECLARE_JNI_CLASS (AndroidImagePlane, "android/media/Image$Plane");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (acquireLatestImage, "acquireLatestImage", "()Landroid/media/Image;") \\r
+ METHOD (close, "close", "()V") \\r
+ METHOD (getSurface, "getSurface", "()Landroid/view/Surface;") \\r
+ METHOD (setOnImageAvailableListener, "setOnImageAvailableListener", "(Landroid/media/ImageReader$OnImageAvailableListener;Landroid/os/Handler;)V") \\r
+ STATICMETHOD (newInstance, "newInstance", "(IIII)Landroid/media/ImageReader;")\r
+\r
+DECLARE_JNI_CLASS (AndroidImageReader, "android/media/ImageReader");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "()V") \\r
+ METHOD (getSurface, "getSurface", "()Landroid/view/Surface;") \\r
+ METHOD (prepare, "prepare", "()V") \\r
+ METHOD (release, "release", "()V") \\r
+ METHOD (setAudioEncoder, "setAudioEncoder", "(I)V") \\r
+ METHOD (setAudioSource, "setAudioSource", "(I)V") \\r
+ METHOD (setOnErrorListener, "setOnErrorListener", "(Landroid/media/MediaRecorder$OnErrorListener;)V") \\r
+ METHOD (setOnInfoListener, "setOnInfoListener", "(Landroid/media/MediaRecorder$OnInfoListener;)V") \\r
+ METHOD (setOrientationHint, "setOrientationHint", "(I)V") \\r
+ METHOD (setOutputFile, "setOutputFile", "(Ljava/lang/String;)V") \\r
+ METHOD (setOutputFormat, "setOutputFormat", "(I)V") \\r
+ METHOD (setVideoEncoder, "setVideoEncoder", "(I)V") \\r
+ METHOD (setVideoEncodingBitRate, "setVideoEncodingBitRate", "(I)V") \\r
+ METHOD (setVideoFrameRate, "setVideoFrameRate", "(I)V") \\r
+ METHOD (setVideoSize, "setVideoSize", "(II)V") \\r
+ METHOD (setVideoSource, "setVideoSource", "(I)V") \\r
+ METHOD (start, "start", "()V") \\r
+ METHOD (stop, "stop", "()V")\r
+\r
+DECLARE_JNI_CLASS (AndroidMediaRecorder, "android/media/MediaRecorder");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(Landroid/content/Context;)V") \\r
+ METHOD (getSurfaceTexture, "getSurfaceTexture", "()Landroid/graphics/SurfaceTexture;") \\r
+ METHOD (isAvailable, "isAvailable", "()Z") \\r
+ METHOD (setSurfaceTextureListener, "setSurfaceTextureListener", "(Landroid/view/TextureView$SurfaceTextureListener;)V") \\r
+ METHOD (setTransform, "setTransform", "(Landroid/graphics/Matrix;)V")\r
+\r
+DECLARE_JNI_CLASS (AndroidTextureView, "android/view/TextureView");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(Landroid/graphics/SurfaceTexture;)V")\r
+\r
+DECLARE_JNI_CLASS (AndroidSurface, "android/view/Surface");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (setDefaultBufferSize, "setDefaultBufferSize", "(II)V")\r
+\r
+DECLARE_JNI_CLASS (AndroidSurfaceTexture, "android/graphics/SurfaceTexture");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getOutputSizesForClass, "getOutputSizes", "(Ljava/lang/Class;)[Landroid/util/Size;") \\r
+ METHOD (getOutputSizesForFormat, "getOutputSizes", "(I)[Landroid/util/Size;") \\r
+ METHOD (isOutputSupportedFor, "isOutputSupportedFor", "(I)Z") \\r
+ METHOD (isOutputSupportedForSurface, "isOutputSupportedFor", "(Landroid/view/Surface;)Z")\r
+\r
+DECLARE_JNI_CLASS (AndroidStreamConfigurationMap, "android/hardware/camera2/params/StreamConfigurationMap");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "()V") \\r
+ METHOD (toByteArray, "toByteArray", "()[B") \\r
+ METHOD (size, "size", "()I")\r
+\r
+DECLARE_JNI_CLASS (ByteArrayOutputStream, "java/io/ByteArrayOutputStream");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (abortCaptures, "abortCaptures", "()V") \\r
+ METHOD (capture, "capture", "(Landroid/hardware/camera2/CaptureRequest;Landroid/hardware/camera2/CameraCaptureSession$CaptureCallback;Landroid/os/Handler;)I") \\r
+ METHOD (close, "close", "()V") \\r
+ METHOD (setRepeatingRequest, "setRepeatingRequest", "(Landroid/hardware/camera2/CaptureRequest;Landroid/hardware/camera2/CameraCaptureSession$CaptureCallback;Landroid/os/Handler;)I") \\r
+ METHOD (stopRepeating, "stopRepeating", "()V")\r
+\r
+DECLARE_JNI_CLASS (CameraCaptureSession, "android/hardware/camera2/CameraCaptureSession")\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH ";JZ)V")\r
+\r
+DECLARE_JNI_CLASS (CameraCaptureSessionCaptureCallback, JUCE_ANDROID_ACTIVITY_CLASSPATH "$CameraCaptureSessionCaptureCallback");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH ";J)V")\r
+\r
+DECLARE_JNI_CLASS (CameraCaptureSessionStateCallback, JUCE_ANDROID_ACTIVITY_CLASSPATH "$CameraCaptureSessionStateCallback");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (get, "get", "(Landroid/hardware/camera2/CameraCharacteristics$Key;)Ljava/lang/Object;") \\r
+ METHOD (getKeys, "getKeys", "()Ljava/util/List;") \\r
+ STATICFIELD (CONTROL_AF_AVAILABLE_MODES, "CONTROL_AF_AVAILABLE_MODES", "Landroid/hardware/camera2/CameraCharacteristics$Key;") \\r
+ STATICFIELD (LENS_FACING, "LENS_FACING", "Landroid/hardware/camera2/CameraCharacteristics$Key;") \\r
+ STATICFIELD (SCALER_STREAM_CONFIGURATION_MAP, "SCALER_STREAM_CONFIGURATION_MAP", "Landroid/hardware/camera2/CameraCharacteristics$Key;") \\r
+ STATICFIELD (SENSOR_ORIENTATION, "SENSOR_ORIENTATION", "Landroid/hardware/camera2/CameraCharacteristics$Key;")\r
+\r
+DECLARE_JNI_CLASS (CameraCharacteristics, "android/hardware/camera2/CameraCharacteristics");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getName, "getName", "()Ljava/lang/String;")\r
+\r
+DECLARE_JNI_CLASS (CameraCharacteristicsKey, "android/hardware/camera2/CameraCharacteristics$Key");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (constructor, "<init>", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH ";J)V")\r
+\r
+DECLARE_JNI_CLASS (CameraDeviceStateCallback, JUCE_ANDROID_ACTIVITY_CLASSPATH "$CameraDeviceStateCallback");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (getCameraCharacteristics, "getCameraCharacteristics", "(Ljava/lang/String;)Landroid/hardware/camera2/CameraCharacteristics;") \\r
+ METHOD (getCameraIdList, "getCameraIdList", "()[Ljava/lang/String;") \\r
+ METHOD (openCamera, "openCamera", "(Ljava/lang/String;Landroid/hardware/camera2/CameraDevice$StateCallback;Landroid/os/Handler;)V")\r
+\r
+DECLARE_JNI_CLASS (CameraManager, "android/hardware/camera2/CameraManager");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ STATICFIELD (CONTROL_AE_PRECAPTURE_TRIGGER, "CONTROL_AE_PRECAPTURE_TRIGGER", "Landroid/hardware/camera2/CaptureRequest$Key;") \\r
+ STATICFIELD (CONTROL_AF_MODE, "CONTROL_AF_MODE", "Landroid/hardware/camera2/CaptureRequest$Key;") \\r
+ STATICFIELD (CONTROL_AF_TRIGGER, "CONTROL_AF_TRIGGER", "Landroid/hardware/camera2/CaptureRequest$Key;") \\r
+ STATICFIELD (CONTROL_MODE, "CONTROL_MODE", "Landroid/hardware/camera2/CaptureRequest$Key;")\r
+\r
+DECLARE_JNI_CLASS (CaptureRequest, "android/hardware/camera2/CaptureRequest");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (addTarget, "addTarget", "(Landroid/view/Surface;)V") \\r
+ METHOD (build, "build", "()Landroid/hardware/camera2/CaptureRequest;") \\r
+ METHOD (set, "set", "(Landroid/hardware/camera2/CaptureRequest$Key;Ljava/lang/Object;)V")\r
+\r
+DECLARE_JNI_CLASS (CaptureRequestBuilder, "android/hardware/camera2/CaptureRequest$Builder");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (get, "get", "(Landroid/hardware/camera2/CaptureResult$Key;)Ljava/lang/Object;") \\r
+ STATICFIELD (CONTROL_AE_STATE, "CONTROL_AE_STATE", "Landroid/hardware/camera2/CaptureResult$Key;") \\r
+ STATICFIELD (CONTROL_AF_STATE, "CONTROL_AF_STATE", "Landroid/hardware/camera2/CaptureResult$Key;")\r
+\r
+DECLARE_JNI_CLASS (CaptureResult, "android/hardware/camera2/CaptureResult");\r
+#undef JNI_CLASS_MEMBERS\r
+\r
+#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \\r
+ METHOD (canDetectOrientation, "canDetectOrientation", "()Z") \\r
+ METHOD (constructor, "<init>", "(L" JUCE_ANDROID_ACTIVITY_CLASSPATH ";JLandroid/content/Context;I)V") \\r
+ METHOD (disable, "disable", "()V") \\r
+ METHOD (enable, "enable", "()V")\r
+\r
+DECLARE_JNI_CLASS (OrientationEventListener, JUCE_ANDROID_ACTIVITY_CLASSPATH "$JuceOrientationEventListener");\r
+#undef JNI_CLASS_MEMBERS\r
+#endif\r
+\r
+//==============================================================================\r
+class AndroidRunnable : public juce::AndroidInterfaceImplementer\r
+{\r
+public:\r
+ struct Owner\r
+ {\r
+ virtual ~Owner() {}\r
+\r
+ virtual void run() = 0;\r
+ };\r
+\r
+ AndroidRunnable (Owner& ownerToUse)\r
+ : owner (ownerToUse)\r
+ {}\r
+\r
+private:\r
+ Owner& owner;\r
+\r
+ jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+ {\r
+ auto* env = getEnv();\r
+ auto methodName = juce::juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+ if (methodName == "run")\r
+ {\r
+ owner.run();\r
+ return nullptr;\r
+ }\r
+\r
+ // invoke base class\r
+ return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+ }\r
+};\r
+\r
+//==============================================================================\r
+class TextureViewSurfaceTextureListener : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+ struct Owner\r
+ {\r
+ virtual ~Owner() {}\r
+\r
+ virtual void onSurfaceTextureAvailable (LocalRef<jobject>& surface, int width, int height) = 0;\r
+ virtual bool onSurfaceTextureDestroyed (LocalRef<jobject>& surface) = 0;\r
+ virtual void onSurfaceTextureSizeChanged (LocalRef<jobject>& surface, int width, int height) = 0;\r
+ virtual void onSurfaceTextureUpdated (LocalRef<jobject>& surface) = 0;\r
+ };\r
+\r
+ TextureViewSurfaceTextureListener (Owner& ownerToUse)\r
+ : owner (ownerToUse)\r
+ {}\r
+\r
+ jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+ int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+ if (methodName == "onSurfaceTextureAvailable" && numArgs == 3)\r
+ {\r
+ auto surface = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+ auto width = LocalRef<jobject> (env->GetObjectArrayElement (args, 1));\r
+ auto height = LocalRef<jobject> (env->GetObjectArrayElement (args, 2));\r
+\r
+ auto widthInt = env->CallIntMethod (width, JavaInteger.intValue);\r
+ auto heightInt = env->CallIntMethod (height, JavaInteger.intValue);\r
+\r
+ owner.onSurfaceTextureAvailable (surface, widthInt, heightInt);\r
+ return nullptr;\r
+ }\r
+ else if (methodName == "onSurfaceTextureDestroyed" && numArgs == 1)\r
+ {\r
+ auto surface = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+ auto result = owner.onSurfaceTextureDestroyed (surface);\r
+\r
+ return env->CallStaticObjectMethod (JavaBoolean, JavaBoolean.valueOf, result);\r
+ }\r
+ else if (methodName == "onSurfaceTextureSizeChanged" && numArgs == 3)\r
+ {\r
+ auto surface = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+ auto width = LocalRef<jobject> (env->GetObjectArrayElement (args, 1));\r
+ auto height = LocalRef<jobject> (env->GetObjectArrayElement (args, 2));\r
+\r
+ auto widthInt = env->CallIntMethod (width, JavaInteger.intValue);\r
+ auto heightInt = env->CallIntMethod (height, JavaInteger.intValue);\r
+\r
+ owner.onSurfaceTextureSizeChanged (surface, widthInt, heightInt);\r
+ return nullptr;\r
+ }\r
+ else if (methodName == "onSurfaceTextureUpdated" && numArgs == 1)\r
+ {\r
+ auto surface = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+\r
+ owner.onSurfaceTextureUpdated (surface);\r
+ return nullptr;\r
+ }\r
+\r
+ return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+ }\r
+\r
+private:\r
+ Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
+class ImageReaderOnImageAvailableListener : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+ struct Owner\r
+ {\r
+ virtual ~Owner() {}\r
+\r
+ virtual void onImageAvailable (LocalRef<jobject>& imageReader) = 0;\r
+ };\r
+\r
+ ImageReaderOnImageAvailableListener (Owner& ownerToUse)\r
+ : owner (ownerToUse)\r
+ {}\r
+\r
+ jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+ int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+ if (methodName == "onImageAvailable" && numArgs == 1)\r
+ {\r
+ auto imageReader = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+\r
+ owner.onImageAvailable (imageReader);\r
+ return nullptr;\r
+ }\r
+\r
+ return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+ }\r
+\r
+private:\r
+ Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
+class MediaRecorderOnInfoListener : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+ struct Owner\r
+ {\r
+ virtual ~Owner() {}\r
+\r
+ virtual void onInfo (LocalRef<jobject>& mediaRecorder, int what, int extra) = 0;\r
+ };\r
+\r
+ MediaRecorderOnInfoListener (Owner& ownerToUse)\r
+ : owner (ownerToUse)\r
+ {}\r
+\r
+ jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+ int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+ if (methodName == "onInfo" && numArgs == 3)\r
+ {\r
+ auto mediaRecorder = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+ auto what = LocalRef<jobject> (env->GetObjectArrayElement (args, 1));\r
+ auto extra = LocalRef<jobject> (env->GetObjectArrayElement (args, 2));\r
+\r
+ auto whatInt = (int) env->CallIntMethod (what, JavaInteger.intValue);\r
+ auto extraInt = (int) env->CallIntMethod (extra, JavaInteger.intValue);\r
+\r
+ owner.onInfo (mediaRecorder, whatInt, extraInt);\r
+ return nullptr;\r
+ }\r
+\r
+ return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+ }\r
+\r
+private:\r
+ Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
+class MediaRecorderOnErrorListener : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+ struct Owner\r
+ {\r
+ virtual ~Owner() {}\r
+\r
+ virtual void onError (LocalRef<jobject>& mediaRecorder, int what, int extra) = 0;\r
+ };\r
+\r
+ MediaRecorderOnErrorListener (Owner& ownerToUse)\r
+ : owner (ownerToUse)\r
+ {}\r
+\r
+ jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+ int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+ if (methodName == "onError" && numArgs == 3)\r
+ {\r
+ auto mediaRecorder = LocalRef<jobject> (env->GetObjectArrayElement (args, 0));\r
+ auto what = LocalRef<jobject> (env->GetObjectArrayElement (args, 1));\r
+ auto extra = LocalRef<jobject> (env->GetObjectArrayElement (args, 2));\r
+\r
+ auto whatInt = (int) env->CallIntMethod (what, JavaInteger.intValue);\r
+ auto extraInt = (int) env->CallIntMethod (extra, JavaInteger.intValue);\r
+\r
+ owner.onError (mediaRecorder, whatInt, extraInt);\r
+ return nullptr;\r
+ }\r
+\r
+ return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+ }\r
+\r
+private:\r
+ Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
+class AppPausedResumedListener : public AndroidInterfaceImplementer\r
+{\r
+public:\r
+ struct Owner\r
+ {\r
+ virtual ~Owner() {}\r
+\r
+ virtual void appPaused() = 0;\r
+ virtual void appResumed() = 0;\r
+ };\r
+\r
+ AppPausedResumedListener (Owner& ownerToUse)\r
+ : owner (ownerToUse)\r
+ {}\r
+\r
+ jobject invoke (jobject proxy, jobject method, jobjectArray args) override\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto methodName = juceString ((jstring) env->CallObjectMethod (method, JavaMethod.getName));\r
+\r
+ int numArgs = args != nullptr ? env->GetArrayLength (args) : 0;\r
+\r
+ if (methodName == "appPaused" && numArgs == 0)\r
+ {\r
+ owner.appPaused();\r
+ return nullptr;\r
+ }\r
+\r
+ if (methodName == "appResumed" && numArgs == 0)\r
+ {\r
+ owner.appResumed();\r
+ return nullptr;\r
+ }\r
+\r
+ return AndroidInterfaceImplementer::invoke (proxy, method, args);\r
+ }\r
+\r
+private:\r
+ Owner& owner;\r
+};\r
+\r
+//==============================================================================\r
struct CameraDevice::Pimpl\r
+#if __ANDROID_API__ >= 21\r
+ : private AppPausedResumedListener::Owner\r
+#endif\r
{\r
- Pimpl (const String&, int /*index*/, int /*minWidth*/, int /*minHeight*/, int /*maxWidth*/, int /*maxHeight*/)\r
+ using InternalOpenCameraResultCallback = std::function<void (const String& /*cameraId*/, const String& /*error*/)>;\r
+\r
+ Pimpl (CameraDevice& ownerToUse, const String& cameraIdToUse, int /*index*/,\r
+ int minWidthToUse, int minHeightToUse, int maxWidthToUse, int maxHeightToUse,\r
+ bool /*useHighQuality*/)\r
+ #if __ANDROID_API__ >= 21\r
+ : owner (ownerToUse),\r
+ minWidth (minWidthToUse),\r
+ minHeight (minHeightToUse),\r
+ maxWidth (maxWidthToUse),\r
+ maxHeight (maxHeightToUse),\r
+ cameraId (cameraIdToUse),\r
+ appPausedResumedListener (*this),\r
+ appPausedResumedListenerNative (CreateJavaInterface (&appPausedResumedListener,\r
+ JUCE_ANDROID_ACTIVITY_CLASSPATH "$AppPausedResumedListener").get()),\r
+\r
+ cameraManager (initialiseCameraManager()),\r
+ cameraCharacteristics (initialiseCameraCharacteristics (cameraManager, cameraId)),\r
+ streamConfigurationMap (cameraCharacteristics),\r
+ previewDisplay (streamConfigurationMap.getPreviewBufferSize()),\r
+ deviceOrientationChangeListener (previewDisplay)\r
+ #endif\r
{\r
+ #if __ANDROID_API__ >= 21\r
+ startBackgroundThread();\r
+ #endif\r
}\r
\r
~Pimpl()\r
{\r
+ #if __ANDROID_API__ >= 21\r
+ getEnv()->CallVoidMethod (android.activity, JuceAppActivity.removeAppPausedResumedListener,\r
+ appPausedResumedListenerNative.get(), reinterpret_cast<jlong>(this));\r
+ #endif\r
+ }\r
+\r
+ #if __ANDROID_API__ < 21\r
+ // Dummy implementations for unsupported API levels.\r
+ void open (InternalOpenCameraResultCallback) {}\r
+ void takeStillPicture (std::function<void (const Image&)>) {}\r
+ void startRecordingToFile (const File&, int) {}\r
+ void stopRecording() {}\r
+\r
+ void addListener (CameraDevice::Listener*) {}\r
+ void removeListener (CameraDevice::Listener*) {}\r
+\r
+ String getCameraId() const noexcept { return {}; }\r
+ bool openedOk() const noexcept { return false; }\r
+ Time getTimeOfFirstRecordedFrame() const { return {}; }\r
+ static StringArray getAvailableDevices()\r
+ {\r
+ // Camera on Android requires API 21 or above.\r
+ jassertfalse;\r
+ return {};\r
+ }\r
+ #else\r
+ JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl)\r
+\r
+ String getCameraId() const noexcept { return cameraId; }\r
+\r
+ void open (InternalOpenCameraResultCallback cameraOpenCallbackToUse)\r
+ {\r
+ cameraOpenCallback = static_cast<InternalOpenCameraResultCallback&&> (cameraOpenCallbackToUse);\r
+\r
+ // A valid camera open callback must be passed.\r
+ jassert (cameraOpenCallback != nullptr);\r
+\r
+ // The same camera can be opened only once!\r
+ jassert (scopedCameraDevice == nullptr);\r
+\r
+ if (cameraOpenCallback == nullptr || scopedCameraDevice != nullptr)\r
+ return;\r
+\r
+ WeakReference<Pimpl> safeThis (this);\r
+ RuntimePermissions::request (RuntimePermissions::camera, [safeThis] (bool granted) mutable\r
+ {\r
+ if (safeThis != nullptr)\r
+ safeThis->continueOpenRequest (granted);\r
+ });\r
+ }\r
+\r
+ void continueOpenRequest (bool granted)\r
+ {\r
+ if (granted)\r
+ {\r
+ getEnv()->CallVoidMethod (android.activity, JuceAppActivity.addAppPausedResumedListener,\r
+ appPausedResumedListenerNative.get(), reinterpret_cast<jlong> (this));\r
+ scopedCameraDevice.reset (new ScopedCameraDevice (*this, cameraId, cameraManager, handler, getAutoFocusModeToUse()));\r
+ }\r
+ else\r
+ {\r
+ invokeCameraOpenCallback ("Camera permission not granted");\r
+ }\r
+ }\r
+\r
+ bool openedOk() const noexcept { return scopedCameraDevice->openedOk(); }\r
+\r
+ void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)\r
+ {\r
+ if (pictureTakenCallbackToUse == nullptr)\r
+ {\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ if (currentCaptureSessionMode->isVideoRecordSession())\r
+ {\r
+ // Taking still pictures while recording video is not supported on Android.\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ pictureTakenCallback = static_cast<std::function<void (const Image&)>&&> (pictureTakenCallbackToUse);\r
+\r
+ triggerStillPictureCapture();\r
}\r
\r
- void startRecordingToFile (const File&, int /*quality*/)\r
+ void startRecordingToFile (const File& file, int /*quality*/)\r
{\r
+ if (! openedOk())\r
+ {\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ if (! previewDisplay.isReady())\r
+ {\r
+ // Did you remember to create and show a preview display?\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ file.deleteFile();\r
+ file.create();\r
+ jassert (file.existsAsFile());\r
+\r
+ // MediaRecorder can't handle videos larger than 1080p\r
+ auto videoSize = chooseBestSize (minWidth, minHeight, jmin (maxWidth, 1080), maxHeight,\r
+ streamConfigurationMap.getSupportedVideoRecordingOutputSizes());\r
+\r
+ mediaRecorder.reset (new MediaRecorder (file.getFullPathName(), videoSize.getWidth(), videoSize.getHeight(),\r
+ getCameraSensorOrientation(), getCameraLensFacing()));\r
+\r
+ firstRecordedFrameTimeMs = Time::getCurrentTime();\r
+\r
+ currentCaptureSessionMode.reset();\r
+ startVideoRecordingMode (*mediaRecorder);\r
}\r
\r
void stopRecording()\r
{\r
+ currentCaptureSessionMode.reset();\r
+ mediaRecorder.reset();\r
+\r
+ startPreviewMode (*imageReader);\r
}\r
\r
Time getTimeOfFirstRecordedFrame() const\r
{\r
- return {};\r
+ return firstRecordedFrameTimeMs;\r
+ }\r
+\r
+ static StringArray getAvailableDevices()\r
+ {\r
+ StringArray results;\r
+\r
+ auto* env = getEnv();\r
+\r
+ auto cameraManagerToUse = initialiseCameraManager();\r
+ auto cameraIdArray = LocalRef<jobjectArray> ((jobjectArray) env->CallObjectMethod (cameraManagerToUse,\r
+ CameraManager.getCameraIdList));\r
+\r
+ results = javaStringArrayToJuce (cameraIdArray);\r
+\r
+ for (auto& result : results)\r
+ printDebugCameraInfo (cameraManagerToUse, result);\r
+\r
+ return results;\r
}\r
\r
void addListener (CameraDevice::Listener* listenerToAdd)\r
{\r
const ScopedLock sl (listenerLock);\r
- listeners.addIfNotAlreadyThere (listenerToAdd);\r
+ listeners.add (listenerToAdd);\r
+\r
+ if (listeners.size() == 1)\r
+ triggerStillPictureCapture();\r
}\r
\r
void removeListener (CameraDevice::Listener* listenerToRemove)\r
{\r
const ScopedLock sl (listenerLock);\r
- listeners.removeFirstMatchingValue (listenerToRemove);\r
+ listeners.remove (listenerToRemove);\r
}\r
\r
- static StringArray getAvailableDevices()\r
+private:\r
+ enum\r
{\r
- StringArray results;\r
+ ERROR_CAMERA_IN_USE = 1,\r
+ ERROR_MAX_CAMERAS_IN_USE = 2,\r
+ ERROR_CAMERA_DISABLED = 3,\r
+ ERROR_CAMERA_DEVICE = 4,\r
+ ERROR_CAMERA_SERVICE = 5\r
+ };\r
\r
- return results;\r
+ static String cameraErrorCodeToString (int errorCode)\r
+ {\r
+ switch (errorCode)\r
+ {\r
+ case ERROR_CAMERA_IN_USE: return "Camera already in use.";\r
+ case ERROR_MAX_CAMERAS_IN_USE: return "Too many opened camera devices.";\r
+ case ERROR_CAMERA_DISABLED: return "Camera disabled.";\r
+ case ERROR_CAMERA_DEVICE: return "Fatal error.";\r
+ case ERROR_CAMERA_SERVICE: return "Fatal error. Reboot required or persistent hardware problem.";\r
+ default: return "Unknown error.";\r
+ }\r
}\r
\r
-private:\r
- JUCE_DECLARE_NON_COPYABLE (Pimpl)\r
-};\r
+ static LocalRef<jobject> initialiseCameraManager()\r
+ {\r
+ return LocalRef<jobject> (getEnv()->CallObjectMethod (android.activity, JuceAppActivity.getSystemService,\r
+ javaString ("camera").get()));\r
+ }\r
\r
-struct CameraDevice::ViewerComponent : public Component\r
-{\r
- ViewerComponent (CameraDevice&)\r
+ static LocalRef<jobject> initialiseCameraCharacteristics (const GlobalRef& cameraManager, const String& cameraId)\r
{\r
+ return LocalRef<jobject> (getEnv()->CallObjectMethod (cameraManager,\r
+ CameraManager.getCameraCharacteristics,\r
+ javaString (cameraId).get()));\r
}\r
\r
- JUCE_DECLARE_NON_COPYABLE (ViewerComponent)\r
-};\r
+ static void printDebugCameraInfo (const LocalRef<jobject>& cameraManagerToUse, const String& cameraId)\r
+ {\r
+ auto* env = getEnv();\r
\r
-String CameraDevice::getFileExtension()\r
-{\r
- return ".mov";\r
+ auto characteristics = LocalRef<jobject> (env->CallObjectMethod (cameraManagerToUse,\r
+ CameraManager.getCameraCharacteristics,\r
+ javaString (cameraId).get()));\r
+\r
+ auto keysList = LocalRef<jobject> (env->CallObjectMethod (characteristics, CameraCharacteristics.getKeys));\r
+\r
+ const int size = env->CallIntMethod (keysList, JavaList.size);\r
+\r
+ JUCE_CAMERA_LOG ("Camera id: " + cameraId + ", characteristics keys num: " + String (size));\r
+\r
+ for (int i = 0; i < size; ++i)\r
+ {\r
+ auto key = LocalRef<jobject> (env->CallObjectMethod (keysList, JavaList.get, i));\r
+ auto jKeyName = LocalRef<jstring> ((jstring) env->CallObjectMethod (key, CameraCharacteristicsKey.getName));\r
+ auto keyName = juceString (jKeyName);\r
+\r
+ auto keyValue = LocalRef<jobject> (env->CallObjectMethod (characteristics, CameraCharacteristics.get, key.get()));\r
+ auto jKeyValueString = LocalRef<jstring> ((jstring) env->CallObjectMethod (keyValue, JavaObject.toString));\r
+ auto keyValueString = juceString (jKeyValueString);\r
+\r
+ auto &kvs = keyValueString;\r
+\r
+ if (kvs.startsWith ("[I") || kvs.startsWith ("[F") || kvs.startsWith ("[Z") || kvs.startsWith ("[B"))\r
+ {\r
+ printPrimitiveArrayElements (keyValue, keyName, keyValueString);\r
+ }\r
+ else if (kvs.startsWith ("[Landroid.util.Range"))\r
+ {\r
+ printRangeArrayElements (keyValue, keyName);\r
+ }\r
+ else\r
+ {\r
+ int chunkSize = 256;\r
+\r
+ if (keyValueString.length() > chunkSize)\r
+ {\r
+ JUCE_CAMERA_LOG ("Key: " + keyName);\r
+\r
+ for (int i = 0, j = 1; i < keyValueString.length(); i += chunkSize, ++j)\r
+ JUCE_CAMERA_LOG ("value part " + String (j) + ": " + keyValueString.substring (i, i + chunkSize));\r
+ }\r
+ else\r
+ {\r
+ JUCE_CAMERA_LOG ("Key: " + keyName + ", value: " + keyValueString);\r
+ }\r
+ }\r
+\r
+ ignoreUnused (keyName);\r
+ }\r
+ }\r
+\r
+ static void printPrimitiveArrayElements (const LocalRef<jobject>& keyValue, const String& keyName,\r
+ const String& keyValueString)\r
+ {\r
+ ignoreUnused (keyName);\r
+\r
+ String result = "[";\r
+\r
+ auto* env = getEnv();\r
+\r
+ #define PRINT_ELEMENTS(elem_type, array_type, fun_name_middle) \\r
+ { \\r
+ elem_type* elements = env->Get##fun_name_middle##ArrayElements ((array_type) keyValue.get(), 0); \\r
+ int size = env->GetArrayLength ((array_type) keyValue.get()); \\r
+ \\r
+ for (int i = 0; i < size - 1; ++i) \\r
+ result << String (elements[i]) << " "; \\r
+ \\r
+ if (size > 0) \\r
+ result << String (elements[size - 1]); \\r
+ \\r
+ env->Release##fun_name_middle##ArrayElements ((array_type) keyValue.get(), elements, 0); \\r
+ }\r
+\r
+ if (keyValueString.startsWith ("[I"))\r
+ PRINT_ELEMENTS (jint, jintArray, Int)\r
+ else if (keyValueString.startsWith ("[F"))\r
+ PRINT_ELEMENTS (float, jfloatArray, Float)\r
+ else if (keyValueString.startsWith ("[Z"))\r
+ PRINT_ELEMENTS (jboolean, jbooleanArray, Boolean)\r
+ else if (keyValueString.startsWith ("[B"))\r
+ PRINT_ELEMENTS (jbyte, jbyteArray, Byte);\r
+\r
+ #undef PRINT_ELEMENTS\r
+\r
+ result << "]";\r
+ JUCE_CAMERA_LOG ("Key: " + keyName + ", value: " + result);\r
+ }\r
+\r
+ static void printRangeArrayElements (const LocalRef<jobject>& rangeArray, const String& keyName)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ jobjectArray ranges = static_cast<jobjectArray> (rangeArray.get());\r
+\r
+ int numRanges = env->GetArrayLength (ranges);\r
+\r
+ String result;\r
+\r
+ for (int i = 0; i < numRanges; ++i)\r
+ {\r
+ auto range = LocalRef<jobject> (env->GetObjectArrayElement (ranges, i));\r
+\r
+ auto jRangeString = LocalRef<jstring> ((jstring) env->CallObjectMethod (range, AndroidRange.toString));\r
+\r
+ result << juceString (jRangeString) << " ";\r
+ }\r
+\r
+ JUCE_CAMERA_LOG ("Key: " + keyName + ", value: " + result);\r
+ }\r
+\r
+ //==============================================================================\r
+ class StreamConfigurationMap\r
+ {\r
+ public:\r
+ StreamConfigurationMap (const GlobalRef& cameraCharacteristics)\r
+ : scalerStreamConfigurationMap (getStreamConfigurationMap (cameraCharacteristics)),\r
+ supportedPreviewOutputSizes (retrieveOutputSizes (scalerStreamConfigurationMap,\r
+ getClassForName ("android.graphics.SurfaceTexture"),\r
+ -1)),\r
+ supportedStillImageOutputSizes (retrieveOutputSizes (scalerStreamConfigurationMap,\r
+ LocalRef<jobject>(),\r
+ jpegImageFormat)),\r
+ supportedVideoRecordingOutputSizes (retrieveOutputSizes (scalerStreamConfigurationMap,\r
+ getClassForName ("android.media.MediaRecorder"),\r
+ -1)),\r
+ defaultPreviewSize (getSmallestSize (supportedPreviewOutputSizes)),\r
+ previewBufferSize (getLargestSize (supportedPreviewOutputSizes))\r
+ {\r
+ printSizesLog (supportedPreviewOutputSizes, "SurfaceTexture");\r
+ printSizesLog (supportedStillImageOutputSizes, "JPEG");\r
+ printSizesLog (supportedVideoRecordingOutputSizes, "MediaRecorder");\r
+ }\r
+\r
+ Array<Rectangle<int>> getSupportedPreviewOutputSizes() const noexcept { return supportedPreviewOutputSizes; }\r
+ Array<Rectangle<int>> getSupportedStillImageOutputSizes() const noexcept { return supportedStillImageOutputSizes; }\r
+ Array<Rectangle<int>> getSupportedVideoRecordingOutputSizes() const noexcept { return supportedVideoRecordingOutputSizes; }\r
+\r
+ Rectangle<int> getDefaultPreviewSize() const noexcept { return defaultPreviewSize; }\r
+ Rectangle<int> getPreviewBufferSize() const noexcept { return previewBufferSize; }\r
+\r
+ bool isOutputSupportedForSurface (const LocalRef<jobject>& surface) const\r
+ {\r
+ return getEnv()->CallBooleanMethod (scalerStreamConfigurationMap, AndroidStreamConfigurationMap.isOutputSupportedForSurface, surface.get());\r
+ }\r
+\r
+ static constexpr int jpegImageFormat = 256;\r
+\r
+ private:\r
+ GlobalRef scalerStreamConfigurationMap;\r
+\r
+ Array<Rectangle<int>> supportedPreviewOutputSizes;\r
+ Array<Rectangle<int>> supportedStillImageOutputSizes;\r
+ Array<Rectangle<int>> supportedVideoRecordingOutputSizes;\r
+ Rectangle<int> defaultPreviewSize, previewBufferSize;\r
+\r
+ GlobalRef getStreamConfigurationMap (const GlobalRef& cameraCharacteristics)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto scalerStreamConfigurationMapKey = LocalRef<jobject> (env->GetStaticObjectField (CameraCharacteristics,\r
+ CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP));\r
+\r
+ return GlobalRef (LocalRef<jobject> (env->CallObjectMethod (cameraCharacteristics,\r
+ CameraCharacteristics.get,\r
+ scalerStreamConfigurationMapKey.get())));\r
+ }\r
+\r
+ static Array<Rectangle<int>> retrieveOutputSizes (GlobalRef& scalerStreamConfigurationMap,\r
+ const LocalRef<jobject>& outputClass,\r
+ int format)\r
+ {\r
+ Array<Rectangle<int>> result;\r
+\r
+ auto* env = getEnv();\r
+\r
+ auto outputSizes = outputClass.get() != nullptr\r
+ ? LocalRef<jobjectArray> ((jobjectArray) env->CallObjectMethod (scalerStreamConfigurationMap,\r
+ AndroidStreamConfigurationMap.getOutputSizesForClass,\r
+ outputClass.get()))\r
+ : LocalRef<jobjectArray> ((jobjectArray) env->CallObjectMethod (scalerStreamConfigurationMap,\r
+ AndroidStreamConfigurationMap.getOutputSizesForFormat,\r
+ (jint) format));\r
+\r
+ if (format != -1)\r
+ {\r
+ auto supported = (env->CallBooleanMethod (scalerStreamConfigurationMap, AndroidStreamConfigurationMap.isOutputSupportedFor, (jint) format) != 0);\r
+\r
+ if (! supported)\r
+ {\r
+ // The output format is not supported by this device, still image capture will not work!\r
+ jassertfalse;\r
+ return {};\r
+ }\r
+ }\r
+\r
+ int numSizes = env->GetArrayLength (outputSizes);\r
+\r
+ jassert (numSizes > 0);\r
+\r
+ for (int i = 0; i < numSizes; ++i)\r
+ {\r
+ auto size = LocalRef<jobject> (env->GetObjectArrayElement (outputSizes, i));\r
+\r
+ auto width = env->CallIntMethod (size, AndroidSize.getWidth);\r
+ auto height = env->CallIntMethod (size, AndroidSize.getHeight);\r
+\r
+ result.add (Rectangle<int> (0, 0, width, height));\r
+ }\r
+\r
+ return result;\r
+ }\r
+\r
+ static LocalRef<jobject> getClassForName (const String& name)\r
+ {\r
+ return LocalRef<jobject> (getEnv()->CallStaticObjectMethod (JavaClass, JavaClass.forName,\r
+ javaString (name).get()));\r
+ }\r
+\r
+ static void printSizesLog (const Array<Rectangle<int>>& sizes, const String& className)\r
+ {\r
+ ignoreUnused (sizes, className);\r
+\r
+ JUCE_CAMERA_LOG ("Sizes for class " + className);\r
+\r
+ #if JUCE_CAMERA_LOG_ENABLED\r
+ for (auto& s : sizes)\r
+ JUCE_CAMERA_LOG (s.toString() + "\n");\r
+ #endif\r
+ }\r
+\r
+ Rectangle<int> getSmallestSize (const Array<Rectangle<int>>& sizes) const\r
+ {\r
+ if (sizes.size() == 0)\r
+ return {};\r
+\r
+ auto smallestSize = sizes[0];\r
+\r
+ for (auto& size : sizes)\r
+ {\r
+ if (size.getWidth() < smallestSize.getWidth() && size.getHeight() < smallestSize.getHeight())\r
+ smallestSize = size;\r
+ }\r
+\r
+ return smallestSize;\r
+ }\r
+\r
+ Rectangle<int> getLargestSize (const Array<Rectangle<int>>& sizes) const\r
+ {\r
+ if (sizes.size() == 0)\r
+ return {};\r
+\r
+ auto largestSize = sizes[0];\r
+\r
+ for (auto& size : sizes)\r
+ {\r
+ if (size.getWidth() > largestSize.getWidth() && size.getHeight() > largestSize.getHeight())\r
+ largestSize = size;\r
+ }\r
+\r
+ return largestSize;\r
+ }\r
+ };\r
+\r
+ //==============================================================================\r
+ class PreviewDisplay : private TextureViewSurfaceTextureListener::Owner\r
+ {\r
+ public:\r
+ struct Listener\r
+ {\r
+ virtual ~Listener() {}\r
+\r
+ virtual void previewDisplayReady() = 0;\r
+ virtual void previewDisplayAboutToBeDestroyed() = 0;\r
+ };\r
+\r
+ PreviewDisplay (Rectangle<int> bufferSize)\r
+ : textureViewSurfaceTextureListener (*this),\r
+ textureView (getEnv()->NewObject (AndroidTextureView, AndroidTextureView.constructor,\r
+ android.activity.get())),\r
+ bufferWidth (bufferSize.getWidth()),\r
+ bufferHeight (bufferSize.getHeight())\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ if (! isReady())\r
+ env->CallVoidMethod (textureView, AndroidTextureView.setSurfaceTextureListener,\r
+ CreateJavaInterface (&textureViewSurfaceTextureListener,\r
+ "android/view/TextureView$SurfaceTextureListener").get());\r
+ }\r
+\r
+ ~PreviewDisplay()\r
+ {\r
+ getEnv()->CallVoidMethod (textureView, AndroidTextureView.setSurfaceTextureListener, nullptr);\r
+ }\r
+\r
+ void addListener (Listener* l)\r
+ {\r
+ if (l == nullptr)\r
+ {\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ listeners.add (l);\r
+\r
+ if (isReady())\r
+ l->previewDisplayReady();\r
+ }\r
+\r
+ void removeListener (Listener* l)\r
+ {\r
+ if (l == nullptr)\r
+ {\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ listeners.remove (l);\r
+ }\r
+\r
+ bool isReady() const\r
+ {\r
+ return (getEnv()->CallBooleanMethod (textureView, AndroidTextureView.isAvailable) != 0)\r
+ && width > 0 && height > 0;\r
+ }\r
+\r
+ LocalRef<jobject> createSurface()\r
+ {\r
+ // Surface may get destroyed while session is being configured, if\r
+ // the preview gets hidden in the meantime, so bailout.\r
+ if (! isReady())\r
+ return LocalRef<jobject> (nullptr);\r
+\r
+ auto* env = getEnv();\r
+\r
+ auto surfaceTexture = LocalRef<jobject> (env->CallObjectMethod (textureView,\r
+ AndroidTextureView.getSurfaceTexture));\r
+\r
+ // NB: too small buffer will result in pixelated preview. A buffer with wrong aspect ratio\r
+ // can result in a cropped preview.\r
+ env->CallVoidMethod (surfaceTexture, AndroidSurfaceTexture.setDefaultBufferSize, (jint) bufferWidth, (jint) bufferHeight);\r
+\r
+ auto surface = LocalRef<jobject> (env->NewObject (AndroidSurface, AndroidSurface.constructor, surfaceTexture.get()));\r
+\r
+ return surface;\r
+ }\r
+\r
+ const GlobalRef& getNativeView() { return textureView; }\r
+\r
+ void updateSurfaceTransform()\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto windowManager = LocalRef<jobject> (env->CallObjectMethod (android.activity, JuceAppActivity.getWindowManager));\r
+ auto display = LocalRef<jobject> (env->CallObjectMethod (windowManager, AndroidWindowManager.getDefaultDisplay));\r
+ auto rotation = env->CallIntMethod (display, AndroidDisplay.getRotation);\r
+\r
+ static constexpr int rotation90 = 1;\r
+ static constexpr int rotation270 = 3;\r
+\r
+ auto matrix = LocalRef<jobject> (env->NewObject (AndroidMatrix, AndroidMatrix.constructor));\r
+\r
+ if (rotation == rotation90 || rotation == rotation270)\r
+ {\r
+ env->CallBooleanMethod (matrix, AndroidMatrix.postScale, jfloat (height / (float) width), jfloat (width / (float) height), (jfloat) 0, (jfloat) 0);\r
+ env->CallBooleanMethod (matrix, AndroidMatrix.postRotate, (jfloat) 90 * (rotation - 2), (jfloat) 0, (jfloat) 0);\r
+ env->CallBooleanMethod (matrix, AndroidMatrix.postTranslate, (jfloat) (rotation == 3 ? width : 0), (jfloat) (rotation == 1 ? height : 0));\r
+ }\r
+\r
+ env->CallVoidMethod (textureView, AndroidTextureView.setTransform, matrix.get());\r
+ }\r
+\r
+ private:\r
+ ListenerList<Listener> listeners;\r
+\r
+ TextureViewSurfaceTextureListener textureViewSurfaceTextureListener;\r
+ GlobalRef textureView;\r
+ int width = -1, height = -1;\r
+ int bufferWidth, bufferHeight;\r
+\r
+ void onSurfaceTextureAvailable (LocalRef<jobject>& /*surface*/, int widthToUse, int heightToUse) override\r
+ {\r
+ JUCE_CAMERA_LOG ("onSurfaceTextureAvailable()");\r
+\r
+ width = widthToUse;\r
+ height = heightToUse;\r
+\r
+ updateSurfaceTransform();\r
+\r
+ listeners.call (&Listener::previewDisplayReady);\r
+ }\r
+\r
+ bool onSurfaceTextureDestroyed (LocalRef<jobject>& /*surface*/) override\r
+ {\r
+ JUCE_CAMERA_LOG ("onSurfaceTextureDestroyed()");\r
+\r
+ listeners.call (&Listener::previewDisplayAboutToBeDestroyed);\r
+\r
+ return true;\r
+ }\r
+\r
+ void onSurfaceTextureSizeChanged (LocalRef<jobject>& /*surface*/, int widthToUse, int heightToUse) override\r
+ {\r
+ JUCE_CAMERA_LOG ("onSurfaceTextureSizeChanged()");\r
+\r
+ width = widthToUse;\r
+ height = heightToUse;\r
+\r
+ updateSurfaceTransform();\r
+ }\r
+\r
+ void onSurfaceTextureUpdated (LocalRef<jobject>& /*surface*/) override\r
+ {\r
+ JUCE_CAMERA_LOG ("onSurfaceTextureUpdated()");\r
+ }\r
+\r
+ JUCE_DECLARE_NON_COPYABLE (PreviewDisplay)\r
+ };\r
+\r
+ //==============================================================================\r
+ class ImageReader : private ImageReaderOnImageAvailableListener::Owner\r
+ {\r
+ public:\r
+ ImageReader (Pimpl& ownerToUse, GlobalRef& handlerToUse,\r
+ int imageWidth, int imageHeight, int cameraSensorOrientationToUse)\r
+ : owner (ownerToUse),\r
+ cameraSensorOrientation (cameraSensorOrientationToUse),\r
+ imageReader (getEnv()->CallStaticObjectMethod (AndroidImageReader, AndroidImageReader.newInstance,\r
+ imageWidth, imageHeight, StreamConfigurationMap::jpegImageFormat,\r
+ numImagesToKeep)),\r
+ onImageAvailableListener (*this)\r
+ {\r
+ getEnv()->CallVoidMethod (imageReader, AndroidImageReader.setOnImageAvailableListener,\r
+ CreateJavaInterface (&onImageAvailableListener,\r
+ "android/media/ImageReader$OnImageAvailableListener").get(),\r
+ handlerToUse.get());\r
+ }\r
+\r
+ ~ImageReader()\r
+ {\r
+ getEnv()->CallVoidMethod (imageReader, AndroidImageReader.close);\r
+ }\r
+\r
+ LocalRef<jobject> getSurface() const\r
+ {\r
+ return LocalRef<jobject> (getEnv()->CallObjectMethod (imageReader, AndroidImageReader.getSurface));\r
+ }\r
+\r
+ void resetNotificationFlag()\r
+ {\r
+ hasNotifiedListeners.set (0);\r
+ }\r
+\r
+ private:\r
+ Pimpl& owner;\r
+ int cameraSensorOrientation;\r
+\r
+ GlobalRef imageReader;\r
+ ImageReaderOnImageAvailableListener onImageAvailableListener;\r
+ static constexpr int numImagesToKeep = 2;\r
+ Atomic<int> hasNotifiedListeners { 0 };\r
+\r
+ JUCE_DECLARE_WEAK_REFERENCEABLE (ImageReader)\r
+\r
+ void onImageAvailable (LocalRef<jobject>& /*imageReader*/) override\r
+ {\r
+ JUCE_CAMERA_LOG ("onImageAvailable()");\r
+\r
+ auto* env = getEnv();\r
+\r
+ auto jImage = LocalRef<jobject> (env->CallObjectMethod (imageReader, AndroidImageReader.acquireLatestImage));\r
+\r
+ if (jImage.get() == nullptr)\r
+ return;\r
+\r
+ auto cameraLensFrontFacing = owner.getCameraLensFacing() == 0;\r
+\r
+ // NB: could use sensor orientation here to get real-world orientation, but then the resulting\r
+ // image could not match the UI orientation.\r
+ auto image = androidImageToJuceWithFixedOrientation (jImage, owner.deviceOrientationChangeListener.getDeviceOrientation(),\r
+ Desktop::getInstance().getCurrentOrientation(),\r
+ cameraLensFrontFacing,\r
+ cameraSensorOrientation);\r
+\r
+ env->CallVoidMethod (jImage, AndroidImage.close);\r
+\r
+ WeakReference<ImageReader> safeThis (this);\r
+\r
+ owner.callListeners (image);\r
+\r
+ // Android may take multiple pictures before it handles a request to stop.\r
+ if (hasNotifiedListeners.compareAndSetBool (1, 0))\r
+ MessageManager::callAsync ([safeThis, image]() mutable { if (safeThis != nullptr) safeThis->owner.notifyPictureTaken (image); });\r
+ }\r
+\r
+ struct ImageBuffer\r
+ {\r
+ LocalRef<jbyteArray> byteArray;\r
+ int size;\r
+ };\r
+\r
+ static Image androidImageToJuceWithFixedOrientation (const LocalRef<jobject>& androidImage,\r
+ Desktop::DisplayOrientation deviceOrientationFromAccelerometerSensor,\r
+ Desktop::DisplayOrientation targetOrientation,\r
+ bool cameraLensFrontFacing,\r
+ int cameraSensorOrientation)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto planes = LocalRef<jobjectArray> ((jobjectArray) env->CallObjectMethod (androidImage, AndroidImage.getPlanes));\r
+ jassert (env->GetArrayLength (planes) > 0);\r
+\r
+ auto plane = LocalRef<jobject> (env->GetObjectArrayElement (planes, 0));\r
+ auto byteBuffer = LocalRef<jobject> (env->CallObjectMethod (plane, AndroidImagePlane.getBuffer));\r
+\r
+ ImageBuffer correctedBuffer = getImageBufferWithCorrectedOrientationFrom (byteBuffer, deviceOrientationFromAccelerometerSensor,\r
+ targetOrientation, cameraLensFrontFacing, cameraSensorOrientation);\r
+\r
+ jbyte* rawBytes = env->GetByteArrayElements (correctedBuffer.byteArray, nullptr);\r
+\r
+ Image result = ImageFileFormat::loadFrom (rawBytes, (size_t) correctedBuffer.size);\r
+\r
+ env->ReleaseByteArrayElements (correctedBuffer.byteArray, rawBytes, 0);\r
+\r
+ return result;\r
+ }\r
+\r
+ static ImageBuffer getImageBufferWithCorrectedOrientationFrom (const LocalRef<jobject>& imagePlaneBuffer,\r
+ Desktop::DisplayOrientation deviceOrientationFromAccelerometerSensor,\r
+ Desktop::DisplayOrientation targetOrientation,\r
+ bool cameraLensFrontFacing,\r
+ int cameraSensorOrientation)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto bufferSize = env->CallIntMethod (imagePlaneBuffer, JavaByteBuffer.remaining);\r
+ auto byteArray = LocalRef<jbyteArray> (env->NewByteArray (bufferSize));\r
+ env->CallObjectMethod (imagePlaneBuffer, JavaByteBuffer.get, byteArray.get());\r
+\r
+ auto orientationsEnabled = Desktop::getInstance().getOrientationsEnabled() & ~Desktop::upsideDown;\r
+\r
+ auto rotationAngle = getRotationAngle (deviceOrientationFromAccelerometerSensor, targetOrientation,\r
+ cameraLensFrontFacing, cameraSensorOrientation);\r
+\r
+ if (rotationAngle == 0)\r
+ {\r
+ // Nothing to do, just get the bytes\r
+ return { byteArray, bufferSize };\r
+ }\r
+\r
+ auto origBitmap = LocalRef<jobject> (env->CallStaticObjectMethod (AndroidBitmapFactory,\r
+ AndroidBitmapFactory.decodeByteArray,\r
+ byteArray.get(), (jint) 0, (jint) bufferSize));\r
+\r
+ auto correctedBitmap = getBitmapWithCorrectOrientationFrom (origBitmap, rotationAngle);\r
+\r
+ auto byteArrayOutputStream = LocalRef<jobject> (env->NewObject (ByteArrayOutputStream,\r
+ ByteArrayOutputStream.constructor));\r
+\r
+ auto jCompressFormatString = javaString ("JPEG");\r
+ auto compressFormat = LocalRef<jobject> (env->CallStaticObjectMethod (AndroidBitmapCompressFormat,\r
+ AndroidBitmapCompressFormat.valueOf,\r
+ jCompressFormatString.get()));\r
+\r
+ if (env->CallBooleanMethod (correctedBitmap, AndroidBitmap.compress, compressFormat.get(),\r
+ (jint) 100, byteArrayOutputStream.get()) != 0)\r
+ {\r
+ auto correctedByteArray = LocalRef<jbyteArray> ((jbyteArray) env->CallObjectMethod (byteArrayOutputStream,\r
+ ByteArrayOutputStream.toByteArray));\r
+\r
+ int correctedByteArraySize = env->CallIntMethod (byteArrayOutputStream, ByteArrayOutputStream.size);\r
+\r
+ return { correctedByteArray, correctedByteArraySize };\r
+ }\r
+\r
+ jassertfalse;\r
+ // fallback, return original bitmap\r
+ return { byteArray, bufferSize };\r
+ }\r
+\r
+ static int getRotationAngle (Desktop::DisplayOrientation deviceOrientationFromAccelerometerSensor,\r
+ Desktop::DisplayOrientation targetOrientation,\r
+ bool cameraLensFrontFacing,\r
+ int cameraSensorOrientation)\r
+ {\r
+ auto orientationsEnabled = Desktop::getInstance().getOrientationsEnabled() & ~Desktop::upsideDown;\r
+\r
+ auto isSensorOrientationHorizontal = deviceOrientationFromAccelerometerSensor == Desktop::rotatedAntiClockwise\r
+ || deviceOrientationFromAccelerometerSensor == Desktop::rotatedClockwise;\r
+\r
+ if (cameraLensFrontFacing && isSensorOrientationHorizontal)\r
+ {\r
+ // flip angles for front camera\r
+ return getRotationAngle (deviceOrientationFromAccelerometerSensor, targetOrientation, false, (cameraSensorOrientation + 180) % 360);\r
+ }\r
+\r
+ switch (targetOrientation)\r
+ {\r
+ case Desktop::rotatedAntiClockwise:\r
+ return cameraSensorOrientation == 90 ? 0 : 180;\r
+ case Desktop::rotatedClockwise:\r
+ return cameraSensorOrientation == 90 ? 180 : 0;\r
+ case Desktop::upright:\r
+ case Desktop::upsideDown:\r
+ if ((targetOrientation == Desktop::upright && ! cameraLensFrontFacing)\r
+ || (targetOrientation == Desktop::upsideDown && cameraLensFrontFacing))\r
+ {\r
+ return cameraSensorOrientation;\r
+ }\r
+ else\r
+ {\r
+ if (deviceOrientationFromAccelerometerSensor == Desktop::upright || deviceOrientationFromAccelerometerSensor == Desktop::upsideDown)\r
+ return cameraSensorOrientation;\r
+ else\r
+ return (cameraSensorOrientation + 180) % 360;\r
+ }\r
+ break;\r
+ default:\r
+ return 0;\r
+ }\r
+ }\r
+\r
+ static LocalRef<jobject> getBitmapWithCorrectOrientationFrom (LocalRef<jobject>& origBitmap, int rotationAngle)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto origBitmapWidth = env->CallIntMethod (origBitmap, AndroidBitmap.getWidth);\r
+ auto origBitmapHeight = env->CallIntMethod (origBitmap, AndroidBitmap.getHeight);\r
+\r
+ auto orientationsEnabled = Desktop::getInstance().getOrientationsEnabled() & ~Desktop::upsideDown;\r
+\r
+ auto matrix = LocalRef<jobject> (env->NewObject (AndroidMatrix, AndroidMatrix.constructor));\r
+ env->CallBooleanMethod (matrix, AndroidMatrix.postRotate, (jfloat) rotationAngle, (jfloat) 0, (jfloat) 0);\r
+\r
+ auto rotatedBitmap = LocalRef<jobject> (env->CallStaticObjectMethod (AndroidBitmap, AndroidBitmap.createBitmapFrom,\r
+ origBitmap.get(), (jint) 0, (jint) 0,\r
+ (jint) origBitmapWidth, (jint) origBitmapHeight,\r
+ matrix.get(), true));\r
+\r
+ env->CallVoidMethod (origBitmap, AndroidBitmap.recycle);\r
+\r
+ return rotatedBitmap;\r
+ }\r
+ };\r
+\r
+ //==============================================================================\r
+ class MediaRecorder : private MediaRecorderOnInfoListener::Owner,\r
+ private MediaRecorderOnErrorListener::Owner\r
+ {\r
+ public:\r
+ MediaRecorder (const String& outputFilePath, int videoWidth, int videoHeight,\r
+ int sensorOrientation, int cameraLensFacing)\r
+ : onInfoListener (*this),\r
+ onErrorListener (*this),\r
+ mediaRecorder (LocalRef<jobject> (getEnv()->NewObject (AndroidMediaRecorder,\r
+ AndroidMediaRecorder.constructor)))\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOnInfoListener,\r
+ CreateJavaInterface (&onInfoListener,\r
+ "android/media/MediaRecorder$OnInfoListener").get());\r
+\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOnErrorListener,\r
+ CreateJavaInterface (&onErrorListener,\r
+ "android/media/MediaRecorder$OnErrorListener").get());\r
+\r
+ // NB: the order of function calls here is enforced, and exceptions will be thrown if\r
+ // the order is changed.\r
+ static constexpr int audioSourceMic = 1;\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setAudioSource, (jint) audioSourceMic);\r
+\r
+ static constexpr int videoSourceSurface = 2;\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoSource, (jint) videoSourceSurface);\r
+\r
+ static constexpr int outputFormatMPEG4 = 2;\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOutputFormat, (jint) outputFormatMPEG4);\r
+\r
+ static constexpr int audioEncoderAAC = 3;\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setAudioEncoder, (jint) audioEncoderAAC);\r
+\r
+ static constexpr int videoEncoderH264 = 2;\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoEncoder, (jint) videoEncoderH264);\r
+\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoEncodingBitRate, (jint) 10000000);\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoFrameRate, (jint) 30);\r
+\r
+ auto frontFacing = cameraLensFacing == 0;\r
+\r
+ auto useInverseDegrees = frontFacing && sensorOrientation == 90;\r
+\r
+ int orientationHint = getOrientationHint (useInverseDegrees, sensorOrientation);\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOrientationHint, (jint) orientationHint);\r
+\r
+ getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setVideoSize, (jint) videoWidth, (jint) videoHeight);\r
+ getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.setOutputFile, javaString (outputFilePath).get());\r
+ getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.prepare);\r
+ }\r
+\r
+ ~MediaRecorder()\r
+ {\r
+ getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.release);\r
+ }\r
+\r
+ LocalRef<jobject> getSurface()\r
+ {\r
+ return LocalRef<jobject> (getEnv()->CallObjectMethod (mediaRecorder, AndroidMediaRecorder.getSurface));\r
+ }\r
+\r
+ void start()\r
+ {\r
+ lockScreenOrientation();\r
+\r
+ getEnv()->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.start);\r
+\r
+ hasStartedRecording = true;\r
+ }\r
+\r
+ void stop()\r
+ {\r
+ // A request to stop can be sent before recording has had a chance to start, so\r
+ // ignore the request rather than calling AndroidMediaRecorder.stop because\r
+ // otherwise MediaRecorder will throw an exception and...\r
+ if (! hasStartedRecording)\r
+ return;\r
+\r
+ hasStartedRecording = false;\r
+\r
+ auto* env = getEnv();\r
+ env->CallVoidMethod (mediaRecorder, AndroidMediaRecorder.stop);\r
+\r
+ // ... ignore RuntimeException that can be thrown if stop() was called after recording\r
+ // has started but before any frame was written to a file. This is not an error.\r
+ auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+ if (exception != 0)\r
+ env->ExceptionClear();\r
+\r
+ unlockScreenOrientation();\r
+ }\r
+\r
+ private:\r
+ MediaRecorderOnInfoListener onInfoListener;\r
+ MediaRecorderOnErrorListener onErrorListener;\r
+ GlobalRef mediaRecorder;\r
+ bool hasStartedRecording = false;\r
+ int orientationsEnabled = -1;\r
+\r
+ void lockScreenOrientation()\r
+ {\r
+ orientationsEnabled = Desktop::getInstance().getOrientationsEnabled();\r
+\r
+ auto o = Desktop::getInstance().getCurrentOrientation();\r
+ Desktop::getInstance().setOrientationsEnabled (o);\r
+ }\r
+\r
+ static jint juceOrientationToNativeOrientation (int orientations) noexcept\r
+ {\r
+ enum\r
+ {\r
+ SCREEN_ORIENTATION_LANDSCAPE = 0,\r
+ SCREEN_ORIENTATION_PORTRAIT = 1,\r
+ SCREEN_ORIENTATION_USER = 2,\r
+ SCREEN_ORIENTATION_REVERSE_LANDSCAPE = 8,\r
+ SCREEN_ORIENTATION_REVERSE_PORTRAIT = 9,\r
+ SCREEN_ORIENTATION_USER_LANDSCAPE = 11,\r
+ SCREEN_ORIENTATION_USER_PORTRAIT = 12,\r
+ };\r
+\r
+ switch (orientations)\r
+ {\r
+ case Desktop::upright: return (jint) SCREEN_ORIENTATION_PORTRAIT;\r
+ case Desktop::upsideDown: return (jint) SCREEN_ORIENTATION_REVERSE_PORTRAIT;\r
+ case Desktop::upright + Desktop::upsideDown: return (jint) SCREEN_ORIENTATION_USER_PORTRAIT;\r
+ case Desktop::rotatedAntiClockwise: return (jint) SCREEN_ORIENTATION_LANDSCAPE;\r
+ case Desktop::rotatedClockwise: return (jint) SCREEN_ORIENTATION_REVERSE_LANDSCAPE;\r
+ case Desktop::rotatedClockwise + Desktop::rotatedAntiClockwise: return (jint) SCREEN_ORIENTATION_USER_LANDSCAPE;\r
+ default: return (jint) SCREEN_ORIENTATION_USER;\r
+ }\r
+ }\r
+\r
+ void unlockScreenOrientation()\r
+ {\r
+ Desktop::getInstance().setOrientationsEnabled (orientationsEnabled);\r
+ }\r
+\r
+ void onInfo (LocalRef<jobject>& recorder, int what, int extra) override\r
+ {\r
+ ignoreUnused (recorder, what, extra);\r
+\r
+ JUCE_CAMERA_LOG ("MediaRecorder::OnInfo: " + getInfoStringFromCode (what)\r
+ + ", extra code = " + String (extra));\r
+ }\r
+\r
+ void onError (LocalRef<jobject>& recorder, int what, int extra) override\r
+ {\r
+ ignoreUnused (recorder, what, extra);\r
+\r
+ JUCE_CAMERA_LOG ("MediaRecorder::onError: " + getErrorStringFromCode (what)\r
+ + ", extra code = " + String (extra));\r
+ }\r
+\r
+ static String getInfoStringFromCode (int what)\r
+ {\r
+ enum\r
+ {\r
+ MEDIA_RECORDER_INFO_UNKNOWN = 1,\r
+ MEDIA_RECORDER_INFO_MAX_DURATION_REACHED = 800,\r
+ MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED = 801,\r
+ MEDIA_RECORDER_INFO_MAX_FILESIZE_APPROACHING = 802,\r
+ MEDIA_RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED = 803\r
+ };\r
+\r
+ switch (what)\r
+ {\r
+ case MEDIA_RECORDER_INFO_UNKNOWN: return { "Unknown info" };\r
+ case MEDIA_RECORDER_INFO_MAX_DURATION_REACHED: return { "Max duration reached" };\r
+ case MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED: return { "Max filesize reached" };\r
+ case MEDIA_RECORDER_INFO_MAX_FILESIZE_APPROACHING: return { "Max filesize approaching" };\r
+ case MEDIA_RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED: return { "Next output file started" };\r
+ default: return String (what);\r
+ };\r
+ }\r
+\r
+ static String getErrorStringFromCode (int what)\r
+ {\r
+ enum\r
+ {\r
+ MEDIA_RECORDER_ERROR_UNKNOWN = 1,\r
+ MEDIA_ERROR_SERVER_DIED = 100\r
+ };\r
+\r
+ switch (what)\r
+ {\r
+ case MEDIA_RECORDER_ERROR_UNKNOWN: return { "Unknown error" };\r
+ case MEDIA_ERROR_SERVER_DIED: return { "Server died" };\r
+ default: return String (what);\r
+ };\r
+ }\r
+\r
+ static int getOrientationHint (bool useInverseDegrees, int cameraSensorOrientation)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto windowManager = LocalRef<jobject> (env->CallObjectMethod (android.activity, JuceAppActivity.getWindowManager));\r
+ auto display = LocalRef<jobject> (env->CallObjectMethod (windowManager, AndroidWindowManager.getDefaultDisplay));\r
+ auto rotation = env->CallIntMethod (display, AndroidDisplay.getRotation);\r
+\r
+ enum\r
+ {\r
+ ROTATION_0 = 0,\r
+ ROTATION_90,\r
+ ROTATION_180,\r
+ ROTATION_270\r
+ };\r
+\r
+ int hint = 0;\r
+\r
+ switch (rotation)\r
+ {\r
+ case ROTATION_0: hint = cameraSensorOrientation; break;\r
+ case ROTATION_90: hint = useInverseDegrees ? 180 : 0; break;\r
+ case ROTATION_180: hint = cameraSensorOrientation + 180; break;\r
+ case ROTATION_270: hint = useInverseDegrees ? 0 : 180; break;\r
+ default: jassertfalse;\r
+ }\r
+\r
+ return (hint + 360) % 360;\r
+ }\r
+ };\r
+\r
+ //==============================================================================\r
+ class ScopedCameraDevice\r
+ {\r
+ public:\r
+ //==============================================================================\r
+ class CaptureSession\r
+ {\r
+ public:\r
+ struct ConfiguredCallback\r
+ {\r
+ virtual ~ConfiguredCallback() {}\r
+\r
+ virtual void captureSessionConfigured (CaptureSession*) = 0;\r
+ };\r
+\r
+ ~CaptureSession()\r
+ {\r
+ bool calledClose = false;\r
+\r
+ auto* env = getEnv();\r
+\r
+ {\r
+ const ScopedLock lock (captureSessionLock);\r
+\r
+ if (captureSession.get() != nullptr)\r
+ {\r
+ calledClose = true;\r
+\r
+ env->CallVoidMethod (captureSession, CameraCaptureSession.close);\r
+ }\r
+ }\r
+\r
+ auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+ // When exception occurs, CameraCaptureSession.close will never finish, so\r
+ // we should not wait for it. For fatal error an exception does occur, but\r
+ // it is catched internally in Java...\r
+ if (exception != 0 || scopedCameraDevice.fatalErrorOccurred.get())\r
+ {\r
+ JUCE_CAMERA_LOG ("Exception or fatal error occurred while closing Capture Session, closing by force");\r
+\r
+ env->ExceptionClear();\r
+ }\r
+ else if (calledClose)\r
+ {\r
+ pendingClose.set (1);\r
+ closedEvent.wait (-1);\r
+ }\r
+ }\r
+\r
+ bool openedOk() const noexcept { return captureSession != nullptr; }\r
+\r
+ const GlobalRef& getNativeSession() const { return captureSession; }\r
+\r
+ bool start (const LocalRef<jobject>& targetSurfacesList, GlobalRef& handlerToUse)\r
+ {\r
+ if (! openedOk())\r
+ {\r
+ jassertfalse;\r
+ return false;\r
+ }\r
+\r
+ auto* env = getEnv();\r
+\r
+ auto numSurfaces = env->CallIntMethod (targetSurfacesList, JavaArrayList.size);\r
+\r
+ for (int i = 0; i < numSurfaces; ++i)\r
+ {\r
+ auto surface = LocalRef<jobject> (env->CallObjectMethod (targetSurfacesList, JavaArrayList.get, (jint) i));\r
+ env->CallVoidMethod (captureRequestBuilder, CaptureRequestBuilder.addTarget, surface.get());\r
+ }\r
+\r
+ previewCaptureRequest = GlobalRef (env->CallObjectMethod (captureRequestBuilder, CaptureRequestBuilder.build));\r
+\r
+ env->CallIntMethod (captureSession, CameraCaptureSession.setRepeatingRequest,\r
+ previewCaptureRequest.get(), nullptr, handlerToUse.get());\r
+\r
+ return true;\r
+ }\r
+\r
+ void takeStillPicture (jobject targetSurface)\r
+ {\r
+ if (stillPictureTaker == nullptr)\r
+ {\r
+ // Can only take picture once session was successfully configured!\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ auto* env = getEnv();\r
+\r
+ static constexpr int templateStillCapture = 2;\r
+ auto builder = LocalRef<jobject> (env->CallObjectMethod (scopedCameraDevice.cameraDevice,\r
+ AndroidCameraDevice.createCaptureRequest,\r
+ (jint) templateStillCapture));\r
+\r
+ env->CallVoidMethod (builder, CaptureRequestBuilder.addTarget, targetSurface);\r
+\r
+ setCaptureRequestBuilderIntegerKey (builder.get(), CaptureRequest.CONTROL_AF_MODE, autoFocusMode);\r
+\r
+ auto stillPictureCaptureRequest = LocalRef<jobject> (env->CallObjectMethod (builder, CaptureRequestBuilder.build));\r
+\r
+ stillPictureTaker->takePicture (stillPictureCaptureRequest.get());\r
+ }\r
+\r
+ private:\r
+ //==============================================================================\r
+ class StillPictureTaker : private AndroidRunnable::Owner\r
+ {\r
+ public:\r
+ StillPictureTaker (GlobalRef& captureSessionToUse, GlobalRef& captureRequestBuilderToUse,\r
+ GlobalRef& previewCaptureRequestToUse, GlobalRef& handlerToUse,\r
+ int autoFocusModeToUse)\r
+ : captureSession (captureSessionToUse),\r
+ captureRequestBuilder (captureRequestBuilderToUse),\r
+ previewCaptureRequest (previewCaptureRequestToUse),\r
+ handler (handlerToUse),\r
+ runnable (*this),\r
+ captureSessionPreviewCaptureCallback (LocalRef<jobject> (getEnv()->NewObject (CameraCaptureSessionCaptureCallback,\r
+ CameraCaptureSessionCaptureCallback.constructor,\r
+ android.activity.get(),\r
+ reinterpret_cast<jlong> (this),\r
+ true))),\r
+ captureSessionStillPictureCaptureCallback (LocalRef<jobject> (getEnv()->NewObject (CameraCaptureSessionCaptureCallback,\r
+ CameraCaptureSessionCaptureCallback.constructor,\r
+ android.activity.get(),\r
+ reinterpret_cast<jlong> (this),\r
+ false))),\r
+ autoFocusMode (autoFocusModeToUse)\r
+ {\r
+ }\r
+\r
+ void takePicture (jobject stillPictureCaptureRequestToUse)\r
+ {\r
+ JUCE_CAMERA_LOG ("Taking picture...");\r
+\r
+ stillPictureCaptureRequest = GlobalRef (stillPictureCaptureRequestToUse);\r
+\r
+ lockFocus();\r
+ }\r
+\r
+ private:\r
+ GlobalRef& captureSession;\r
+ GlobalRef& captureRequestBuilder;\r
+ GlobalRef& previewCaptureRequest;\r
+ GlobalRef& handler;\r
+\r
+ AndroidRunnable runnable;\r
+ GlobalRef delayedCaptureRunnable;\r
+\r
+ GlobalRef captureSessionPreviewCaptureCallback;\r
+\r
+ GlobalRef stillPictureCaptureRequest;\r
+ GlobalRef captureSessionStillPictureCaptureCallback;\r
+\r
+ int autoFocusMode;\r
+\r
+ enum class State\r
+ {\r
+ idle = 0,\r
+ pendingFocusLock,\r
+ pendingExposurePrecapture,\r
+ pendingExposurePostPrecapture,\r
+ pictureTaken\r
+ };\r
+\r
+ State currentState = State::idle;\r
+\r
+ void lockFocus()\r
+ {\r
+ if (Pimpl::checkHasExceptionOccurred())\r
+ return;\r
+\r
+ JUCE_CAMERA_LOG ("Performing auto-focus if possible...");\r
+\r
+ currentState = State::pendingFocusLock;\r
+\r
+ auto* env = getEnv();\r
+\r
+ // NB: auto-focus may be unavailable on a device, in which case it may have already\r
+ // automatically adjusted the exposure. We check for that in updateState().\r
+ static constexpr int controlAfTriggerStart = 1;\r
+ CaptureSession::setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(),\r
+ CaptureRequest.CONTROL_AF_TRIGGER,\r
+ controlAfTriggerStart);\r
+\r
+ auto previewRequest = LocalRef<jobject> (env->CallObjectMethod (captureRequestBuilder,\r
+ CaptureRequestBuilder.build));\r
+\r
+ env->CallIntMethod (captureSession, CameraCaptureSession.capture, previewRequest.get(),\r
+ captureSessionPreviewCaptureCallback.get(), handler.get());\r
+ }\r
+\r
+ void updateState (jobject captureResult)\r
+ {\r
+ // IllegalStateException can be thrown when accessing CaptureSession,\r
+ // claiming that capture session was already closed but we may not\r
+ // get relevant callback yet, so check for this and bailout when needed.\r
+ if (Pimpl::checkHasExceptionOccurred())\r
+ return;\r
+\r
+ auto* env = getEnv();\r
+\r
+ switch (currentState)\r
+ {\r
+ case State::pendingFocusLock:\r
+ {\r
+ JUCE_CAMERA_LOG ("Still picture capture, updateState(), State::pendingFocusLock...");\r
+\r
+ auto controlAfStateValue = getCaptureResultIntegerKeyValue (CaptureResult.CONTROL_AF_STATE, captureResult);\r
+\r
+ if (controlAfStateValue.get() == nullptr)\r
+ {\r
+ captureStillPictureDelayed();\r
+ return;\r
+ }\r
+\r
+ auto autoToFocusNotAvailable = autoFocusMode == 0;\r
+\r
+ if (autoToFocusNotAvailable || autoFocusHasFinished (controlAfStateValue))\r
+ {\r
+ auto controlAeStateIntValue = getControlAEState (captureResult);\r
+ static constexpr int controlAeStateConverged = 2;\r
+\r
+ if (controlAeStateIntValue == -1 || controlAeStateIntValue == controlAeStateConverged)\r
+ {\r
+ currentState = State::pictureTaken;\r
+ captureStillPictureDelayed();\r
+ }\r
+ else\r
+ {\r
+ runPrecaptureSequence();\r
+ }\r
+ }\r
+\r
+ break;\r
+ }\r
+\r
+ case State::pendingExposurePrecapture:\r
+ {\r
+ JUCE_CAMERA_LOG ("Still picture capture, updateState(), State::pendingExposurePrecapture...");\r
+\r
+ auto controlAeStateIntValue = getControlAEState (captureResult);\r
+ static constexpr int controlAeStateFlashRequired = 4;\r
+ static constexpr int controlAeStatePrecapture = 5;\r
+\r
+ if (controlAeStateIntValue == -1 || controlAeStateIntValue == controlAeStateFlashRequired\r
+ || controlAeStateIntValue == controlAeStatePrecapture)\r
+ {\r
+ currentState = State::pendingExposurePostPrecapture;\r
+ }\r
+\r
+ break;\r
+ }\r
+\r
+ case State::pendingExposurePostPrecapture:\r
+ {\r
+ JUCE_CAMERA_LOG ("Still picture capture, updateState(), State::pendingExposurePostPrecapture...");\r
+\r
+ auto controlAeStateIntValue = getControlAEState (captureResult);\r
+ static constexpr int controlAeStatePrecapture = 5;\r
+\r
+ if (controlAeStateIntValue == -1 || controlAeStateIntValue != controlAeStatePrecapture)\r
+ {\r
+ currentState = State::pictureTaken;\r
+ captureStillPictureDelayed();\r
+ }\r
+\r
+ break;\r
+ }\r
+ case State::idle:\r
+ case State::pictureTaken:\r
+ { /* do nothing */ break; }\r
+ };\r
+ }\r
+\r
+ static int getControlAEState (jobject captureResult)\r
+ {\r
+ auto controlAeStateValue = getCaptureResultIntegerKeyValue (CaptureResult.CONTROL_AE_STATE, captureResult);\r
+\r
+ return controlAeStateValue.get() != nullptr\r
+ ? getEnv()->CallIntMethod (controlAeStateValue, JavaInteger.intValue) : -1;\r
+ }\r
+\r
+ static bool autoFocusHasFinished (const LocalRef<jobject>& controlAfStateValue)\r
+ {\r
+ static constexpr int controlAfStateFocusedLocked = 4;\r
+ static constexpr int controlAfStateNotFocusedLocked = 5;\r
+\r
+ auto controlAfStateIntValue = getEnv()->CallIntMethod (controlAfStateValue, JavaInteger.intValue);\r
+\r
+ return controlAfStateIntValue == controlAfStateFocusedLocked || controlAfStateIntValue == controlAfStateNotFocusedLocked;\r
+ }\r
+\r
+ static LocalRef<jobject> getCaptureResultIntegerKeyValue (jfieldID key, jobject captureResult)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto jKey = LocalRef<jobject> (env->GetStaticObjectField (CaptureResult, key));\r
+ return LocalRef<jobject> (env->CallObjectMethod (captureResult, CaptureResult.get, jKey.get()));\r
+ }\r
+\r
+ void captureStillPictureDelayed()\r
+ {\r
+ if (Pimpl::checkHasExceptionOccurred())\r
+ return;\r
+\r
+ JUCE_CAMERA_LOG ("Still picture capture, device ready, capturing now...");\r
+\r
+ auto* env = getEnv();\r
+\r
+ env->CallVoidMethod (captureSession, CameraCaptureSession.stopRepeating);\r
+\r
+ if (Pimpl::checkHasExceptionOccurred())\r
+ return;\r
+\r
+ env->CallVoidMethod (captureSession, CameraCaptureSession.abortCaptures);\r
+\r
+ if (Pimpl::checkHasExceptionOccurred())\r
+ return;\r
+\r
+ // Delay still picture capture for devices that can't handle it right after\r
+ // stopRepeating/abortCaptures calls.\r
+ if (delayedCaptureRunnable.get() == nullptr)\r
+ delayedCaptureRunnable = GlobalRef (CreateJavaInterface (&runnable, "java/lang/Runnable").get());\r
+\r
+ env->CallBooleanMethod (handler, AndroidHandler.postDelayed, delayedCaptureRunnable.get(), (jlong) 200);\r
+ }\r
+\r
+ void runPrecaptureSequence()\r
+ {\r
+ if (Pimpl::checkHasExceptionOccurred())\r
+ return;\r
+\r
+ auto* env = getEnv();\r
+\r
+ static constexpr int controlAePrecaptureTriggerStart = 1;\r
+ CaptureSession::setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(),\r
+ CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER,\r
+ controlAePrecaptureTriggerStart);\r
+\r
+ currentState = State::pendingExposurePrecapture;\r
+\r
+ auto previewRequest = LocalRef<jobject> (env->CallObjectMethod (captureRequestBuilder,\r
+ CaptureRequestBuilder.build));\r
+\r
+ env->CallIntMethod (captureSession, CameraCaptureSession.capture, previewRequest.get(),\r
+ captureSessionPreviewCaptureCallback.get(), handler.get());\r
+ }\r
+\r
+ void unlockFocus()\r
+ {\r
+ if (Pimpl::checkHasExceptionOccurred())\r
+ return;\r
+\r
+ JUCE_CAMERA_LOG ("Unlocking focus...");\r
+\r
+ currentState = State::idle;\r
+\r
+ auto* env = getEnv();\r
+\r
+ static constexpr int controlAfTriggerCancel = 2;\r
+ CaptureSession::setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(),\r
+ CaptureRequest.CONTROL_AF_TRIGGER,\r
+ controlAfTriggerCancel);\r
+\r
+ auto resetAutoFocusRequest = LocalRef<jobject> (env->CallObjectMethod (captureRequestBuilder,\r
+ CaptureRequestBuilder.build));\r
+\r
+ env->CallIntMethod (captureSession, CameraCaptureSession.capture, resetAutoFocusRequest.get(),\r
+ nullptr, handler.get());\r
+\r
+ if (Pimpl::checkHasExceptionOccurred())\r
+ return;\r
+\r
+ // NB: for preview, using preview capture request again\r
+ env->CallIntMethod (captureSession, CameraCaptureSession.setRepeatingRequest, previewCaptureRequest.get(),\r
+ nullptr, handler.get());\r
+ }\r
+ //==============================================================================\r
+ void run() override\r
+ {\r
+ captureStillPicture();\r
+ }\r
+\r
+ void captureStillPicture()\r
+ {\r
+ getEnv()->CallIntMethod (captureSession, CameraCaptureSession.capture,\r
+ stillPictureCaptureRequest.get(), captureSessionStillPictureCaptureCallback.get(),\r
+ nullptr);\r
+ }\r
+\r
+ //==============================================================================\r
+ void cameraCaptureSessionCaptureCompleted (bool isPreview, jobject session, jobject request, jobject result)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureCompleted()");\r
+\r
+ ignoreUnused (session, request);\r
+\r
+ if (isPreview)\r
+ updateState (result);\r
+ else if (currentState != State::idle)\r
+ unlockFocus();\r
+ }\r
+\r
+ void cameraCaptureSessionCaptureFailed (bool isPreview, jobject session, jobject request, jobject failure)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureFailed()");\r
+\r
+ ignoreUnused (isPreview, session, request, failure);\r
+ }\r
+\r
+ void cameraCaptureSessionCaptureProgressed (bool isPreview, jobject session, jobject request, jobject partialResult)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureProgressed()");\r
+\r
+ ignoreUnused (session, request);\r
+\r
+ if (isPreview)\r
+ updateState (partialResult);\r
+ }\r
+\r
+ void cameraCaptureSessionCaptureSequenceAborted (bool isPreview, jobject session, int sequenceId)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureSequenceAborted()");\r
+\r
+ ignoreUnused (isPreview, isPreview, session, sequenceId);\r
+ }\r
+\r
+ void cameraCaptureSessionCaptureSequenceCompleted (bool isPreview, jobject session, int sequenceId, int64 frameNumber)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureSequenceCompleted()");\r
+\r
+ ignoreUnused (isPreview, session, sequenceId, frameNumber);\r
+ }\r
+\r
+ void cameraCaptureSessionCaptureStarted (bool isPreview, jobject session, jobject request, int64 timestamp, int64 frameNumber)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionCaptureStarted()");\r
+\r
+ ignoreUnused (isPreview, session, request, timestamp, frameNumber);\r
+ }\r
+\r
+ friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+ friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+ };\r
+\r
+ //==============================================================================\r
+ ScopedCameraDevice& scopedCameraDevice;\r
+ ConfiguredCallback& configuredCallback;\r
+ GlobalRef& handler;\r
+\r
+ GlobalRef captureRequestBuilder;\r
+ GlobalRef previewCaptureRequest;\r
+\r
+ GlobalRef captureSessionStateCallback;\r
+ int autoFocusMode;\r
+\r
+ GlobalRef captureSession;\r
+ CriticalSection captureSessionLock;\r
+\r
+ Atomic<int> pendingClose { 0 };\r
+\r
+ std::unique_ptr<StillPictureTaker> stillPictureTaker;\r
+\r
+ WaitableEvent closedEvent;\r
+\r
+ JUCE_DECLARE_WEAK_REFERENCEABLE (CaptureSession)\r
+\r
+ //==============================================================================\r
+ CaptureSession (ScopedCameraDevice& scopedCameraDeviceToUse, ConfiguredCallback& configuredCallbackToUse,\r
+ const LocalRef<jobject>& surfacesList, GlobalRef& handlerToUse,\r
+ int captureSessionTemplate, int autoFocusModeToUse)\r
+ : scopedCameraDevice (scopedCameraDeviceToUse),\r
+ configuredCallback (configuredCallbackToUse),\r
+ handler (handlerToUse),\r
+ captureRequestBuilder (LocalRef<jobject> (getEnv()->CallObjectMethod (scopedCameraDevice.cameraDevice,\r
+ AndroidCameraDevice.createCaptureRequest,\r
+ (jint) captureSessionTemplate))),\r
+ captureSessionStateCallback (LocalRef<jobject> (getEnv()->NewObject (CameraCaptureSessionStateCallback,\r
+ CameraCaptureSessionStateCallback.constructor,\r
+ android.activity.get(),\r
+ reinterpret_cast<jlong> (this)))),\r
+ autoFocusMode (autoFocusModeToUse)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ env->CallVoidMethod (scopedCameraDevice.cameraDevice, AndroidCameraDevice.createCaptureSession,\r
+ surfacesList.get(), captureSessionStateCallback.get(), handler.get());\r
+\r
+ static constexpr int controlModeAuto = 1;\r
+ setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(), CaptureRequest.CONTROL_MODE, controlModeAuto);\r
+\r
+ setCaptureRequestBuilderIntegerKey (captureRequestBuilder.get(), CaptureRequest.CONTROL_AF_MODE, autoFocusMode);\r
+ }\r
+\r
+ static void setCaptureRequestBuilderIntegerKey (jobject captureRequestBuilder, jfieldID key, int value)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto jKey = LocalRef<jobject> (env->GetStaticObjectField (CaptureRequest, key));\r
+ auto jValue = LocalRef<jobject> (env->CallStaticObjectMethod (JavaInteger, JavaInteger.valueOf, (jint) value));\r
+\r
+ env->CallVoidMethod (captureRequestBuilder, CaptureRequestBuilder.set, jKey.get(), jValue.get());\r
+ }\r
+\r
+ void cameraCaptureSessionActive (jobject session)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionActive()");\r
+ ignoreUnused (session);\r
+ }\r
+\r
+ void cameraCaptureSessionClosed (jobject session)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionClosed()");\r
+ ignoreUnused (session);\r
+\r
+ closedEvent.signal();\r
+ }\r
+\r
+ void cameraCaptureSessionConfigureFailed (jobject session)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionConfigureFailed()");\r
+ ignoreUnused (session);\r
+\r
+ WeakReference<CaptureSession> weakRef (this);\r
+\r
+ MessageManager::callAsync ([this, weakRef]()\r
+ {\r
+ if (weakRef == nullptr)\r
+ return;\r
+\r
+ configuredCallback.captureSessionConfigured (nullptr);\r
+ });\r
+ }\r
+\r
+ void cameraCaptureSessionConfigured (jobject session)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionConfigured()");\r
+\r
+ if (pendingClose.get() == 1)\r
+ {\r
+ // Already closing, bailout.\r
+ closedEvent.signal();\r
+\r
+ GlobalRef s (session);\r
+\r
+ MessageManager::callAsync ([s]()\r
+ {\r
+ getEnv()->CallVoidMethod (s, CameraCaptureSession.close);\r
+ });\r
+\r
+ return;\r
+ }\r
+\r
+ {\r
+ const ScopedLock lock (captureSessionLock);\r
+ captureSession = GlobalRef (session);\r
+ }\r
+\r
+ WeakReference<CaptureSession> weakRef (this);\r
+\r
+ MessageManager::callAsync ([this, weakRef]()\r
+ {\r
+ if (weakRef == nullptr)\r
+ return;\r
+\r
+ stillPictureTaker.reset (new StillPictureTaker (captureSession, captureRequestBuilder,\r
+ previewCaptureRequest, handler, autoFocusMode));\r
+\r
+ configuredCallback.captureSessionConfigured (this);\r
+ });\r
+ }\r
+\r
+ void cameraCaptureSessionReady (jobject session)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraCaptureSessionReady()");\r
+ ignoreUnused (session);\r
+ }\r
+\r
+ friend class ScopedCameraDevice;\r
+\r
+ friend void juce_cameraCaptureSessionActive (int64, void*);\r
+ friend void juce_cameraCaptureSessionClosed (int64, void*);\r
+ friend void juce_cameraCaptureSessionConfigureFailed (int64, void*);\r
+ friend void juce_cameraCaptureSessionConfigured (int64, void*);\r
+ friend void juce_cameraCaptureSessionReady (int64, void*);\r
+\r
+ friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+ friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+\r
+ JUCE_DECLARE_NON_COPYABLE (CaptureSession)\r
+ };\r
+\r
+ //==============================================================================\r
+ ScopedCameraDevice (Pimpl& ownerToUse, const String& cameraIdToUse, GlobalRef& cameraManagerToUse,\r
+ GlobalRef& handlerToUse, int autoFocusModeToUse)\r
+ : owner (ownerToUse),\r
+ cameraId (cameraIdToUse),\r
+ cameraManager (cameraManagerToUse),\r
+ handler (handlerToUse),\r
+ cameraStateCallback (LocalRef<jobject> (getEnv()->NewObject (CameraDeviceStateCallback,\r
+ CameraDeviceStateCallback.constructor,\r
+ android.activity.get(),\r
+ reinterpret_cast<jlong> (this)))),\r
+ autoFocusMode (autoFocusModeToUse)\r
+ {\r
+ open();\r
+ }\r
+\r
+ ~ScopedCameraDevice()\r
+ {\r
+ close();\r
+ }\r
+\r
+ void open()\r
+ {\r
+ pendingOpen.set (1);\r
+\r
+ auto* env = getEnv();\r
+\r
+ env->CallVoidMethod (cameraManager, CameraManager.openCamera,\r
+ javaString (cameraId).get(),\r
+ cameraStateCallback.get(), handler.get());\r
+\r
+ // If something went wrong we will be pinged in cameraDeviceStateError()\r
+ // callback, silence the redundant exception.\r
+ auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+ if (exception != 0)\r
+ env->ExceptionClear();\r
+ }\r
+\r
+ void close()\r
+ {\r
+ if (pendingClose.compareAndSetBool (1, 0))\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ if (cameraDevice.get() != nullptr)\r
+ {\r
+ env->CallVoidMethod (cameraDevice, AndroidCameraDevice.close);\r
+ closedEvent.wait (-1);\r
+ }\r
+\r
+ pendingClose.set (0);\r
+ pendingOpen .set (0);\r
+ cameraDevice.clear();\r
+ }\r
+ }\r
+\r
+ bool openedOk() const { return cameraDevice != nullptr; }\r
+\r
+ bool hasErrorOccurred() const { return fatalErrorOccurred.get(); }\r
+\r
+ CaptureSession* createCaptureSession (CaptureSession::ConfiguredCallback& cc,\r
+ const LocalRef<jobject>& surfacesList,\r
+ GlobalRef& handlerToUse,\r
+ int captureSessionTemplate)\r
+ {\r
+ if (! openedOk())\r
+ {\r
+ jassertfalse;\r
+ return nullptr;\r
+ }\r
+\r
+ return new CaptureSession (*this, cc, surfacesList, handlerToUse, captureSessionTemplate, autoFocusMode);\r
+ }\r
+\r
+ private:\r
+ Pimpl& owner;\r
+ const String cameraId;\r
+ GlobalRef& cameraManager;\r
+ GlobalRef& handler;\r
+\r
+ GlobalRef cameraStateCallback;\r
+ int autoFocusMode;\r
+\r
+ GlobalRef cameraDevice;\r
+ Atomic<int> pendingOpen { 0 };\r
+ Atomic<int> pendingClose { 0 };\r
+ Atomic<int> fatalErrorOccurred { 0 };\r
+ String openError;\r
+\r
+ WaitableEvent closedEvent;\r
+\r
+ void cameraDeviceStateClosed()\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraDeviceStateClosed()");\r
+\r
+ closedEvent.signal();\r
+ }\r
+\r
+ void cameraDeviceStateDisconnected()\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraDeviceStateDisconnected()");\r
+\r
+ if (pendingOpen.compareAndSetBool (0, 1))\r
+ {\r
+ openError = "Device disconnected";\r
+\r
+ notifyOpenResult();\r
+ }\r
+\r
+ MessageManager::callAsync ([this]() { close(); });\r
+ }\r
+\r
+ void cameraDeviceStateError (int errorCode)\r
+ {\r
+ String error = cameraErrorCodeToString (errorCode);\r
+\r
+ JUCE_CAMERA_LOG ("cameraDeviceStateError(), error: " + error);\r
+\r
+ if (pendingOpen.compareAndSetBool (0, 1))\r
+ {\r
+ openError = error;\r
+\r
+ notifyOpenResult();\r
+ }\r
+\r
+ fatalErrorOccurred.set (1);\r
+\r
+ MessageManager::callAsync ([this, error]()\r
+ {\r
+ owner.cameraDeviceError (error);\r
+ close();\r
+ });\r
+ }\r
+\r
+ void cameraDeviceStateOpened (jobject cameraDeviceToUse)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraDeviceStateOpened()");\r
+\r
+ pendingOpen.set (0);\r
+\r
+ cameraDevice = GlobalRef (cameraDeviceToUse);\r
+\r
+ notifyOpenResult();\r
+ }\r
+\r
+ void notifyOpenResult()\r
+ {\r
+ MessageManager::callAsync ([this]() { owner.cameraOpenFinished (openError); });\r
+ }\r
+\r
+ friend void juce_cameraDeviceStateClosed (int64);\r
+ friend void juce_cameraDeviceStateDisconnected (int64);\r
+ friend void juce_cameraDeviceStateError (int64, int);\r
+ friend void juce_cameraDeviceStateOpened (int64, void*);\r
+\r
+ friend void juce_cameraCaptureSessionActive (int64, void*);\r
+ friend void juce_cameraCaptureSessionClosed (int64, void*);\r
+ friend void juce_cameraCaptureSessionConfigureFailed (int64, void*);\r
+ friend void juce_cameraCaptureSessionConfigured (int64, void*);\r
+ friend void juce_cameraCaptureSessionReady (int64, void*);\r
+\r
+ friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+ friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+ };\r
+\r
+ //==============================================================================\r
+ struct CaptureSessionModeBase\r
+ {\r
+ virtual ~CaptureSessionModeBase() { }\r
+\r
+ virtual bool isVideoRecordSession() const = 0;\r
+\r
+ virtual void triggerStillPictureCapture() = 0;\r
+ };\r
+\r
+ //==============================================================================\r
+ template <typename Mode>\r
+ struct CaptureSessionMode : public CaptureSessionModeBase,\r
+ private PreviewDisplay::Listener,\r
+ private ScopedCameraDevice::CaptureSession::ConfiguredCallback\r
+ {\r
+ ~CaptureSessionMode()\r
+ {\r
+ captureSession.reset();\r
+\r
+ previewDisplay.removeListener (this);\r
+ }\r
+\r
+ bool isVideoRecordSession() const override\r
+ {\r
+ return Mode::isVideoRecord();\r
+ }\r
+\r
+ void triggerStillPictureCapture() override\r
+ {\r
+ if (captureSession == nullptr)\r
+ {\r
+ // The capture session must be ready before taking a still picture.\r
+ // Did you remember to create and show a preview display?\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ crtp().takeStillPicture();\r
+ }\r
+\r
+ protected:\r
+ CaptureSessionMode (Pimpl& ownerToUse, ScopedCameraDevice& cameraDeviceToUse,\r
+ GlobalRef& handlerToUse, PreviewDisplay& pd, int cameraSensorOrientationToUse,\r
+ int cameraLensFacingToUse, StreamConfigurationMap& streamConfigurationMapToUse)\r
+ : owner (ownerToUse),\r
+ scopedCameraDevice (cameraDeviceToUse),\r
+ handler (handlerToUse),\r
+ previewDisplay (pd),\r
+ cameraSensorOrientation (cameraSensorOrientationToUse),\r
+ cameraLensFacing (cameraLensFacingToUse),\r
+ streamConfigurationMap (streamConfigurationMapToUse)\r
+ {\r
+ WeakReference<CaptureSessionMode<Mode>> weakRef (this);\r
+\r
+ if (weakRef == nullptr)\r
+ return;\r
+\r
+ // async so that the object is fully constructed before the callback gets invoked\r
+ MessageManager::callAsync ([this, weakRef]()\r
+ {\r
+ if (weakRef == nullptr)\r
+ return;\r
+\r
+ previewDisplay.addListener (this);\r
+ });\r
+ }\r
+\r
+ Mode& crtp() { return static_cast<Mode&> (*this); }\r
+\r
+ void previewDisplayReady() override\r
+ {\r
+ jassert (previewDisplay.isReady());\r
+\r
+ JUCE_CAMERA_LOG ("previewDisplayReady()");\r
+\r
+ // close previous capture session first\r
+ captureSession.reset();\r
+\r
+ if (scopedCameraDevice.hasErrorOccurred())\r
+ {\r
+ JUCE_CAMERA_LOG ("Device error detected, not recreating a new camera session. The device needs to be reopened.");\r
+ return;\r
+ }\r
+\r
+ captureSession.reset (scopedCameraDevice.createCaptureSession (*this, crtp().getCaptureSessionSurfaces(),\r
+ handler, Mode::getTemplate()));\r
+ }\r
+\r
+ void previewDisplayAboutToBeDestroyed() override\r
+ {\r
+ JUCE_CAMERA_LOG ("previewDisplayAboutToBeDestroyed()");\r
+\r
+ stopPreview();\r
+ }\r
+\r
+ void captureSessionConfigured (ScopedCameraDevice::CaptureSession* session) override\r
+ {\r
+ if (session == nullptr)\r
+ {\r
+ owner.cameraDeviceError ("Failed to configure camera session.");\r
+ return;\r
+ }\r
+\r
+ jassert (session == captureSession.get());\r
+\r
+ startSession();\r
+ }\r
+\r
+ void startSession()\r
+ {\r
+ if (! captureSession->start (crtp().getTargetSurfaces(), handler))\r
+ {\r
+ jassertfalse;\r
+ JUCE_CAMERA_LOG ("Could not start capture session");\r
+ }\r
+\r
+ crtp().sessionStarted();\r
+ }\r
+\r
+ void stopPreview()\r
+ {\r
+ if (captureSession != nullptr)\r
+ {\r
+ auto session = captureSession->getNativeSession();\r
+\r
+ auto* env = getEnv();\r
+\r
+ env->CallVoidMethod (session, CameraCaptureSession.stopRepeating);\r
+\r
+ if (Pimpl::checkHasExceptionOccurred())\r
+ return;\r
+\r
+ env->CallVoidMethod (session, CameraCaptureSession.abortCaptures);\r
+\r
+ Pimpl::checkHasExceptionOccurred();\r
+ }\r
+ }\r
+\r
+ Pimpl& owner;\r
+ ScopedCameraDevice& scopedCameraDevice;\r
+ GlobalRef& handler;\r
+ PreviewDisplay& previewDisplay;\r
+ int cameraSensorOrientation;\r
+ int cameraLensFacing;\r
+ StreamConfigurationMap& streamConfigurationMap;\r
+\r
+ std::unique_ptr<ScopedCameraDevice::CaptureSession> captureSession;\r
+\r
+ JUCE_DECLARE_WEAK_REFERENCEABLE (CaptureSessionMode<Mode>)\r
+ };\r
+\r
+ //==============================================================================\r
+ struct CaptureSessionPreviewMode : public CaptureSessionMode<CaptureSessionPreviewMode>\r
+ {\r
+ CaptureSessionPreviewMode (Pimpl& ownerToUse, ScopedCameraDevice& cameraDeviceToUse, GlobalRef& handlerToUse,\r
+ PreviewDisplay& pd, ImageReader& ir, int cameraSensorOrientation,\r
+ int cameraLensFacingToUse, StreamConfigurationMap& streamConfigurationMapToUse)\r
+ : CaptureSessionMode<CaptureSessionPreviewMode> (ownerToUse, cameraDeviceToUse, handlerToUse, pd,\r
+ cameraSensorOrientation, cameraLensFacingToUse, streamConfigurationMapToUse),\r
+ imageReader (ir)\r
+ {\r
+ }\r
+\r
+ // Surfaces passed to newly created capture session.\r
+ LocalRef<jobject> getCaptureSessionSurfaces() const\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto previewSurface = LocalRef<jobject> (previewDisplay.createSurface());\r
+ auto imageSurface = LocalRef<jobject> (imageReader.getSurface());\r
+\r
+ auto arrayList = LocalRef<jobject> (env->NewObject (JavaArrayList, JavaArrayList.constructor, 2));\r
+ env->CallBooleanMethod (arrayList, JavaArrayList.add, previewSurface.get());\r
+ env->CallBooleanMethod (arrayList, JavaArrayList.add, imageSurface.get());\r
+\r
+ auto supported = streamConfigurationMap.isOutputSupportedForSurface (imageSurface);\r
+\r
+ // Output surface is not supported by this device, still image capture will not work!\r
+ jassert (supported);\r
+\r
+ return arrayList;\r
+ }\r
+\r
+ // Surfaces set as target during capture.\r
+ LocalRef<jobject> getTargetSurfaces() const\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto previewSurface = LocalRef<jobject> (previewDisplay.createSurface());\r
+\r
+ auto arrayList = LocalRef<jobject> (env->NewObject (JavaArrayList, JavaArrayList.constructor, 1));\r
+ env->CallBooleanMethod (arrayList, JavaArrayList.add, previewSurface.get());\r
+\r
+ return arrayList;\r
+ }\r
+\r
+ static int getTemplate()\r
+ {\r
+ static constexpr int templatePreview = 1;\r
+ return templatePreview;\r
+ }\r
+\r
+ static bool isVideoRecord() { return false; }\r
+\r
+ void sessionStarted() {}\r
+\r
+ void takeStillPicture()\r
+ {\r
+ imageReader.resetNotificationFlag();\r
+ captureSession->takeStillPicture (imageReader.getSurface());\r
+ }\r
+\r
+ private:\r
+ ImageReader& imageReader;\r
+ };\r
+\r
+ //==============================================================================\r
+ struct CaptureSessionVideoRecordingMode : public CaptureSessionMode<CaptureSessionVideoRecordingMode>\r
+ {\r
+ CaptureSessionVideoRecordingMode (Pimpl& ownerToUse, ScopedCameraDevice& cameraDeviceToUse, GlobalRef& handlerToUse,\r
+ PreviewDisplay& pd, MediaRecorder& mr, int cameraSensorOrientation,\r
+ int cameraLensFacingToUse, StreamConfigurationMap& streamConfigurationMapToUse)\r
+ : CaptureSessionMode<CaptureSessionVideoRecordingMode> (ownerToUse, cameraDeviceToUse, handlerToUse, pd,\r
+ cameraSensorOrientation, cameraLensFacingToUse, streamConfigurationMapToUse),\r
+ mediaRecorder (mr)\r
+ {\r
+ }\r
+\r
+ ~CaptureSessionVideoRecordingMode()\r
+ {\r
+ // We need to explicitly stop the preview before stopping the media recorder,\r
+ // because legacy devices can't handle recording stop before stopping the preview.\r
+ stopPreview();\r
+\r
+ mediaRecorder.stop();\r
+ }\r
+\r
+ // Surfaces passed to newly created capture session.\r
+ LocalRef<jobject> getCaptureSessionSurfaces() const\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto previewSurface = LocalRef<jobject> (previewDisplay.createSurface());\r
+ auto mediaRecorderSurface = LocalRef<jobject> (mediaRecorder.getSurface());\r
+\r
+ auto arrayList = LocalRef<jobject> (env->NewObject (JavaArrayList, JavaArrayList.constructor, 2));\r
+ env->CallBooleanMethod (arrayList, JavaArrayList.add, previewSurface.get());\r
+ env->CallBooleanMethod (arrayList, JavaArrayList.add, mediaRecorderSurface.get());\r
+\r
+ return arrayList;\r
+ }\r
+\r
+ // Surfaces set as target during capture.\r
+ LocalRef<jobject> getTargetSurfaces() const\r
+ {\r
+ // Same surfaces used.\r
+ return getCaptureSessionSurfaces();\r
+ }\r
+\r
+ static int getTemplate()\r
+ {\r
+ static constexpr int templateRecord = 3;\r
+ return templateRecord;\r
+ }\r
+\r
+ static bool isVideoRecord() { return true; }\r
+\r
+ void sessionStarted()\r
+ {\r
+ MessageManager::callAsync ([this]() { mediaRecorder.start(); });\r
+ }\r
+\r
+ void takeStillPicture()\r
+ {\r
+ // Taking still pictures while recording video is not supported on Android.\r
+ jassertfalse;\r
+ }\r
+\r
+ private:\r
+ MediaRecorder& mediaRecorder;\r
+ };\r
+\r
+ //==============================================================================\r
+ class DeviceOrientationChangeListener : private Timer\r
+ {\r
+ public:\r
+ DeviceOrientationChangeListener (PreviewDisplay& pd)\r
+ : previewDisplay (pd),\r
+ orientationEventListener (getEnv()->NewObject (OrientationEventListener,\r
+ OrientationEventListener.constructor,\r
+ android.activity.get(),\r
+ reinterpret_cast<jlong> (this),\r
+ android.activity.get(),\r
+ sensorDelayUI)),\r
+ canDetectChange (getEnv()->CallBooleanMethod (orientationEventListener,\r
+ OrientationEventListener.canDetectOrientation) != 0),\r
+ deviceOrientation (Desktop::getInstance().getCurrentOrientation()),\r
+ lastKnownScreenOrientation (deviceOrientation)\r
+ {\r
+ setEnabled (true);\r
+ }\r
+\r
+ ~DeviceOrientationChangeListener()\r
+ {\r
+ setEnabled (false);\r
+ }\r
+\r
+ void setEnabled (bool shouldBeEnabled)\r
+ {\r
+ if (shouldBeEnabled && ! canDetectChange)\r
+ {\r
+ // This device does not support orientation listening, photos may have wrong orientation!\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ if (shouldBeEnabled)\r
+ getEnv()->CallVoidMethod (orientationEventListener, OrientationEventListener.enable);\r
+ else\r
+ getEnv()->CallVoidMethod (orientationEventListener, OrientationEventListener.disable);\r
+ }\r
+\r
+ bool isSupported() const noexcept { return canDetectChange; }\r
+\r
+ Desktop::DisplayOrientation getDeviceOrientation() const noexcept\r
+ {\r
+ return deviceOrientation;\r
+ }\r
+\r
+ private:\r
+ PreviewDisplay& previewDisplay;\r
+\r
+ GlobalRef orientationEventListener;\r
+ static constexpr jint sensorDelayUI = 2;\r
+\r
+ bool canDetectChange;\r
+ Desktop::DisplayOrientation deviceOrientation;\r
+\r
+ Desktop::DisplayOrientation lastKnownScreenOrientation;\r
+ int numChecksForOrientationChange = 10;\r
+\r
+ void orientationChanged (int orientation)\r
+ {\r
+ jassert (orientation < 360);\r
+\r
+ // -1 == unknown\r
+ if (orientation < 0)\r
+ return;\r
+\r
+ auto oldOrientation = deviceOrientation;\r
+\r
+ // NB: this assumes natural position to be portrait always, but some devices may be landscape...\r
+ if (orientation > (360 - 45) || orientation < 45)\r
+ deviceOrientation = Desktop::upright;\r
+ else if (orientation < 135)\r
+ deviceOrientation = Desktop::rotatedClockwise;\r
+ else if (orientation < 225)\r
+ deviceOrientation = Desktop::upsideDown;\r
+ else\r
+ deviceOrientation = Desktop::rotatedAntiClockwise;\r
+\r
+ if (oldOrientation != deviceOrientation)\r
+ {\r
+ lastKnownScreenOrientation = Desktop::getInstance().getCurrentOrientation();\r
+\r
+ // Need to update preview transform, but screen orientation will change slightly\r
+ // later than sensor orientation.\r
+ startTimer (500);\r
+ }\r
+ }\r
+\r
+ void timerCallback() override\r
+ {\r
+ auto currentOrientation = Desktop::getInstance().getCurrentOrientation();\r
+\r
+ if (lastKnownScreenOrientation != currentOrientation)\r
+ {\r
+ lastKnownScreenOrientation = currentOrientation;\r
+\r
+ stopTimer();\r
+ numChecksForOrientationChange = 10;\r
+ previewDisplay.updateSurfaceTransform();\r
+\r
+ return;\r
+ }\r
+\r
+ if (--numChecksForOrientationChange == 0)\r
+ {\r
+ stopTimer();\r
+ numChecksForOrientationChange = 10;\r
+ }\r
+ }\r
+\r
+ friend void juce_deviceOrientationChanged (int64, int);\r
+ };\r
+\r
+ //==============================================================================\r
+ CameraDevice& owner;\r
+ int minWidth, minHeight, maxWidth, maxHeight;\r
+\r
+ String cameraId;\r
+ InternalOpenCameraResultCallback cameraOpenCallback;\r
+\r
+ #if __ANDROID_API__ >= 21\r
+ AppPausedResumedListener appPausedResumedListener;\r
+ GlobalRef appPausedResumedListenerNative;\r
+\r
+ GlobalRef cameraManager;\r
+ GlobalRef cameraCharacteristics;\r
+ GlobalRef handlerThread;\r
+ GlobalRef handler;\r
+\r
+ StreamConfigurationMap streamConfigurationMap;\r
+ PreviewDisplay previewDisplay;\r
+ DeviceOrientationChangeListener deviceOrientationChangeListener;\r
+ std::unique_ptr<ImageReader> imageReader;\r
+ std::unique_ptr<MediaRecorder> mediaRecorder;\r
+\r
+ std::unique_ptr<CaptureSessionModeBase> currentCaptureSessionMode;\r
+\r
+ std::unique_ptr<ScopedCameraDevice> scopedCameraDevice;\r
+\r
+ CriticalSection listenerLock;\r
+ ListenerList<Listener> listeners;\r
+\r
+ std::function<void (const Image&)> pictureTakenCallback;\r
+\r
+ Time firstRecordedFrameTimeMs;\r
+ bool notifiedOfCameraOpening = false;\r
+ #endif\r
+\r
+ bool appWasPaused = false;\r
+\r
+ //==============================================================================\r
+ int getCameraSensorOrientation() const\r
+ {\r
+ return getCameraCharacteristicsIntegerKeyValue (CameraCharacteristics.SENSOR_ORIENTATION);\r
+ }\r
+\r
+ int getAutoFocusModeToUse() const\r
+ {\r
+ auto supportedModes = getSupportedAutoFocusModes();\r
+\r
+ enum\r
+ {\r
+ CONTROL_AF_MODE_OFF = 0,\r
+ CONTROL_AF_MODE_AUTO = 1,\r
+ CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4\r
+ };\r
+\r
+ if (supportedModes.contains (CONTROL_AF_MODE_CONTINUOUS_PICTURE))\r
+ return CONTROL_AF_MODE_CONTINUOUS_PICTURE;\r
+\r
+ if (supportedModes.contains (CONTROL_AF_MODE_AUTO))\r
+ return CONTROL_AF_MODE_AUTO;\r
+\r
+ return CONTROL_AF_MODE_OFF;\r
+ }\r
+\r
+ Array<int> getSupportedAutoFocusModes() const\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto jKey = LocalRef<jobject> (env->GetStaticObjectField (CameraCharacteristics, CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES));\r
+\r
+ auto supportedModes = LocalRef<jintArray> ((jintArray) env->CallObjectMethod (cameraCharacteristics,\r
+ CameraCharacteristics.get,\r
+ jKey.get()));\r
+\r
+ return jintArrayToJuceArray (supportedModes);\r
+ }\r
+\r
+ static Array<int> jintArrayToJuceArray (const LocalRef<jintArray>& jArray)\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto* jArrayElems = env->GetIntArrayElements (jArray, 0);\r
+ auto numElems = env->GetArrayLength (jArray);\r
+\r
+ Array<int> juceArray;\r
+\r
+ for (int s = 0; s < numElems; ++s)\r
+ juceArray.add (jArrayElems[s]);\r
+\r
+ env->ReleaseIntArrayElements (jArray, jArrayElems, 0);\r
+ return juceArray;\r
+ }\r
+\r
+ int getCameraCharacteristicsIntegerKeyValue (jfieldID key) const\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto jKey = LocalRef<jobject> (env->GetStaticObjectField (CameraCharacteristics, key));\r
+\r
+ auto jValue = LocalRef<jobject> (env->CallObjectMethod (cameraCharacteristics,\r
+ CameraCharacteristics.get,\r
+ jKey.get()));\r
+\r
+ return env->CallIntMethod (jValue, JavaInteger.intValue);\r
+ }\r
+\r
+ int getCameraLensFacing() const\r
+ {\r
+ return getCameraCharacteristicsIntegerKeyValue (CameraCharacteristics.LENS_FACING);\r
+ }\r
+\r
+ //==============================================================================\r
+ void cameraOpenFinished (const String& error)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraOpenFinished(), error = " + error);\r
+\r
+ if (error.isEmpty())\r
+ {\r
+ setupStillImageSize();\r
+ startPreviewMode (*imageReader);\r
+ }\r
+\r
+ // Do not notify about camera being reopened on app resume.\r
+ if (! notifiedOfCameraOpening)\r
+ {\r
+ notifiedOfCameraOpening = true;\r
+\r
+ invokeCameraOpenCallback (error);\r
+ }\r
+ }\r
+\r
+ void cameraDeviceError (const String& error)\r
+ {\r
+ if (owner.onErrorOccurred != nullptr)\r
+ owner.onErrorOccurred (error);\r
+ }\r
+\r
+ void invokeCameraOpenCallback (const String& error)\r
+ {\r
+ JUCE_CAMERA_LOG ("invokeCameraOpenCallback(), error = " + error);\r
+\r
+ if (cameraOpenCallback != nullptr)\r
+ cameraOpenCallback (cameraId, error);\r
+ }\r
+\r
+ //==============================================================================\r
+ void callListeners (const Image& image)\r
+ {\r
+ const ScopedLock sl (listenerLock);\r
+ listeners.call ([=] (Listener& l) { l.imageReceived (image); });\r
+ }\r
+\r
+ void notifyPictureTaken (const Image& image)\r
+ {\r
+ JUCE_CAMERA_LOG ("notifyPictureTaken()");\r
+\r
+ if (pictureTakenCallback != nullptr)\r
+ pictureTakenCallback (image);\r
+ }\r
+\r
+ void triggerStillPictureCapture()\r
+ {\r
+ currentCaptureSessionMode->triggerStillPictureCapture();\r
+ }\r
+\r
+ //==============================================================================\r
+ void setupStillImageSize()\r
+ {\r
+ imageReader.reset();\r
+\r
+ auto imageSize = chooseBestSize (minWidth, minHeight, maxWidth, maxHeight,\r
+ streamConfigurationMap.getSupportedStillImageOutputSizes());\r
+\r
+ imageReader.reset (new ImageReader (*this, handler, imageSize.getWidth(), imageSize.getHeight(),\r
+ getCameraSensorOrientation()));\r
+ }\r
+\r
+ static Rectangle<int> chooseBestSize (int minWidth, int minHeight, int maxWidth, int maxHeight,\r
+ Array<Rectangle<int>> supportedSizes)\r
+ {\r
+ Rectangle<int> result;\r
+\r
+ for (auto& size : supportedSizes)\r
+ {\r
+ auto width = size.getWidth();\r
+ auto height = size.getHeight();\r
+\r
+ if (width < minWidth || width > maxWidth || height < minHeight || height > maxHeight)\r
+ continue;\r
+\r
+ if (size.contains (result))\r
+ result = size;\r
+ }\r
+\r
+ // None of the supported sizes matches required width & height limitations, picking\r
+ // the first one available...\r
+ jassert (! result.isEmpty());\r
+\r
+ if (result.isEmpty())\r
+ result = supportedSizes[0];\r
+\r
+ return result;\r
+ }\r
+\r
+ //==============================================================================\r
+ void startPreviewMode (ImageReader& ir)\r
+ {\r
+ if (currentCaptureSessionMode != nullptr && ! currentCaptureSessionMode->isVideoRecordSession())\r
+ return;\r
+\r
+ // previous mode has to be stopped first\r
+ jassert (currentCaptureSessionMode.get() == nullptr);\r
+\r
+ if (scopedCameraDevice == nullptr || ! scopedCameraDevice->openedOk())\r
+ return;\r
+\r
+ currentCaptureSessionMode.reset (new CaptureSessionPreviewMode (*this, *scopedCameraDevice, handler,\r
+ previewDisplay, ir,\r
+ getCameraSensorOrientation(),\r
+ getCameraLensFacing(),\r
+ streamConfigurationMap));\r
+ }\r
+\r
+ void startVideoRecordingMode (MediaRecorder& mr)\r
+ {\r
+ if (currentCaptureSessionMode != nullptr && currentCaptureSessionMode->isVideoRecordSession())\r
+ return;\r
+\r
+ // previous mode has to be stopped first\r
+ jassert (currentCaptureSessionMode.get() == nullptr);\r
+\r
+ jassert (scopedCameraDevice != nullptr && scopedCameraDevice->openedOk());\r
+\r
+ if (scopedCameraDevice == nullptr || ! scopedCameraDevice->openedOk())\r
+ return;\r
+\r
+ currentCaptureSessionMode.reset (new CaptureSessionVideoRecordingMode (*this, *scopedCameraDevice, handler,\r
+ previewDisplay, mr,\r
+ getCameraSensorOrientation(),\r
+ getCameraLensFacing(),\r
+ streamConfigurationMap));\r
+ }\r
+\r
+ //==============================================================================\r
+ void appPaused() override\r
+ {\r
+ JUCE_CAMERA_LOG ("appPaused, closing camera...");\r
+\r
+ appWasPaused = true;\r
+\r
+ deviceOrientationChangeListener.setEnabled (false);\r
+\r
+ // We need to restart the whole session mode when the app gets resumed.\r
+ currentCaptureSessionMode.reset();\r
+\r
+ if (scopedCameraDevice != nullptr)\r
+ scopedCameraDevice->close();\r
+\r
+ stopBackgroundThread();\r
+ }\r
+\r
+ void appResumed() override\r
+ {\r
+ // Only care about resumed event when paused event was called first.\r
+ if (! appWasPaused)\r
+ return;\r
+\r
+ JUCE_CAMERA_LOG ("appResumed, opening camera...");\r
+\r
+ deviceOrientationChangeListener.setEnabled (true);\r
+\r
+ startBackgroundThread();\r
+\r
+ if (scopedCameraDevice != nullptr)\r
+ scopedCameraDevice->open();\r
+ }\r
+\r
+ void startBackgroundThread()\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ handlerThread = GlobalRef (LocalRef<jobject> (env->NewObject (AndroidHandlerThread,\r
+ AndroidHandlerThread.constructor,\r
+ javaString ("JuceCameraDeviceBackgroundThread").get())));\r
+ // handler thread has to be started before its looper can be fetched\r
+ env->CallVoidMethod (handlerThread, AndroidHandlerThread.start);\r
+ handler = GlobalRef (LocalRef<jobject> (env->NewObject (AndroidHandler,\r
+ AndroidHandler.constructorWithLooper,\r
+ env->CallObjectMethod (handlerThread, AndroidHandlerThread.getLooper))));\r
+ }\r
+\r
+ void stopBackgroundThread()\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ env->CallBooleanMethod (handlerThread, AndroidHandlerThread.quitSafely);\r
+ env->CallVoidMethod (handlerThread, AndroidHandlerThread.join);\r
+\r
+ auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+ if (exception != 0)\r
+ env->ExceptionClear();\r
+\r
+ handlerThread.clear();\r
+ handler.clear();\r
+ }\r
+\r
+ static bool checkHasExceptionOccurred()\r
+ {\r
+ auto* env = getEnv();\r
+\r
+ auto exception = LocalRef<jobject> (env->ExceptionOccurred());\r
+\r
+ if (exception != 0)\r
+ {\r
+ env->ExceptionClear();\r
+ return true;\r
+ }\r
+\r
+ return false;\r
+ }\r
+#endif\r
+\r
+ friend struct CameraDevice::ViewerComponent;\r
+\r
+ friend void juce_cameraDeviceStateClosed (int64);\r
+ friend void juce_cameraDeviceStateDisconnected (int64);\r
+ friend void juce_cameraDeviceStateError (int64, int);\r
+ friend void juce_cameraDeviceStateOpened (int64, void*);\r
+\r
+ friend void juce_cameraCaptureSessionActive (int64, void*);\r
+ friend void juce_cameraCaptureSessionClosed (int64, void*);\r
+ friend void juce_cameraCaptureSessionConfigureFailed (int64, void*);\r
+ friend void juce_cameraCaptureSessionConfigured (int64, void*);\r
+ friend void juce_cameraCaptureSessionReady (int64, void*);\r
+\r
+ friend void juce_cameraCaptureSessionCaptureCompleted (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureFailed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureProgressed (int64, bool, void*, void*, void*);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceAborted (int64, bool, void*, int);\r
+ friend void juce_cameraCaptureSessionCaptureSequenceCompleted (int64, bool, void*, int, int64);\r
+ friend void juce_cameraCaptureSessionCaptureStarted (int64, bool, void*, void*, int64, int64);\r
+\r
+ friend void juce_deviceOrientationChanged (int64, int);\r
+\r
+ JUCE_DECLARE_NON_COPYABLE (Pimpl)\r
+};\r
+\r
+//==============================================================================\r
+struct CameraDevice::ViewerComponent : public Component,\r
+ private ComponentMovementWatcher\r
+{\r
+ ViewerComponent (CameraDevice& device) : ComponentMovementWatcher (this)\r
+ {\r
+ #if __ANDROID_API__ >= 21\r
+ auto previewSize = device.pimpl->streamConfigurationMap.getDefaultPreviewSize();\r
+\r
+ targetAspectRatio = previewSize.getWidth() / (float) previewSize.getHeight();\r
+\r
+ if (isOrientationLandscape())\r
+ setBounds (previewSize);\r
+ else\r
+ setBounds (0, 0, previewSize.getHeight(), previewSize.getWidth());\r
+\r
+ addAndMakeVisible (viewerComponent);\r
+ viewerComponent.setView (device.pimpl->previewDisplay.getNativeView());\r
+ #else\r
+ ignoreUnused (device);\r
+ #endif\r
+ }\r
+\r
+private:\r
+ AndroidViewComponent viewerComponent;\r
+\r
+ float targetAspectRatio = 1.0f;\r
+\r
+ void componentMovedOrResized (bool, bool) override\r
+ {\r
+ auto b = getLocalBounds();\r
+\r
+ auto targetWidth = b.getWidth();\r
+ auto targetHeight = b.getHeight();\r
+\r
+ if (isOrientationLandscape())\r
+ {\r
+ auto currentAspectRatio = b.getWidth() / (float) b.getHeight();\r
+\r
+ if (currentAspectRatio > targetAspectRatio)\r
+ targetWidth = static_cast<int> (targetWidth * targetAspectRatio / currentAspectRatio);\r
+ else\r
+ targetHeight = static_cast<int> (targetHeight * currentAspectRatio / targetAspectRatio);\r
+ }\r
+ else\r
+ {\r
+ auto currentAspectRatio = b.getHeight() / (float) b.getWidth();\r
+\r
+ if (currentAspectRatio > targetAspectRatio)\r
+ targetHeight = static_cast<int> (targetHeight * targetAspectRatio / currentAspectRatio);\r
+ else\r
+ targetWidth = static_cast<int> (targetWidth * currentAspectRatio / targetAspectRatio);\r
+ }\r
+\r
+ viewerComponent.setBounds (Rectangle<int> (0, 0, targetWidth, targetHeight).withCentre (b.getCentre()));\r
+ }\r
+\r
+ bool isOrientationLandscape() const\r
+ {\r
+ auto o = Desktop::getInstance().getCurrentOrientation();\r
+ return o == Desktop::rotatedClockwise || o == Desktop::rotatedAntiClockwise;\r
+ }\r
+\r
+ void componentPeerChanged() override {}\r
+ void componentVisibilityChanged() override {}\r
+\r
+ JUCE_DECLARE_NON_COPYABLE (ViewerComponent)\r
+};\r
+\r
+String CameraDevice::getFileExtension()\r
+{\r
+ return ".mp4";\r
+}\r
+\r
+#if __ANDROID_API__ >= 21\r
+//==============================================================================\r
+void juce_cameraDeviceStateClosed (int64 host)\r
+{\r
+ reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice*> (host)->cameraDeviceStateClosed();\r
+}\r
+\r
+void juce_cameraDeviceStateDisconnected (int64 host)\r
+{\r
+ reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice*> (host)->cameraDeviceStateDisconnected();\r
+}\r
+\r
+void juce_cameraDeviceStateError (int64 host, int error)\r
+{\r
+ reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice*> (host)->cameraDeviceStateError (error);\r
+}\r
+\r
+void juce_cameraDeviceStateOpened (int64 host, void* camera)\r
+{\r
+ reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice*> (host)->cameraDeviceStateOpened ((jobject) camera);\r
+}\r
+\r
+//==============================================================================\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraDeviceStateCallback), cameraDeviceStateClosed, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject /*camera*/))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraDeviceStateClosed (host);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraDeviceStateCallback), cameraDeviceStateDisconnected, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject /*camera*/))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraDeviceStateDisconnected (host);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraDeviceStateCallback), cameraDeviceStateError, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject /*camera*/, int error))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraDeviceStateError (host, error);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraDeviceStateCallback), cameraDeviceStateOpened, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject camera))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraDeviceStateOpened (host, camera);\r
+}\r
+\r
+//==============================================================================\r
+void juce_cameraCaptureSessionActive (int64 host, void* session)\r
+{\r
+ auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+ juceCaptureSession->cameraCaptureSessionActive ((jobject) session);\r
+}\r
+\r
+void juce_cameraCaptureSessionClosed (int64 host, void* session)\r
+{\r
+ auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+ juceCaptureSession->cameraCaptureSessionClosed ((jobject) session);\r
+}\r
+\r
+void juce_cameraCaptureSessionConfigureFailed (int64 host, void* session)\r
+{\r
+ auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+ juceCaptureSession->cameraCaptureSessionConfigureFailed ((jobject) session);\r
+}\r
+\r
+void juce_cameraCaptureSessionConfigured (int64 host, void* session)\r
+{\r
+ auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+ juceCaptureSession->cameraCaptureSessionConfigured ((jobject) session);\r
+}\r
+\r
+void juce_cameraCaptureSessionReady (int64 host, void* session)\r
+{\r
+ auto* juceCaptureSession = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession*> (host);\r
+ juceCaptureSession->cameraCaptureSessionReady ((jobject) session);\r
+}\r
+\r
+//==============================================================================\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionActive, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionActive (host, session);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionClosed, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionClosed (host, session);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionConfigureFailed, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionConfigureFailed (host, session);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionConfigured, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionConfigured (host, session);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionStateCallback), cameraCaptureSessionReady, void, (JNIEnv* env, jobject /*activity*/, jlong host, jobject session))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionReady (host, session);\r
+}\r
+\r
+\r
+//==============================================================================\r
+void juce_cameraCaptureSessionCaptureCompleted (int64 host, bool isPreview, void* session, void* request, void* result)\r
+{\r
+ auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+ stillPictureTaker->cameraCaptureSessionCaptureCompleted (isPreview, (jobject) session, (jobject) request, (jobject) result);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureFailed (int64 host, bool isPreview, void* session, void* request, void* failure)\r
+{\r
+ auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+ stillPictureTaker->cameraCaptureSessionCaptureFailed (isPreview, (jobject) session, (jobject) request, (jobject) failure);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureProgressed (int64 host, bool isPreview, void* session, void* request, void* partialResult)\r
+{\r
+ auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+ stillPictureTaker->cameraCaptureSessionCaptureProgressed (isPreview, (jobject) session, (jobject) request, (jobject) partialResult);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureSequenceAborted (int64 host, bool isPreview, void* session, int sequenceId)\r
+{\r
+ auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+ stillPictureTaker->cameraCaptureSessionCaptureSequenceAborted (isPreview, (jobject) session, sequenceId);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureSequenceCompleted (int64 host, bool isPreview, void* session, int sequenceId, int64 frameNumber)\r
+{\r
+ auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+ stillPictureTaker->cameraCaptureSessionCaptureSequenceCompleted (isPreview, (jobject) session, sequenceId, frameNumber);\r
+}\r
+\r
+void juce_cameraCaptureSessionCaptureStarted (int64 host, bool isPreview, void* session, void* request, int64 timestamp, int64 frameNumber)\r
+{\r
+ auto* stillPictureTaker = reinterpret_cast<CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker*> (host);\r
+ stillPictureTaker->cameraCaptureSessionCaptureStarted (isPreview, (jobject) session, (jobject) request, timestamp, frameNumber);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureCompleted, \\r
+ void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jobject request, jobject result))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionCaptureCompleted (host, isPreview, session, request, result);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureFailed, \\r
+ void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jobject request, jobject failure))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionCaptureFailed (host, isPreview, session, request, failure);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureProgressed, \\r
+ void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jobject request, jobject partialResult))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionCaptureProgressed (host, isPreview, session, request, partialResult);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureSequenceAborted, \\r
+ void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jint sequenceId))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionCaptureSequenceAborted (host, isPreview, session, (int) sequenceId);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureSequenceCompleted, \\r
+ void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jint sequenceId, jlong frameNumber))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionCaptureSequenceCompleted (host, isPreview, session, (int) sequenceId, frameNumber);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024CameraCaptureSessionCaptureCallback), cameraCaptureSessionCaptureStarted, \\r
+ void, (JNIEnv* env, jobject /*activity*/, jlong host, bool isPreview, jobject session, jobject request, int64 timestamp, int64 frameNumber))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_cameraCaptureSessionCaptureStarted (host, isPreview, session, request, timestamp, frameNumber);\r
+}\r
+\r
+//==============================================================================\r
+void juce_deviceOrientationChanged (int64 host, int orientation)\r
+{\r
+ auto* listener = reinterpret_cast<CameraDevice::Pimpl::DeviceOrientationChangeListener*> (host);\r
+ listener->orientationChanged (orientation);\r
+}\r
+\r
+JUCE_JNI_CALLBACK (JUCE_JOIN_MACRO (JUCE_ANDROID_ACTIVITY_CLASSNAME, _00024JuceOrientationEventListener), deviceOrientationChanged, \\r
+ void, (JNIEnv* env, jobject /*activity*/, jlong host, jint orientation))\r
+{\r
+ setEnv (env);\r
+\r
+ juce_deviceOrientationChanged (host, (int) orientation);\r
}\r
+#endif\r
--- /dev/null
+/*\r
+ ==============================================================================\r
+\r
+ This file is part of the JUCE library.\r
+ Copyright (c) 2017 - ROLI Ltd.\r
+\r
+ JUCE is an open source library subject to commercial or open-source\r
+ licensing.\r
+\r
+ By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r
+ Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r
+ 27th April 2017).\r
+\r
+ End User License Agreement: www.juce.com/juce-5-licence\r
+ Privacy Policy: www.juce.com/juce-5-privacy-policy\r
+\r
+ Or: You may also use this code under the terms of the GPL v3 (see\r
+ www.gnu.org/licenses).\r
+\r
+ JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r
+ EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r
+ DISCLAIMED.\r
+\r
+ ==============================================================================\r
+*/\r
+\r
+struct CameraDevice::Pimpl\r
+{\r
+ using InternalOpenCameraResultCallback = std::function<void (const String& /*cameraId*/, const String& /*error*/)>;\r
+\r
+ Pimpl (CameraDevice& ownerToUse, const String& cameraIdToUse, int /*index*/,\r
+ int /*minWidth*/, int /*minHeight*/, int /*maxWidth*/, int /*maxHeight*/,\r
+ bool useHighQuality)\r
+ : owner (ownerToUse),\r
+ cameraId (cameraIdToUse),\r
+ captureSession (*this, useHighQuality)\r
+ {\r
+ }\r
+\r
+ String getCameraId() const noexcept { return cameraId; }\r
+\r
+ void open (InternalOpenCameraResultCallback cameraOpenCallbackToUse)\r
+ {\r
+ cameraOpenCallback = static_cast<InternalOpenCameraResultCallback&&> (cameraOpenCallbackToUse);\r
+\r
+ if (cameraOpenCallback == nullptr)\r
+ {\r
+ // A valid camera open callback must be passed.\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ [AVCaptureDevice requestAccessForMediaType: AVMediaTypeVideo\r
+ completionHandler: ^(BOOL granted)\r
+ {\r
+ // Access to video is required for camera to work,\r
+ // black images will be produced otherwise!\r
+ jassert (granted);\r
+\r
+ ignoreUnused (granted);\r
+ }];\r
+\r
+ [AVCaptureDevice requestAccessForMediaType: AVMediaTypeAudio\r
+ completionHandler: ^(BOOL granted)\r
+ {\r
+ // Access to audio is required for camera to work,\r
+ // silence will be produced otherwise!\r
+ jassert (granted);\r
+\r
+ ignoreUnused (granted);\r
+ }];\r
+\r
+ captureSession.startSessionForDeviceWithId (cameraId);\r
+ }\r
+\r
+ bool openedOk() const noexcept { return captureSession.openedOk(); }\r
+\r
+ void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)\r
+ {\r
+ if (pictureTakenCallbackToUse == nullptr)\r
+ {\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ pictureTakenCallback = static_cast<std::function<void (const Image&)>&&> (pictureTakenCallbackToUse);\r
+\r
+ triggerStillPictureCapture();\r
+ }\r
+\r
+ void startRecordingToFile (const File& file, int /*quality*/)\r
+ {\r
+ file.deleteFile();\r
+\r
+ captureSession.startRecording (file);\r
+ }\r
+\r
+ void stopRecording()\r
+ {\r
+ captureSession.stopRecording();\r
+ }\r
+\r
+ Time getTimeOfFirstRecordedFrame() const\r
+ {\r
+ return captureSession.getTimeOfFirstRecordedFrame();\r
+ }\r
+\r
+ static StringArray getAvailableDevices()\r
+ {\r
+ StringArray results;\r
+\r
+ JUCE_CAMERA_LOG ("Available camera devices: ");\r
+\r
+ for (AVCaptureDevice* device in getDevices())\r
+ {\r
+ JUCE_CAMERA_LOG ("Device start----------------------------------");\r
+ printDebugCameraInfo (device);\r
+ JUCE_CAMERA_LOG ("Device end----------------------------------");\r
+\r
+ results.add (nsStringToJuce (device.uniqueID));\r
+ }\r
+\r
+ return results;\r
+ }\r
+\r
+ void addListener (CameraDevice::Listener* listenerToAdd)\r
+ {\r
+ const ScopedLock sl (listenerLock);\r
+ listeners.add (listenerToAdd);\r
+\r
+ if (listeners.size() == 1)\r
+ triggerStillPictureCapture();\r
+ }\r
+\r
+ void removeListener (CameraDevice::Listener* listenerToRemove)\r
+ {\r
+ const ScopedLock sl (listenerLock);\r
+ listeners.remove (listenerToRemove);\r
+ }\r
+\r
+private:\r
+ static NSArray<AVCaptureDevice*>* getDevices()\r
+ {\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ if (iosVersion.major >= 10)\r
+ {\r
+ std::unique_ptr<NSMutableArray<AVCaptureDeviceType>, NSObjectDeleter> deviceTypes ([[NSMutableArray alloc] initWithCapacity: 2]);\r
+\r
+ [deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInWideAngleCamera];\r
+ [deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInTelephotoCamera];\r
+\r
+ if ((iosVersion.major == 10 && iosVersion.minor >= 2) || iosVersion.major >= 11)\r
+ [deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInDualCamera];\r
+\r
+ if ((iosVersion.major == 11 && iosVersion.minor >= 1) || iosVersion.major >= 12)\r
+ [deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInTrueDepthCamera];\r
+\r
+ auto discoverySession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes: deviceTypes.get()\r
+ mediaType: AVMediaTypeVideo\r
+ position: AVCaptureDevicePositionUnspecified];\r
+\r
+ return [discoverySession devices];\r
+ }\r
+ #endif\r
+\r
+ return [AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo];\r
+ }\r
+\r
+ //==============================================================================\r
+ static void printDebugCameraInfo (AVCaptureDevice* device)\r
+ {\r
+ auto position = device.position;\r
+\r
+ String positionString = position == AVCaptureDevicePositionBack\r
+ ? "Back"\r
+ : position == AVCaptureDevicePositionFront\r
+ ? "Front"\r
+ : "Unspecified";\r
+\r
+ JUCE_CAMERA_LOG ("Position: " + positionString);\r
+ JUCE_CAMERA_LOG ("Model ID: " + nsStringToJuce (device.modelID));\r
+ JUCE_CAMERA_LOG ("Localized name: " + nsStringToJuce (device.localizedName));\r
+ JUCE_CAMERA_LOG ("Unique ID: " + nsStringToJuce (device.uniqueID));\r
+ JUCE_CAMERA_LOG ("Lens aperture: " + String (device.lensAperture));\r
+\r
+ JUCE_CAMERA_LOG ("Has flash: " + String ((int)device.hasFlash));\r
+ JUCE_CAMERA_LOG ("Supports flash always on: " + String ((int)[device isFlashModeSupported: AVCaptureFlashModeOn]));\r
+ JUCE_CAMERA_LOG ("Supports auto flash: " + String ((int)[device isFlashModeSupported: AVCaptureFlashModeAuto]));\r
+\r
+ JUCE_CAMERA_LOG ("Has torch: " + String ((int)device.hasTorch));\r
+ JUCE_CAMERA_LOG ("Supports torch always on: " + String ((int)[device isTorchModeSupported: AVCaptureTorchModeOn]));\r
+ JUCE_CAMERA_LOG ("Supports auto torch: " + String ((int)[device isTorchModeSupported: AVCaptureTorchModeAuto]));\r
+\r
+ JUCE_CAMERA_LOG ("Low light boost supported: " + String ((int)device.lowLightBoostEnabled));\r
+\r
+ JUCE_CAMERA_LOG ("Supports auto white balance: " + String ((int)[device isWhiteBalanceModeSupported: AVCaptureWhiteBalanceModeAutoWhiteBalance]));\r
+ JUCE_CAMERA_LOG ("Supports continuous auto white balance: " + String ((int)[device isWhiteBalanceModeSupported: AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance]));\r
+\r
+ JUCE_CAMERA_LOG ("Supports auto focus: " + String ((int)[device isFocusModeSupported: AVCaptureFocusModeAutoFocus]));\r
+ JUCE_CAMERA_LOG ("Supports continuous auto focus: " + String ((int)[device isFocusModeSupported: AVCaptureFocusModeContinuousAutoFocus]));\r
+ JUCE_CAMERA_LOG ("Supports point of interest focus: " + String ((int)device.focusPointOfInterestSupported));\r
+ JUCE_CAMERA_LOG ("Smooth auto focus supported: " + String ((int)device.smoothAutoFocusSupported));\r
+ JUCE_CAMERA_LOG ("Auto focus range restriction supported: " + String ((int)device.autoFocusRangeRestrictionSupported));\r
+\r
+ JUCE_CAMERA_LOG ("Supports auto exposure: " + String ((int)[device isExposureModeSupported: AVCaptureExposureModeAutoExpose]));\r
+ JUCE_CAMERA_LOG ("Supports continuous auto exposure: " + String ((int)[device isExposureModeSupported: AVCaptureExposureModeContinuousAutoExposure]));\r
+ JUCE_CAMERA_LOG ("Supports custom exposure: " + String ((int)[device isExposureModeSupported: AVCaptureExposureModeCustom]));\r
+ JUCE_CAMERA_LOG ("Supports point of interest exposure: " + String ((int)device.exposurePointOfInterestSupported));\r
+\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ if (iosVersion.major >= 10)\r
+ {\r
+ JUCE_CAMERA_LOG ("Device type: " + nsStringToJuce (device.deviceType));\r
+ JUCE_CAMERA_LOG ("Locking focus with custom lens position supported: " + String ((int)device.lockingFocusWithCustomLensPositionSupported));\r
+ }\r
+ #endif\r
+\r
+ #if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\r
+ if (iosVersion.major >= 11)\r
+ {\r
+ JUCE_CAMERA_LOG ("Min available video zoom factor: " + String (device.minAvailableVideoZoomFactor));\r
+ JUCE_CAMERA_LOG ("Max available video zoom factor: " + String (device.maxAvailableVideoZoomFactor));\r
+ JUCE_CAMERA_LOG ("Dual camera switch over video zoom factor: " + String (device.dualCameraSwitchOverVideoZoomFactor));\r
+ }\r
+ #endif\r
+\r
+ JUCE_CAMERA_LOG ("Capture formats start-------------------");\r
+ for (AVCaptureDeviceFormat* format in device.formats)\r
+ {\r
+ JUCE_CAMERA_LOG ("Capture format start------");\r
+ printDebugCameraFormatInfo (format);\r
+ JUCE_CAMERA_LOG ("Capture format end------");\r
+ }\r
+ JUCE_CAMERA_LOG ("Capture formats end-------------------");\r
+ }\r
+\r
+ static void printDebugCameraFormatInfo (AVCaptureDeviceFormat* format)\r
+ {\r
+ JUCE_CAMERA_LOG ("Media type: " + nsStringToJuce (format.mediaType));\r
+\r
+ String colourSpaces;\r
+\r
+ for (NSNumber* number in format.supportedColorSpaces)\r
+ {\r
+ switch ([number intValue])\r
+ {\r
+ case AVCaptureColorSpace_sRGB: colourSpaces << "sRGB "; break;\r
+ case AVCaptureColorSpace_P3_D65: colourSpaces << "P3_D65 "; break;\r
+ default: break;\r
+ }\r
+ }\r
+\r
+ JUCE_CAMERA_LOG ("Supported colour spaces: " + colourSpaces);\r
+\r
+ JUCE_CAMERA_LOG ("Video field of view: " + String (format.videoFieldOfView));\r
+ JUCE_CAMERA_LOG ("Video max zoom factor: " + String (format.videoMaxZoomFactor));\r
+ JUCE_CAMERA_LOG ("Video zoom factor upscale threshold: " + String (format.videoZoomFactorUpscaleThreshold));\r
+\r
+ String videoFrameRateRangesString = "Video supported frame rate ranges: ";\r
+\r
+ for (AVFrameRateRange* range in format.videoSupportedFrameRateRanges)\r
+ videoFrameRateRangesString << frameRateRangeToString (range);\r
+ JUCE_CAMERA_LOG (videoFrameRateRangesString);\r
+\r
+ JUCE_CAMERA_LOG ("Video binned: " + String (int(format.videoBinned)));\r
+\r
+ #if defined (__IPHONE_8_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0\r
+ if (iosVersion.major >= 8)\r
+ {\r
+ JUCE_CAMERA_LOG ("Video HDR supported: " + String (int (format.videoHDRSupported)));\r
+ JUCE_CAMERA_LOG ("High resolution still image dimensions: " + getHighResStillImgDimensionsString (format.highResolutionStillImageDimensions));\r
+ JUCE_CAMERA_LOG ("Min ISO: " + String (format.minISO));\r
+ JUCE_CAMERA_LOG ("Max ISO: " + String (format.maxISO));\r
+ JUCE_CAMERA_LOG ("Min exposure duration: " + cmTimeToString (format.minExposureDuration));\r
+\r
+ String autoFocusSystemString;\r
+ switch (format.autoFocusSystem)\r
+ {\r
+ case AVCaptureAutoFocusSystemPhaseDetection: autoFocusSystemString = "PhaseDetection"; break;\r
+ case AVCaptureAutoFocusSystemContrastDetection: autoFocusSystemString = "ContrastDetection"; break;\r
+ default: autoFocusSystemString = "None";\r
+ }\r
+ JUCE_CAMERA_LOG ("Auto focus system: " + autoFocusSystemString);\r
+\r
+ JUCE_CAMERA_LOG ("Standard (iOS 5.0) video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeStandard]));\r
+ JUCE_CAMERA_LOG ("Cinematic video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeCinematic]));\r
+ JUCE_CAMERA_LOG ("Auto video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeAuto]));\r
+ }\r
+ #endif\r
+\r
+ #if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\r
+ if (iosVersion.major >= 11)\r
+ {\r
+ JUCE_CAMERA_LOG ("Min zoom factor for depth data delivery: " + String (format.videoMinZoomFactorForDepthDataDelivery));\r
+ JUCE_CAMERA_LOG ("Max zoom factor for depth data delivery: " + String (format.videoMaxZoomFactorForDepthDataDelivery));\r
+ }\r
+ #endif\r
+ }\r
+\r
+ static String getHighResStillImgDimensionsString (CMVideoDimensions d)\r
+ {\r
+ return "[" + String (d.width) + " " + String (d.height) + "]";\r
+ }\r
+\r
+ static String cmTimeToString (CMTime time)\r
+ {\r
+ CFStringRef timeDesc = CMTimeCopyDescription (NULL, time);\r
+ String result = String::fromCFString (timeDesc);\r
+\r
+ CFRelease (timeDesc);\r
+ return result;\r
+ }\r
+\r
+ static String frameRateRangeToString (AVFrameRateRange* range)\r
+ {\r
+ String result;\r
+ result << "[minFrameDuration: " + cmTimeToString (range.minFrameDuration);\r
+ result << " maxFrameDuration: " + cmTimeToString (range.maxFrameDuration);\r
+ result << " minFrameRate: " + String (range.minFrameRate);\r
+ result << " maxFrameRate: " + String (range.maxFrameRate) << "] ";\r
+\r
+ return result;\r
+ }\r
+\r
+ //==============================================================================\r
+ class CaptureSession\r
+ {\r
+ public:\r
+ CaptureSession (Pimpl& ownerToUse, bool useHighQuality)\r
+ : owner (ownerToUse),\r
+ captureSessionQueue (dispatch_queue_create ("JuceCameraDeviceBackgroundDispatchQueue", DISPATCH_QUEUE_SERIAL)),\r
+ captureSession ([[AVCaptureSession alloc] init]),\r
+ delegate (nullptr),\r
+ stillPictureTaker (*this),\r
+ videoRecorder (*this)\r
+ {\r
+ static SessionDelegateClass cls;\r
+ delegate.reset ([cls.createInstance() init]);\r
+ SessionDelegateClass::setOwner (delegate.get(), this);\r
+\r
+ #pragma clang diagnostic push\r
+ #pragma clang diagnostic ignored "-Wundeclared-selector"\r
+ [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+ selector: @selector (sessionDidStartRunning:)\r
+ name: AVCaptureSessionDidStartRunningNotification\r
+ object: captureSession.get()];\r
+\r
+ [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+ selector: @selector (sessionDidStopRunning:)\r
+ name: AVCaptureSessionDidStopRunningNotification\r
+ object: captureSession.get()];\r
+\r
+ [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+ selector: @selector (sessionRuntimeError:)\r
+ name: AVCaptureSessionRuntimeErrorNotification\r
+ object: captureSession.get()];\r
+\r
+ [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+ selector: @selector (sessionWasInterrupted:)\r
+ name: AVCaptureSessionWasInterruptedNotification\r
+ object: captureSession.get()];\r
+\r
+ [[NSNotificationCenter defaultCenter] addObserver: delegate.get()\r
+ selector: @selector (sessionInterruptionEnded:)\r
+ name: AVCaptureSessionInterruptionEndedNotification\r
+ object: captureSession.get()];\r
+ #pragma clang diagnostic pop\r
+\r
+ dispatch_async (captureSessionQueue,^\r
+ {\r
+ [captureSession.get() setSessionPreset: useHighQuality ? AVCaptureSessionPresetHigh\r
+ : AVCaptureSessionPresetMedium];\r
+ });\r
+\r
+ ++numCaptureSessions;\r
+ }\r
+\r
+ ~CaptureSession()\r
+ {\r
+ [[NSNotificationCenter defaultCenter] removeObserver: delegate.get()];\r
+\r
+ stopRecording();\r
+\r
+ if (--numCaptureSessions == 0)\r
+ {\r
+ dispatch_async (captureSessionQueue, ^\r
+ {\r
+ if (captureSession.get().running)\r
+ [captureSession.get() stopRunning];\r
+\r
+ sessionClosedEvent.signal();\r
+ });\r
+\r
+ sessionClosedEvent.wait (-1);\r
+ }\r
+ }\r
+\r
+ bool openedOk() const noexcept { return sessionStarted; }\r
+\r
+ void startSessionForDeviceWithId (const String& cameraIdToUse)\r
+ {\r
+ dispatch_async (captureSessionQueue,^\r
+ {\r
+ cameraDevice = [AVCaptureDevice deviceWithUniqueID: juceStringToNS (cameraIdToUse)];\r
+ auto* audioDevice = [AVCaptureDevice defaultDeviceWithMediaType: AVMediaTypeAudio];\r
+\r
+ [captureSession.get() beginConfiguration];\r
+\r
+ // This will add just video...\r
+ auto error = addInputToDevice (cameraDevice);\r
+\r
+ if (error.isNotEmpty())\r
+ {\r
+ WeakReference<CaptureSession> weakRef (this);\r
+\r
+ MessageManager::callAsync ([weakRef, error]() mutable\r
+ {\r
+ if (weakRef != nullptr)\r
+ weakRef->owner.cameraOpenCallback ({}, error);\r
+ });\r
+\r
+ return;\r
+ }\r
+\r
+ // ... so add audio explicitly here\r
+ error = addInputToDevice (audioDevice);\r
+\r
+ if (error.isNotEmpty())\r
+ {\r
+ WeakReference<CaptureSession> weakRef (this);\r
+\r
+ MessageManager::callAsync ([weakRef, error]() mutable\r
+ {\r
+ if (weakRef != nullptr)\r
+ weakRef->owner.cameraOpenCallback ({}, error);\r
+ });\r
+\r
+ return;\r
+ }\r
+\r
+ [captureSession.get() commitConfiguration];\r
+\r
+ if (! captureSession.get().running)\r
+ [captureSession.get() startRunning];\r
+ });\r
+ }\r
+\r
+ AVCaptureVideoPreviewLayer* createPreviewLayer()\r
+ {\r
+ if (! openedOk())\r
+ {\r
+ // A session must be started first!\r
+ jassertfalse;\r
+ return nullptr;\r
+ }\r
+\r
+ previewLayer = [AVCaptureVideoPreviewLayer layerWithSession: captureSession.get()];\r
+ return previewLayer;\r
+ }\r
+\r
+ void takeStillPicture()\r
+ {\r
+ if (! openedOk())\r
+ {\r
+ // A session must be started first!\r
+ jassert (openedOk());\r
+ return;\r
+ }\r
+\r
+ stillPictureTaker.takePicture (previewLayer.connection.videoOrientation);\r
+ }\r
+\r
+ void startRecording (const File& file)\r
+ {\r
+ if (! openedOk())\r
+ {\r
+ // A session must be started first!\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ if (file.existsAsFile())\r
+ {\r
+ // File overwriting is not supported by iOS video recorder, the target\r
+ // file must not exist.\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ videoRecorder.startRecording (file, previewLayer.connection.videoOrientation);\r
+ }\r
+\r
+ void stopRecording()\r
+ {\r
+ videoRecorder.stopRecording();\r
+ }\r
+\r
+ Time getTimeOfFirstRecordedFrame() const\r
+ {\r
+ return videoRecorder.getTimeOfFirstRecordedFrame();\r
+ }\r
+\r
+ JUCE_DECLARE_WEAK_REFERENCEABLE (CaptureSession)\r
+\r
+ private:\r
+ String addInputToDevice (AVCaptureDevice* device)\r
+ {\r
+ NSError* error = nil;\r
+\r
+ auto* input = [AVCaptureDeviceInput deviceInputWithDevice: device\r
+ error: &error];\r
+\r
+ if (error != nil)\r
+ return nsStringToJuce (error.localizedDescription);\r
+\r
+ if (! [captureSession.get() canAddInput: input])\r
+ return "Could not add input to camera session.";\r
+\r
+ [captureSession.get() addInput: input];\r
+ return {};\r
+ }\r
+\r
+ //==============================================================================\r
+ struct SessionDelegateClass : public ObjCClass<NSObject>\r
+ {\r
+ SessionDelegateClass() : ObjCClass<NSObject> ("SessionDelegateClass_")\r
+ {\r
+ #pragma clang diagnostic push\r
+ #pragma clang diagnostic ignored "-Wundeclared-selector"\r
+ addMethod (@selector (sessionDidStartRunning:), started, "v@:@");\r
+ addMethod (@selector (sessionDidStopRunning:), stopped, "v@:@");\r
+ addMethod (@selector (sessionRuntimeError:), runtimeError, "v@:@");\r
+ addMethod (@selector (sessionWasInterrupted:), interrupted, "v@:@");\r
+ addMethod (@selector (sessionInterruptionEnded:), interruptionEnded, "v@:@");\r
+ #pragma clang diagnostic pop\r
+\r
+ addIvar<CaptureSession*> ("owner");\r
+\r
+ registerClass();\r
+ }\r
+\r
+ //==============================================================================\r
+ static CaptureSession& getOwner (id self) { return *getIvar<CaptureSession*> (self, "owner"); }\r
+ static void setOwner (id self, CaptureSession* s) { object_setInstanceVariable (self, "owner", s); }\r
+\r
+ private:\r
+ //==============================================================================\r
+ static void started (id self, SEL, NSNotification* notification)\r
+ {\r
+ JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+ ignoreUnused (notification);\r
+\r
+ dispatch_async (dispatch_get_main_queue(),\r
+ ^{\r
+ getOwner (self).cameraSessionStarted();\r
+ });\r
+ }\r
+\r
+ static void stopped (id, SEL, NSNotification* notification)\r
+ {\r
+ JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+ ignoreUnused (notification);\r
+ }\r
+\r
+ static void runtimeError (id self, SEL, NSNotification* notification)\r
+ {\r
+ JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+ dispatch_async (dispatch_get_main_queue(),\r
+ ^{\r
+ NSError* error = notification.userInfo[AVCaptureSessionErrorKey];\r
+ auto errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+ getOwner (self).cameraSessionRuntimeError (errorString);\r
+ });\r
+ }\r
+\r
+ static void interrupted (id, SEL, NSNotification* notification)\r
+ {\r
+ JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+ ignoreUnused (notification);\r
+ }\r
+\r
+ static void interruptionEnded (id, SEL, NSNotification* notification)\r
+ {\r
+ JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+ ignoreUnused (notification);\r
+ }\r
+ };\r
+\r
+ //==============================================================================\r
+ class StillPictureTaker\r
+ {\r
+ public:\r
+ StillPictureTaker (CaptureSession& cs)\r
+ : captureSession (cs),\r
+ captureOutput (createCaptureOutput()),\r
+ photoOutputDelegate (nullptr)\r
+ {\r
+ if (Pimpl::getIOSVersion().major >= 10)\r
+ {\r
+ static PhotoOutputDelegateClass cls;\r
+ photoOutputDelegate.reset ([cls.createInstance() init]);\r
+ PhotoOutputDelegateClass::setOwner (photoOutputDelegate.get(), this);\r
+ }\r
+\r
+ captureSession.addOutputIfPossible (captureOutput);\r
+ }\r
+\r
+ void takePicture (AVCaptureVideoOrientation orientationToUse)\r
+ {\r
+ if (takingPicture)\r
+ {\r
+ // Picture taking already in progress!\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ takingPicture = true;\r
+\r
+ printImageOutputDebugInfo (captureOutput);\r
+\r
+ if (auto* connection = findVideoConnection (captureOutput))\r
+ {\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ if (Pimpl::getIOSVersion().major >= 10 && [captureOutput isKindOfClass: [AVCapturePhotoOutput class]])\r
+ {\r
+ auto* photoOutput = (AVCapturePhotoOutput*) captureOutput;\r
+ auto* outputConnection = [photoOutput connectionWithMediaType: AVMediaTypeVideo];\r
+ outputConnection.videoOrientation = orientationToUse;\r
+\r
+ [photoOutput capturePhotoWithSettings: [AVCapturePhotoSettings photoSettings]\r
+ delegate: id<AVCapturePhotoCaptureDelegate> (photoOutputDelegate.get())];\r
+\r
+ return;\r
+ }\r
+ #endif\r
+\r
+ auto* stillImageOutput = (AVCaptureStillImageOutput*) captureOutput;\r
+ auto* outputConnection = [stillImageOutput connectionWithMediaType: AVMediaTypeVideo];\r
+ outputConnection.videoOrientation = orientationToUse;\r
+\r
+ [stillImageOutput captureStillImageAsynchronouslyFromConnection: connection completionHandler:\r
+ ^(CMSampleBufferRef imageSampleBuffer, NSError* error)\r
+ {\r
+ if (error != nil)\r
+ {\r
+ JUCE_CAMERA_LOG ("Still picture capture failed, error: " + nsStringToJuce (error.localizedDescription));\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ NSData* imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation: imageSampleBuffer];\r
+\r
+ auto image = ImageFileFormat::loadFrom (imageData.bytes, (size_t) imageData.length);\r
+\r
+ callListeners (image);\r
+\r
+ MessageManager::callAsync ([this, image]() { notifyPictureTaken (image); });\r
+ }];\r
+ }\r
+ else\r
+ {\r
+ // Could not find a connection of video type\r
+ jassertfalse;\r
+ }\r
+ }\r
+\r
+ private:\r
+ static AVCaptureOutput* createCaptureOutput()\r
+ {\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ if (Pimpl::getIOSVersion().major >= 10)\r
+ return [AVCapturePhotoOutput new];\r
+ #endif\r
+\r
+ return [AVCaptureStillImageOutput new];\r
+ }\r
+\r
+ static void printImageOutputDebugInfo (AVCaptureOutput* captureOutput)\r
+ {\r
+ #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0\r
+ if (Pimpl::getIOSVersion().major >= 10 && [captureOutput isKindOfClass: [AVCapturePhotoOutput class]])\r
+ {\r
+ auto* photoOutput = (AVCapturePhotoOutput*) captureOutput;\r
+\r
+ String typesString;\r
+\r
+ for (AVVideoCodecType type in photoOutput.availablePhotoCodecTypes)\r
+ typesString << nsStringToJuce (type) << " ";\r
+\r
+ JUCE_CAMERA_LOG ("Available image codec types: " + typesString);\r
+\r
+ JUCE_CAMERA_LOG ("Still image stabilization supported: " + String ((int) photoOutput.stillImageStabilizationSupported));\r
+ JUCE_CAMERA_LOG ("Dual camera fusion supported: " + String ((int) photoOutput.dualCameraFusionSupported));\r
+ JUCE_CAMERA_LOG ("Supports flash: " + String ((int) [photoOutput.supportedFlashModes containsObject: @(AVCaptureFlashModeOn)]));\r
+ JUCE_CAMERA_LOG ("Supports auto flash: " + String ((int) [photoOutput.supportedFlashModes containsObject: @(AVCaptureFlashModeAuto)]));\r
+ JUCE_CAMERA_LOG ("Max bracketed photo count: " + String (photoOutput.maxBracketedCapturePhotoCount));\r
+ JUCE_CAMERA_LOG ("Lens stabilization during bracketed capture supported: " + String ((int) photoOutput.lensStabilizationDuringBracketedCaptureSupported));\r
+ JUCE_CAMERA_LOG ("Live photo capture supported: " + String ((int) photoOutput.livePhotoCaptureSupported));\r
+\r
+\r
+ #if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\r
+ if (Pimpl::getIOSVersion().major >= 11)\r
+ {\r
+ typesString.clear();\r
+\r
+ for (AVFileType type in photoOutput.availablePhotoFileTypes)\r
+ typesString << nsStringToJuce (type) << " ";\r
+\r
+ JUCE_CAMERA_LOG ("Available photo file types: " + typesString);\r
+\r
+ typesString.clear();\r
+\r
+ for (AVFileType type in photoOutput.availableRawPhotoFileTypes)\r
+ typesString << nsStringToJuce (type) << " ";\r
+\r
+ JUCE_CAMERA_LOG ("Available RAW photo file types: " + typesString);\r
+\r
+ typesString.clear();\r
+\r
+ for (AVFileType type in photoOutput.availableLivePhotoVideoCodecTypes)\r
+ typesString << nsStringToJuce (type) << " ";\r
+\r
+ JUCE_CAMERA_LOG ("Available live photo video codec types: " + typesString);\r
+\r
+ JUCE_CAMERA_LOG ("Dual camera dual photo delivery supported: " + String ((int) photoOutput.dualCameraDualPhotoDeliverySupported));\r
+ JUCE_CAMERA_LOG ("Camera calibration data delivery supported: " + String ((int) photoOutput.cameraCalibrationDataDeliverySupported));\r
+ JUCE_CAMERA_LOG ("Depth data delivery supported: " + String ((int) photoOutput.depthDataDeliverySupported));\r
+ }\r
+ #endif\r
+\r
+ return;\r
+ }\r
+ #endif\r
+\r
+ auto* stillImageOutput = (AVCaptureStillImageOutput*) captureOutput;\r
+\r
+ String typesString;\r
+\r
+ for (AVVideoCodecType type in stillImageOutput.availableImageDataCodecTypes)\r
+ typesString << nsStringToJuce (type) << " ";\r
+\r
+ JUCE_CAMERA_LOG ("Available image codec types: " + typesString);\r
+ JUCE_CAMERA_LOG ("Still image stabilization supported: " + String ((int) stillImageOutput.stillImageStabilizationSupported));\r
+ JUCE_CAMERA_LOG ("Automatically enableds still image stabilization when available: " + String ((int) stillImageOutput.automaticallyEnablesStillImageStabilizationWhenAvailable));\r
+\r
+ JUCE_CAMERA_LOG ("Output settings for image output: " + nsStringToJuce ([stillImageOutput.outputSettings description]));\r
+ }\r
+\r
+ //==============================================================================\r
+ static AVCaptureConnection* findVideoConnection (AVCaptureOutput* output)\r
+ {\r
+ for (AVCaptureConnection* connection in output.connections)\r
+ for (AVCaptureInputPort* port in connection.inputPorts)\r
+ if ([port.mediaType isEqual: AVMediaTypeVideo])\r
+ return connection;\r
+\r
+ return nullptr;\r
+ }\r
+\r
+ //==============================================================================\r
+ class PhotoOutputDelegateClass : public ObjCClass<NSObject>\r
+ {\r
+ public:\r
+ PhotoOutputDelegateClass() : ObjCClass<NSObject> ("PhotoOutputDelegateClass_")\r
+ {\r
+ addMethod (@selector (captureOutput:willBeginCaptureForResolvedSettings:), willBeginCaptureForSettings, "v@:@@");\r
+ addMethod (@selector (captureOutput:willCapturePhotoForResolvedSettings:), willCaptureForSettings, "v@:@@");\r
+ addMethod (@selector (captureOutput:didCapturePhotoForResolvedSettings:), didCaptureForSettings, "v@:@@");\r
+ addMethod (@selector (captureOutput:didFinishCaptureForResolvedSettings:error:), didFinishCaptureForSettings, "v@:@@@");\r
+\r
+ if (Pimpl::getIOSVersion().major >= 11)\r
+ addMethod (@selector (captureOutput:didFinishProcessingPhoto:error:), didFinishProcessingPhoto, "v@:@@@");\r
+ else\r
+ addMethod (@selector (captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:), didFinishProcessingPhotoSampleBuffer, "v@:@@@@@@");\r
+\r
+ addIvar<StillPictureTaker*> ("owner");\r
+\r
+ registerClass();\r
+ }\r
+\r
+ //==============================================================================\r
+ static StillPictureTaker& getOwner (id self) { return *getIvar<StillPictureTaker*> (self, "owner"); }\r
+ static void setOwner (id self, StillPictureTaker* t) { object_setInstanceVariable (self, "owner", t); }\r
+\r
+ private:\r
+ static void willBeginCaptureForSettings (id, SEL, AVCapturePhotoOutput*, AVCaptureResolvedPhotoSettings*)\r
+ {\r
+ JUCE_CAMERA_LOG ("willBeginCaptureForSettings()");\r
+ }\r
+\r
+ static void willCaptureForSettings (id, SEL, AVCapturePhotoOutput*, AVCaptureResolvedPhotoSettings*)\r
+ {\r
+ JUCE_CAMERA_LOG ("willCaptureForSettings()");\r
+ }\r
+\r
+ static void didCaptureForSettings (id, SEL, AVCapturePhotoOutput*, AVCaptureResolvedPhotoSettings*)\r
+ {\r
+ JUCE_CAMERA_LOG ("didCaptureForSettings()");\r
+ }\r
+\r
+ static void didFinishCaptureForSettings (id, SEL, AVCapturePhotoOutput*, AVCaptureResolvedPhotoSettings*, NSError* error)\r
+ {\r
+ String errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+ ignoreUnused (errorString);\r
+\r
+ JUCE_CAMERA_LOG ("didFinishCaptureForSettings(), error = " + errorString);\r
+ }\r
+\r
+ static void didFinishProcessingPhoto (id self, SEL, AVCapturePhotoOutput*, AVCapturePhoto* capturePhoto, NSError* error)\r
+ {\r
+ String errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+ ignoreUnused (errorString);\r
+\r
+ JUCE_CAMERA_LOG ("didFinishProcessingPhoto(), error = " + errorString);\r
+\r
+ if (error != nil)\r
+ {\r
+ JUCE_CAMERA_LOG ("Still picture capture failed, error: " + nsStringToJuce (error.localizedDescription));\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ auto* imageOrientation = (NSNumber *) capturePhoto.metadata[(NSString*) kCGImagePropertyOrientation];\r
+\r
+ auto* uiImage = getImageWithCorrectOrientation ((CGImagePropertyOrientation) imageOrientation.unsignedIntValue,\r
+ [capturePhoto CGImageRepresentation]);\r
+\r
+ auto* imageData = UIImageJPEGRepresentation (uiImage, 0.f);\r
+\r
+ auto image = ImageFileFormat::loadFrom (imageData.bytes, (size_t) imageData.length);\r
+\r
+ getOwner (self).callListeners (image);\r
+\r
+ MessageManager::callAsync ([self, image]() { getOwner (self).notifyPictureTaken (image); });\r
+ }\r
+\r
+ static UIImage* getImageWithCorrectOrientation (CGImagePropertyOrientation imageOrientation,\r
+ CGImageRef imageData)\r
+ {\r
+ auto origWidth = CGImageGetWidth (imageData);\r
+ auto origHeight = CGImageGetHeight (imageData);\r
+\r
+ auto targetSize = getTargetImageDimensionFor (imageOrientation, imageData);\r
+\r
+ UIGraphicsBeginImageContext (targetSize);\r
+ CGContextRef context = UIGraphicsGetCurrentContext();\r
+\r
+ switch (imageOrientation)\r
+ {\r
+ case kCGImagePropertyOrientationUp:\r
+ CGContextScaleCTM (context, 1.0, -1.0);\r
+ CGContextTranslateCTM (context, 0.0, -targetSize.height);\r
+ break;\r
+ case kCGImagePropertyOrientationRight:\r
+ CGContextRotateCTM (context, 90 * MathConstants<CGFloat>::pi / 180);\r
+ CGContextScaleCTM (context, targetSize.height / origHeight, -targetSize.width / origWidth);\r
+ break;\r
+ case kCGImagePropertyOrientationDown:\r
+ CGContextTranslateCTM (context, targetSize.width, 0.0);\r
+ CGContextScaleCTM (context, -1.0, 1.0);\r
+ break;\r
+ case kCGImagePropertyOrientationLeft:\r
+ CGContextRotateCTM (context, -90 * MathConstants<CGFloat>::pi / 180);\r
+ CGContextScaleCTM (context, targetSize.height / origHeight, -targetSize.width / origWidth);\r
+ CGContextTranslateCTM (context, -targetSize.width, -targetSize.height);\r
+ break;\r
+ default:\r
+ // Not implemented.\r
+ jassertfalse;\r
+ break;\r
+ }\r
+\r
+ CGContextDrawImage (context, CGRectMake (0, 0, targetSize.width, targetSize.height), imageData);\r
+\r
+ UIImage* correctedImage = UIGraphicsGetImageFromCurrentImageContext();\r
+ UIGraphicsEndImageContext();\r
+\r
+ return correctedImage;\r
+ }\r
+\r
+ static CGSize getTargetImageDimensionFor (CGImagePropertyOrientation imageOrientation,\r
+ CGImageRef imageData)\r
+ {\r
+ auto width = CGImageGetWidth (imageData);\r
+ auto height = CGImageGetHeight (imageData);\r
+\r
+ switch (imageOrientation)\r
+ {\r
+ case kCGImagePropertyOrientationUp:\r
+ case kCGImagePropertyOrientationUpMirrored:\r
+ case kCGImagePropertyOrientationDown:\r
+ case kCGImagePropertyOrientationDownMirrored:\r
+ return CGSizeMake ((CGFloat) width, (CGFloat) height);\r
+ case kCGImagePropertyOrientationRight:\r
+ case kCGImagePropertyOrientationRightMirrored:\r
+ case kCGImagePropertyOrientationLeft:\r
+ case kCGImagePropertyOrientationLeftMirrored:\r
+ return CGSizeMake ((CGFloat) height, (CGFloat) width);\r
+ }\r
+\r
+ jassertfalse;\r
+ return CGSizeMake ((CGFloat) width, (CGFloat) height);\r
+ }\r
+\r
+ static void didFinishProcessingPhotoSampleBuffer (id self, SEL, AVCapturePhotoOutput*,\r
+ CMSampleBufferRef imageBuffer, CMSampleBufferRef imagePreviewBuffer,\r
+ AVCaptureResolvedPhotoSettings*, AVCaptureBracketedStillImageSettings*,\r
+ NSError* error)\r
+ {\r
+ String errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+ ignoreUnused (errorString);\r
+\r
+ JUCE_CAMERA_LOG ("didFinishProcessingPhotoSampleBuffer(), error = " + errorString);\r
+\r
+ if (error != nil)\r
+ {\r
+ JUCE_CAMERA_LOG ("Still picture capture failed, error: " + nsStringToJuce (error.localizedDescription));\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ NSData* origImageData = [AVCapturePhotoOutput JPEGPhotoDataRepresentationForJPEGSampleBuffer: imageBuffer previewPhotoSampleBuffer: imagePreviewBuffer];\r
+ auto* origImage = [UIImage imageWithData: origImageData];\r
+ auto imageOrientation = uiImageOrientationToCGImageOrientation (origImage.imageOrientation);\r
+\r
+ auto* uiImage = getImageWithCorrectOrientation (imageOrientation, origImage.CGImage);\r
+\r
+ auto* imageData = UIImageJPEGRepresentation (uiImage, 0.f);\r
+\r
+ auto image = ImageFileFormat::loadFrom (imageData.bytes, (size_t) imageData.length);\r
+\r
+ getOwner (self).callListeners (image);\r
+\r
+ MessageManager::callAsync ([self, image]() { getOwner (self).notifyPictureTaken (image); });\r
+ }\r
+\r
+ static CGImagePropertyOrientation uiImageOrientationToCGImageOrientation (UIImageOrientation orientation)\r
+ {\r
+ switch (orientation)\r
+ {\r
+ case UIImageOrientationUp: return kCGImagePropertyOrientationUp;\r
+ case UIImageOrientationDown: return kCGImagePropertyOrientationDown;\r
+ case UIImageOrientationLeft: return kCGImagePropertyOrientationLeft;\r
+ case UIImageOrientationRight: return kCGImagePropertyOrientationRight;\r
+ case UIImageOrientationUpMirrored: return kCGImagePropertyOrientationUpMirrored;\r
+ case UIImageOrientationDownMirrored: return kCGImagePropertyOrientationDownMirrored;\r
+ case UIImageOrientationLeftMirrored: return kCGImagePropertyOrientationLeftMirrored;\r
+ case UIImageOrientationRightMirrored: return kCGImagePropertyOrientationRightMirrored;\r
+ }\r
+ }\r
+ };\r
+\r
+ //==============================================================================\r
+ void callListeners (const Image& image)\r
+ {\r
+ captureSession.callListeners (image);\r
+ }\r
+\r
+ void notifyPictureTaken (const Image& image)\r
+ {\r
+ takingPicture = false;\r
+\r
+ captureSession.notifyPictureTaken (image);\r
+ }\r
+\r
+ CaptureSession& captureSession;\r
+ AVCaptureOutput* captureOutput;\r
+\r
+ std::unique_ptr<NSObject, NSObjectDeleter> photoOutputDelegate;\r
+\r
+ bool takingPicture = false;\r
+ };\r
+\r
+ //==============================================================================\r
+ // NB: FileOutputRecordingDelegateClass callbacks can be called from any thread (incl.\r
+ // the message thread), so waiting for an event when stopping recording is not an\r
+ // option and VideoRecorder must be alive at all times in order to get stopped\r
+ // recording callback.\r
+ class VideoRecorder\r
+ {\r
+ public:\r
+ VideoRecorder (CaptureSession& captureSession)\r
+ : movieFileOutput ([AVCaptureMovieFileOutput new]),\r
+ delegate (nullptr)\r
+ {\r
+ static FileOutputRecordingDelegateClass cls;\r
+ delegate.reset ([cls.createInstance() init]);\r
+ FileOutputRecordingDelegateClass::setOwner (delegate.get(), this);\r
+\r
+ captureSession.addOutputIfPossible (movieFileOutput);\r
+ }\r
+\r
+ ~VideoRecorder()\r
+ {\r
+ stopRecording();\r
+\r
+ // Shutting down a device while recording will stop the recording\r
+ // abruptly and the recording will be lost.\r
+ jassert (! recordingInProgress);\r
+ }\r
+\r
+ void startRecording (const File& file, AVCaptureVideoOrientation orientationToUse)\r
+ {\r
+ if (Pimpl::getIOSVersion().major >= 10)\r
+ printVideoOutputDebugInfo (movieFileOutput);\r
+\r
+ auto* url = [NSURL fileURLWithPath: juceStringToNS (file.getFullPathName())\r
+ isDirectory: NO];\r
+\r
+ auto* outputConnection = [movieFileOutput connectionWithMediaType: AVMediaTypeVideo];\r
+ outputConnection.videoOrientation = orientationToUse;\r
+\r
+ [movieFileOutput startRecordingToOutputFileURL: url recordingDelegate: delegate.get()];\r
+ }\r
+\r
+ void stopRecording()\r
+ {\r
+ [movieFileOutput stopRecording];\r
+ }\r
+\r
+ Time getTimeOfFirstRecordedFrame() const\r
+ {\r
+ return Time (firstRecordedFrameTimeMs.get());\r
+ }\r
+\r
+ private:\r
+ static void printVideoOutputDebugInfo (AVCaptureMovieFileOutput* output)\r
+ {\r
+ ignoreUnused (output);\r
+\r
+ JUCE_CAMERA_LOG ("Available video codec types:");\r
+\r
+ #if JUCE_CAMERA_LOG_ENABLED\r
+ for (AVVideoCodecType type in output.availableVideoCodecTypes)\r
+ JUCE_CAMERA_LOG (nsStringToJuce (type));\r
+ #endif\r
+\r
+ JUCE_CAMERA_LOG ("Output settings per video connection:");\r
+\r
+ #if JUCE_CAMERA_LOG_ENABLED\r
+ for (AVCaptureConnection* connection in output.connections)\r
+ JUCE_CAMERA_LOG (nsStringToJuce ([[output outputSettingsForConnection: connection] description]));\r
+ #endif\r
+ }\r
+\r
+ //==============================================================================\r
+ struct FileOutputRecordingDelegateClass : public ObjCClass<NSObject<AVCaptureFileOutputRecordingDelegate>>\r
+ {\r
+ FileOutputRecordingDelegateClass() : ObjCClass<NSObject<AVCaptureFileOutputRecordingDelegate>> ("FileOutputRecordingDelegateClass_")\r
+ {\r
+ addMethod (@selector (captureOutput:didStartRecordingToOutputFileAtURL:fromConnections:), started, "v@:@@@");\r
+ addMethod (@selector (captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:), stopped, "v@:@@@@");\r
+\r
+ addIvar<VideoRecorder*> ("owner");\r
+\r
+ registerClass();\r
+ }\r
+\r
+ //==============================================================================\r
+ static VideoRecorder& getOwner (id self) { return *getIvar<VideoRecorder*> (self, "owner"); }\r
+ static void setOwner (id self, VideoRecorder* r) { object_setInstanceVariable (self, "owner", r); }\r
+\r
+ private:\r
+ static void started (id self, SEL, AVCaptureFileOutput*, NSURL*, NSArray<AVCaptureConnection*>*)\r
+ {\r
+ JUCE_CAMERA_LOG ("Started recording");\r
+\r
+ getOwner (self).firstRecordedFrameTimeMs.set (Time::getCurrentTime().toMilliseconds());\r
+ getOwner (self).recordingInProgress = true;\r
+ }\r
+\r
+ static void stopped (id self, SEL, AVCaptureFileOutput*, NSURL*, NSArray<AVCaptureConnection*>*, NSError* error)\r
+ {\r
+ String errorString;\r
+ bool recordingPlayable = true;\r
+\r
+ // There might have been an error in the recording, yet there may be a playable file...\r
+ if ([error code] != noErr)\r
+ {\r
+ id value = [[error userInfo] objectForKey: AVErrorRecordingSuccessfullyFinishedKey];\r
+\r
+ if (value != nil && ! [value boolValue])\r
+ recordingPlayable = false;\r
+\r
+ errorString = nsStringToJuce (error.localizedDescription) + ", playable: " + String ((int) recordingPlayable);\r
+ }\r
+\r
+ JUCE_CAMERA_LOG ("Stopped recording, error = " + errorString);\r
+\r
+ getOwner (self).recordingInProgress = false;\r
+ }\r
+ };\r
+\r
+ AVCaptureMovieFileOutput* movieFileOutput;\r
+ std::unique_ptr<NSObject<AVCaptureFileOutputRecordingDelegate>, NSObjectDeleter> delegate;\r
+ bool recordingInProgress = false;\r
+ Atomic<int64> firstRecordedFrameTimeMs { 0 };\r
+ };\r
+\r
+ //==============================================================================\r
+ void addOutputIfPossible (AVCaptureOutput* output)\r
+ {\r
+ dispatch_async (captureSessionQueue,^\r
+ {\r
+ if ([captureSession.get() canAddOutput: output])\r
+ {\r
+ [captureSession.get() beginConfiguration];\r
+ [captureSession.get() addOutput: output];\r
+ [captureSession.get() commitConfiguration];\r
+\r
+ return;\r
+ }\r
+\r
+ // Can't add output to camera session!\r
+ jassertfalse;\r
+ });\r
+ }\r
+\r
+ //==============================================================================\r
+ void cameraSessionStarted()\r
+ {\r
+ sessionStarted = true;\r
+\r
+ owner.cameraSessionStarted();\r
+ }\r
+\r
+ void cameraSessionRuntimeError (const String& error)\r
+ {\r
+ owner.cameraSessionRuntimeError (error);\r
+ }\r
+\r
+ void callListeners (const Image& image)\r
+ {\r
+ owner.callListeners (image);\r
+ }\r
+\r
+ void notifyPictureTaken (const Image& image)\r
+ {\r
+ owner.notifyPictureTaken (image);\r
+ }\r
+\r
+ Pimpl& owner;\r
+\r
+ dispatch_queue_t captureSessionQueue;\r
+ std::unique_ptr<AVCaptureSession, NSObjectDeleter> captureSession;\r
+ std::unique_ptr<NSObject, NSObjectDeleter> delegate;\r
+\r
+ StillPictureTaker stillPictureTaker;\r
+ VideoRecorder videoRecorder;\r
+\r
+ AVCaptureDevice* cameraDevice = nil;\r
+ AVCaptureVideoPreviewLayer* previewLayer = nil;\r
+\r
+ bool sessionStarted = false;\r
+\r
+ WaitableEvent sessionClosedEvent;\r
+\r
+ static int numCaptureSessions;\r
+ };\r
+\r
+ //==============================================================================\r
+ void cameraSessionStarted()\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraSessionStarted()");\r
+\r
+ cameraOpenCallback (cameraId, {});\r
+ }\r
+\r
+ void cameraSessionRuntimeError (const String& error)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraSessionRuntimeError(), error = " + error);\r
+\r
+ if (! notifiedOfCameraOpening)\r
+ {\r
+ cameraOpenCallback ({}, error);\r
+ }\r
+ else\r
+ {\r
+ if (owner.onErrorOccurred != nullptr)\r
+ owner.onErrorOccurred (error);\r
+ }\r
+ }\r
+\r
+ void callListeners (const Image& image)\r
+ {\r
+ const ScopedLock sl (listenerLock);\r
+ listeners.call ([=] (Listener& l) { l.imageReceived (image); });\r
+ }\r
+\r
+ void notifyPictureTaken (const Image& image)\r
+ {\r
+ JUCE_CAMERA_LOG ("notifyPictureTaken()");\r
+\r
+ if (pictureTakenCallback != nullptr)\r
+ pictureTakenCallback (image);\r
+ }\r
+\r
+ //==============================================================================\r
+ void triggerStillPictureCapture()\r
+ {\r
+ captureSession.takeStillPicture();\r
+ }\r
+\r
+ //==============================================================================\r
+ CameraDevice& owner;\r
+ String cameraId;\r
+ InternalOpenCameraResultCallback cameraOpenCallback;\r
+\r
+ CriticalSection listenerLock;\r
+ ListenerList<Listener> listeners;\r
+\r
+ std::function<void (const Image&)> pictureTakenCallback;\r
+\r
+ CaptureSession captureSession;\r
+\r
+ bool notifiedOfCameraOpening = false;\r
+\r
+ //==============================================================================\r
+ struct IOSVersion\r
+ {\r
+ int major;\r
+ int minor;\r
+ };\r
+\r
+ static IOSVersion getIOSVersion()\r
+ {\r
+ auto processInfo = [NSProcessInfo processInfo];\r
+\r
+ if (! [processInfo respondsToSelector: @selector (operatingSystemVersion)])\r
+ return {7, 0}; // Below 8.0 in fact, but only care that it's below 8\r
+\r
+ return { (int)[processInfo operatingSystemVersion].majorVersion,\r
+ (int)[processInfo operatingSystemVersion].minorVersion };\r
+ }\r
+\r
+ static IOSVersion iosVersion;\r
+\r
+ friend struct CameraDevice::ViewerComponent;\r
+\r
+ JUCE_DECLARE_NON_COPYABLE (Pimpl)\r
+};\r
+\r
+CameraDevice::Pimpl::IOSVersion CameraDevice::Pimpl::iosVersion = CameraDevice::Pimpl::getIOSVersion();\r
+int CameraDevice::Pimpl::CaptureSession::numCaptureSessions = 0;\r
+\r
+//==============================================================================\r
+struct CameraDevice::ViewerComponent : public UIViewComponent\r
+{\r
+ //==============================================================================\r
+ struct JuceCameraDeviceViewerClass : public ObjCClass<UIView>\r
+ {\r
+ JuceCameraDeviceViewerClass() : ObjCClass<UIView> ("JuceCameraDeviceViewerClass_")\r
+ {\r
+ addMethod (@selector (layoutSubviews), layoutSubviews, "v@:");\r
+\r
+ registerClass();\r
+ }\r
+\r
+ private:\r
+ static void layoutSubviews (id self, SEL)\r
+ {\r
+ sendSuperclassMessage (self, @selector (layoutSubviews));\r
+\r
+ UIView* asUIView = (UIView*) self;\r
+\r
+ updateOrientation (self);\r
+\r
+ if (auto* previewLayer = getPreviewLayer (self))\r
+ previewLayer.frame = asUIView.bounds;\r
+ }\r
+\r
+ static AVCaptureVideoPreviewLayer* getPreviewLayer (id self)\r
+ {\r
+ UIView* asUIView = (UIView*) self;\r
+\r
+ if (asUIView.layer.sublayers != nil && [asUIView.layer.sublayers count] > 0)\r
+ if ([asUIView.layer.sublayers[0] isKindOfClass: [AVCaptureVideoPreviewLayer class]])\r
+ return (AVCaptureVideoPreviewLayer*) asUIView.layer.sublayers[0];\r
+\r
+ return nil;\r
+ }\r
+\r
+ static void updateOrientation (id self)\r
+ {\r
+ if (auto* previewLayer = getPreviewLayer (self))\r
+ {\r
+ UIDeviceOrientation o = [UIDevice currentDevice].orientation;\r
+\r
+ if (UIDeviceOrientationIsPortrait (o) || UIDeviceOrientationIsLandscape (o))\r
+ {\r
+ if (previewLayer.connection != nil)\r
+ previewLayer.connection.videoOrientation = (AVCaptureVideoOrientation) o;\r
+ }\r
+ }\r
+ }\r
+ };\r
+\r
+ ViewerComponent (CameraDevice& device)\r
+ {\r
+ static JuceCameraDeviceViewerClass cls;\r
+\r
+ // Initial size that can be overriden later.\r
+ setSize (640, 480);\r
+\r
+ auto* view = [cls.createInstance() init];\r
+ setView (view);\r
+\r
+ auto* previewLayer = device.pimpl->captureSession.createPreviewLayer();\r
+ previewLayer.frame = view.bounds;\r
+\r
+ UIInterfaceOrientation statusBarOrientation = [UIApplication sharedApplication].statusBarOrientation;\r
+ AVCaptureVideoOrientation videoOrientation = statusBarOrientation != UIInterfaceOrientationUnknown\r
+ ? (AVCaptureVideoOrientation) statusBarOrientation\r
+ : AVCaptureVideoOrientationPortrait;\r
+\r
+ previewLayer.connection.videoOrientation = videoOrientation;\r
+\r
+ [view.layer addSublayer: previewLayer];\r
+ }\r
+};\r
+\r
+//==============================================================================\r
+String CameraDevice::getFileExtension()\r
+{\r
+ return ".mov";\r
+}\r
\r
struct CameraDevice::Pimpl\r
{\r
- Pimpl (const String&, int /*index*/, int /*minWidth*/, int /*minHeight*/,\r
+ Pimpl (CameraDevice& ownerToUse, const String&, int /*index*/, int /*minWidth*/, int /*minHeight*/,\r
int /*maxWidth*/, int /*maxHeight*/, bool useHighQuality)\r
+ : owner (ownerToUse)\r
{\r
JUCE_AUTORELEASEPOOL\r
{\r
static DelegateClass cls;\r
callbackDelegate = (id<AVCaptureFileOutputRecordingDelegate>) [cls.createInstance() init];\r
DelegateClass::setOwner (callbackDelegate, this);\r
+\r
+ SEL runtimeErrorSel = NSSelectorFromString (nsStringLiteral ("captureSessionRuntimeError:"));\r
+\r
+ [[NSNotificationCenter defaultCenter] addObserver: callbackDelegate\r
+ selector: runtimeErrorSel\r
+ name: AVCaptureSessionRuntimeErrorNotification\r
+ object: session];\r
}\r
}\r
\r
~Pimpl()\r
{\r
+ [[NSNotificationCenter defaultCenter] removeObserver: callbackDelegate];\r
+\r
[session stopRunning];\r
removeImageCapture();\r
removeMovieCapture();\r
refreshConnections();\r
}\r
\r
+ void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)\r
+ {\r
+ if (pictureTakenCallbackToUse == nullptr)\r
+ {\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ pictureTakenCallback = static_cast<std::function<void (const Image&)>&&> (pictureTakenCallbackToUse);\r
+\r
+ triggerImageCapture();\r
+ }\r
+\r
void startRecordingToFile (const File& file, int /*quality*/)\r
{\r
stopRecording();\r
return nil;\r
}\r
\r
- void handleImageCapture (const void* data, size_t size)\r
+ void handleImageCapture (const Image& image)\r
{\r
- auto image = ImageFileFormat::loadFrom (data, size);\r
-\r
const ScopedLock sl (listenerLock);\r
-\r
- if (! listeners.isEmpty())\r
- {\r
- for (int i = listeners.size(); --i >= 0;)\r
- if (auto* l = listeners[i])\r
- l->imageReceived (image);\r
-\r
- if (! listeners.isEmpty())\r
- triggerImageCapture();\r
- }\r
+ listeners.call ([=] (Listener& l) { l.imageReceived (image); });\r
}\r
\r
void triggerImageCapture()\r
if (auto* videoConnection = getVideoConnection())\r
{\r
[imageOutput captureStillImageAsynchronouslyFromConnection: videoConnection\r
- completionHandler: ^(CMSampleBufferRef sampleBuffer, NSError*)\r
+ completionHandler: ^(CMSampleBufferRef sampleBuffer, NSError* error)\r
{\r
- auto buffer = CMSampleBufferGetDataBuffer (sampleBuffer);\r
- size_t size = CMBlockBufferGetDataLength (buffer);\r
- jassert (CMBlockBufferIsRangeContiguous (buffer, 0, size)); // TODO: need to add code to handle this if it happens\r
- char* data = nullptr;\r
- CMBlockBufferGetDataPointer (buffer, 0, &size, nullptr, &data);\r
- handleImageCapture (data, size);\r
+ if (error != nil)\r
+ {\r
+ JUCE_CAMERA_LOG ("Still picture capture failed, error: " + nsStringToJuce (error.localizedDescription));\r
+ jassertfalse;\r
+ return;\r
+ }\r
+\r
+ NSData* imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation: sampleBuffer];\r
+\r
+ auto image = ImageFileFormat::loadFrom (imageData.bytes, (size_t) imageData.length);\r
+\r
+ handleImageCapture (image);\r
+\r
+ WeakReference<Pimpl> weakRef (this);\r
+ MessageManager::callAsync ([weakRef, image]() mutable\r
+ {\r
+ if (weakRef != nullptr && weakRef->pictureTakenCallback != nullptr)\r
+ weakRef->pictureTakenCallback (image);\r
+ });\r
}];\r
}\r
}\r
void addListener (CameraDevice::Listener* listenerToAdd)\r
{\r
const ScopedLock sl (listenerLock);\r
- listeners.addIfNotAlreadyThere (listenerToAdd);\r
+ listeners.add (listenerToAdd);\r
\r
if (listeners.size() == 1)\r
triggerImageCapture();\r
void removeListener (CameraDevice::Listener* listenerToRemove)\r
{\r
const ScopedLock sl (listenerLock);\r
- listeners.removeFirstMatchingValue (listenerToRemove);\r
+ listeners.remove (listenerToRemove);\r
}\r
\r
static StringArray getAvailableDevices()\r
return results;\r
}\r
\r
+ void cameraSessionRuntimeError (const String& error)\r
+ {\r
+ JUCE_CAMERA_LOG ("cameraSessionRuntimeError(), error = " + error);\r
+\r
+ if (owner.onErrorOccurred != nullptr)\r
+ owner.onErrorOccurred (error);\r
+ }\r
+\r
+ CameraDevice& owner;\r
AVCaptureView* captureView = nil;\r
AVCaptureSession* session = nil;\r
AVCaptureMovieFileOutput* fileOutput = nil;\r
Time firstPresentationTime;\r
bool isRecording = false;\r
\r
- Array<CameraDevice::Listener*> listeners;\r
CriticalSection listenerLock;\r
+ ListenerList<Listener> listeners;\r
+\r
+ std::function<void (const Image&)> pictureTakenCallback;\r
+\r
+ JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl)\r
\r
private:\r
//==============================================================================\r
addMethod (@selector (captureOutput:didResumeRecordingToOutputFileAtURL: fromConnections:), didResumeRecordingToOutputFileAtURL, "v@:@@@");\r
addMethod (@selector (captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error:), willFinishRecordingToOutputFileAtURL, "v@:@@@@");\r
\r
+ SEL runtimeErrorSel = NSSelectorFromString (nsStringLiteral ("captureSessionRuntimeError:"));\r
+ addMethod (runtimeErrorSel, sessionRuntimeError, "v@:@");\r
+\r
registerClass();\r
}\r
\r
static void setOwner (id self, Pimpl* owner) { object_setInstanceVariable (self, "owner", owner); }\r
- static Pimpl* getOwner (id self) { return getIvar<Pimpl*> (self, "owner"); }\r
+ static Pimpl& getOwner (id self) { return *getIvar<Pimpl*> (self, "owner"); }\r
\r
private:\r
static void didStartRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {}\r
static void didPauseRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {}\r
static void didResumeRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {}\r
static void willFinishRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*, NSError*) {}\r
+\r
+ static void sessionRuntimeError (id self, SEL, NSNotification* notification)\r
+ {\r
+ JUCE_CAMERA_LOG (nsStringToJuce ([notification description]));\r
+\r
+ NSError* error = notification.userInfo[AVCaptureSessionErrorKey];\r
+ auto errorString = error != nil ? nsStringToJuce (error.localizedDescription) : String();\r
+ getOwner (self).cameraSessionRuntimeError (errorString);\r
+ }\r
};\r
\r
JUCE_DECLARE_NON_COPYABLE (Pimpl)\r
\r
struct CameraDevice::Pimpl : public ChangeBroadcaster\r
{\r
- Pimpl (const String&, int index,\r
- int minWidth, int minHeight,\r
- int maxWidth, int maxHeight, bool /*highQuality*/)\r
- : isRecording (false),\r
+ Pimpl (CameraDevice& ownerToUse, const String&, int index,\r
+ int minWidth, int minHeight, int maxWidth, int maxHeight,\r
+ bool /*highQuality*/)\r
+ : owner (ownerToUse),\r
+ isRecording (false),\r
openedSuccessfully (false),\r
imageNeedsFlipping (false),\r
width (0), height (0),\r
\r
bool openedOk() const noexcept { return openedSuccessfully; }\r
\r
+ void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)\r
+ {\r
+ {\r
+ const ScopedLock sl (pictureTakenCallbackLock);\r
+\r
+ jassert (pictureTakenCallbackToUse != nullptr);\r
+\r
+ if (pictureTakenCallbackToUse == nullptr)\r
+ return;\r
+\r
+ pictureTakenCallback = static_cast<std::function<void (const Image&)>&&> (pictureTakenCallbackToUse);\r
+ }\r
+\r
+ addUser();\r
+ }\r
+\r
void startRecordingToFile (const File& file, int quality)\r
{\r
addUser();\r
if (listeners.size() == 0)\r
addUser();\r
\r
- listeners.addIfNotAlreadyThere (listenerToAdd);\r
+ listeners.add (listenerToAdd);\r
}\r
\r
void removeListener (CameraDevice::Listener* listenerToRemove)\r
{\r
const ScopedLock sl (listenerLock);\r
- listeners.removeAllInstancesOf (listenerToRemove);\r
+ listeners.remove (listenerToRemove);\r
\r
if (listeners.size() == 0)\r
removeUser();\r
void callListeners (const Image& image)\r
{\r
const ScopedLock sl (listenerLock);\r
+ listeners.call ([=] (Listener& l) { l.imageReceived (image); });\r
+ }\r
\r
- for (int i = listeners.size(); --i >= 0;)\r
- if (CameraDevice::Listener* const l = listeners[i])\r
- l->imageReceived (image);\r
+ void notifyPictureTakenIfNeeded (const Image& image)\r
+ {\r
+ {\r
+ const ScopedLock sl (pictureTakenCallbackLock);\r
+\r
+ if (pictureTakenCallback == nullptr)\r
+ return;\r
+ }\r
+\r
+ WeakReference<Pimpl> weakRef (this);\r
+ MessageManager::callAsync ([weakRef, image]() mutable\r
+ {\r
+ if (weakRef == nullptr)\r
+ return;\r
+\r
+ if (weakRef->pictureTakenCallback != nullptr)\r
+ weakRef->pictureTakenCallback (image);\r
+\r
+ weakRef->pictureTakenCallback = nullptr;\r
+ });\r
}\r
\r
void addUser()\r
if (listeners.size() > 0)\r
callListeners (loadingImage);\r
\r
+ notifyPictureTakenIfNeeded (loadingImage);\r
+\r
sendChangeMessage();\r
}\r
\r
JUCE_DECLARE_NON_COPYABLE (GrabberCallback)\r
};\r
\r
+ CameraDevice& owner;\r
+\r
ComSmartPtr<GrabberCallback> callback;\r
- Array<CameraDevice::Listener*> listeners;\r
+\r
CriticalSection listenerLock;\r
+ ListenerList<Listener> listeners;\r
+\r
+ CriticalSection pictureTakenCallbackLock;\r
+ std::function<void (const Image&)> pictureTakenCallback;\r
\r
bool isRecording, openedSuccessfully;\r
int width, height;\r
bool recordNextFrameTime;\r
int previewMaxFPS;\r
\r
+ JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl)\r
+\r
private:\r
void getVideoSizes (IAMStreamConfig* const streamConfig)\r
{\r
public ChangeListener\r
{\r
ViewerComponent (CameraDevice& d)\r
- : owner (d.pimpl), maxFPS (15), lastRepaintTime (0)\r
+ : owner (d.pimpl.get()), maxFPS (15), lastRepaintTime (0)\r
{\r
setOpaque (true);\r
owner->addChangeListener (this);\r
Pimpl() : videoLoaded (false)\r
{\r
setOpaque (true);\r
- context = new DirectShowContext (*this);\r
- componentWatcher = new ComponentWatcher (*this);\r
+ context.reset (new DirectShowContext (*this));\r
+ componentWatcher.reset (new ComponentWatcher (*this));\r
}\r
\r
~Pimpl()\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentWatcher)\r
};\r
\r
- ScopedPointer<ComponentWatcher> componentWatcher;\r
+ std::unique_ptr<ComponentWatcher> componentWatcher;\r
\r
//======================================================================\r
struct DirectShowContext : public AsyncUpdater\r
{\r
if (SystemStats::getOperatingSystemType() >= SystemStats::WinVista)\r
{\r
- videoRenderer = new VideoRenderers::EVR();\r
+ videoRenderer.reset (new VideoRenderers::EVR());\r
hr = videoRenderer->create (graphBuilder, baseFilter, hwnd);\r
\r
if (FAILED (hr))\r
\r
if (videoRenderer == nullptr)\r
{\r
- videoRenderer = new VideoRenderers::VMR7();\r
+ videoRenderer.reset (new VideoRenderers::VMR7());\r
hr = videoRenderer->create (graphBuilder, baseFilter, hwnd);\r
}\r
}\r
ComSmartPtr<IBasicAudio> basicAudio;\r
ComSmartPtr<IBaseFilter> baseFilter;\r
\r
- ScopedPointer<VideoRenderers::Base> videoRenderer;\r
+ std::unique_ptr<VideoRenderers::Base> videoRenderer;\r
\r
bool hasVideo = false, needToUpdateViewport = true, needToRecreateNativeWindow = false;\r
\r
\r
if (auto* topLevelPeer = component.getTopLevelComponent()->getPeer())\r
{\r
- nativeWindow = new NativeWindow ((HWND) topLevelPeer->getNativeHandle(), this);\r
+ nativeWindow.reset (new NativeWindow ((HWND) topLevelPeer->getNativeHandle(), this));\r
\r
hwnd = nativeWindow->hwnd;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NativeWindow)\r
};\r
\r
- ScopedPointer<NativeWindow> nativeWindow;\r
+ std::unique_ptr<NativeWindow> nativeWindow;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectShowContext)\r
};\r
\r
- ScopedPointer<DirectShowContext> context;\r
+ std::unique_ptr<DirectShowContext> context;\r
\r
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl)\r
};\r
\r
//==============================================================================\r
/** Tries to load a video from a local file.\r
- @returns am error if the file failed to be loaded correctly\r
+ @returns an error if the file failed to be loaded correctly\r
*/\r
Result load (const File& file);\r
\r
/** Tries to load a video from a URL.\r
- @returns am error if the file failed to be loaded correctly\r
+ @returns an error if the file failed to be loaded correctly\r
*/\r
Result load (const URL& url);\r
\r
File getCurrentVideoFile() const;\r
\r
/** Returns the last URL that was loaded.\r
- If nothing is open, or if it was a file rather than a URL, this will return File().\r
+ If nothing is open, or if it was a file rather than a URL, this will return URL().\r
*/\r
URL getCurrentVideoURL() const;\r
\r
struct Pimpl;\r
friend struct Pimpl;\r
friend struct ContainerDeletePolicy<Pimpl>;\r
- ScopedPointer<Pimpl> pimpl;\r
+ std::unique_ptr<Pimpl> pimpl;\r
\r
void resized() override;\r
void timerCallback() override;\r