git subrepo clone --branch=sono6good https://github.com/essej/JUCE.git deps/juce

subrepo:
  subdir:   "deps/juce"
  merged:   "b13f9084e"
upstream:
  origin:   "https://github.com/essej/JUCE.git"
  branch:   "sono6good"
  commit:   "b13f9084e"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
This commit is contained in:
essej
2022-04-18 17:51:22 -04:00
parent 63e175fee6
commit 25bd5d8adb
3210 changed files with 1045392 additions and 0 deletions
deps/juce
.gitattributes
.github
.gitignore.gitlab-ci.yml.gitrepoBREAKING-CHANGES.txtCMakeLists.txtChangeList.txtLICENSE.mdREADME.md
docs
examples
Assets
Audio
CMake
CMakeLists.txt
DSP
DemoRunner
Builds
Android
app
CMakeLists.txtbuild.gradle
src
debug
res
main
AndroidManifest.xml
assets
res
drawable-hdpi
drawable-ldpi
drawable-mdpi
drawable-xhdpi
release
res
build.gradle
gradle
gradlewgradlew.batsettings.gradle
LinuxMakefile
MacOSX
VisualStudio2015
VisualStudio2017
VisualStudio2019
iOS
CMakeLists.txtDemoRunner.jucer
JuceLibraryCode
Source
GUI
Plugins
Utilities
extras
AudioPerformanceTest
AudioPerformanceTest.jucer
Builds
CMakeLists.txt
JuceLibraryCode
Source
AudioPluginHost
AudioPluginHost.jucer
Builds
Android
app
CMakeLists.txtbuild.gradle
src
debug
res
main
AndroidManifest.xml
assets
res
drawable-hdpi
drawable-ldpi
drawable-mdpi
drawable-xhdpi
release
res
build.gradle
gradle
gradlewgradlew.batsettings.gradle
LinuxMakefile
MacOSX
VisualStudio2015
VisualStudio2017
VisualStudio2019
iOS
CMakeLists.txt
JuceLibraryCode
Source
BinaryBuilder
Build
CMakeLists.txt
NetworkGraphicsDemo
Builds
CMakeLists.txt
JuceLibraryCode
NetworkGraphicsDemo.jucerREADME.txt
Source
Projucer
Builds
CMakeLists.txt
JuceLibraryCode
Projucer.jucer
Source
Application
BinaryData
CodeEditor
ComponentEditor
Components
Documents
PaintElements
Properties
UI
jucer_BinaryResources.cppjucer_BinaryResources.hjucer_ComponentLayout.cppjucer_ComponentLayout.hjucer_GeneratedCode.cppjucer_GeneratedCode.hjucer_JucerDocument.cppjucer_JucerDocument.hjucer_ObjectTypes.cppjucer_ObjectTypes.hjucer_PaintRoutine.cppjucer_PaintRoutine.hjucer_UtilityFunctions.h
Licenses
LiveBuildEngine
Project
ProjectSaving
Settings
Utility
UnitTestRunner
WindowsDLL
modules
CMakeLists.txt
juce_analytics
juce_audio_basics
audio_play_head
buffers
juce_audio_basics.cppjuce_audio_basics.hjuce_audio_basics.mm
midi
mpe
native
sources
synthesisers
utilities
juce_audio_devices
audio_io
juce_audio_devices.cppjuce_audio_devices.hjuce_audio_devices.mm
midi_io
native
java
app
juce_android_Audio.cppjuce_android_HighPerformanceAudioHelpers.hjuce_android_Midi.cppjuce_android_Oboe.cppjuce_android_OpenSL.cppjuce_ios_Audio.cppjuce_ios_Audio.hjuce_linux_ALSA.cppjuce_linux_Bela.cppjuce_linux_JackAudio.cppjuce_linux_Midi.cppjuce_mac_CoreAudio.cppjuce_mac_CoreMidi.mmjuce_win32_ASIO.cppjuce_win32_DirectSound.cppjuce_win32_Midi.cppjuce_win32_WASAPI.cpp
oboe
CMakeLists.txtLICENSEREADME.md
include
src
aaudio
common
fifo
flowgraph
opensles
sources
juce_audio_formats
codecs
flac
juce_AiffAudioFormat.cppjuce_AiffAudioFormat.hjuce_CoreAudioFormat.cppjuce_CoreAudioFormat.hjuce_FlacAudioFormat.cppjuce_FlacAudioFormat.hjuce_LAMEEncoderAudioFormat.cppjuce_LAMEEncoderAudioFormat.hjuce_MP3AudioFormat.cppjuce_MP3AudioFormat.hjuce_OggVorbisAudioFormat.cppjuce_OggVorbisAudioFormat.hjuce_WavAudioFormat.cppjuce_WavAudioFormat.hjuce_WindowsMediaAudioFormat.cppjuce_WindowsMediaAudioFormat.h
oggvorbis
format
juce_audio_formats.cppjuce_audio_formats.hjuce_audio_formats.mm
sampler
juce_audio_plugin_client
AAX
AU
AUResources.r
RTAS
Standalone
Unity
VST
VST3
juce_audio_plugin_client.hjuce_audio_plugin_client_AAX.cppjuce_audio_plugin_client_AAX.mmjuce_audio_plugin_client_AU.rjuce_audio_plugin_client_AU_1.mmjuce_audio_plugin_client_AU_2.mmjuce_audio_plugin_client_AUv3.mmjuce_audio_plugin_client_RTAS.rjuce_audio_plugin_client_RTAS_1.cppjuce_audio_plugin_client_RTAS_2.cppjuce_audio_plugin_client_RTAS_3.cppjuce_audio_plugin_client_RTAS_4.cppjuce_audio_plugin_client_RTAS_utils.cppjuce_audio_plugin_client_RTAS_utils.mmjuce_audio_plugin_client_Standalone.cppjuce_audio_plugin_client_Unity.cppjuce_audio_plugin_client_VST2.cppjuce_audio_plugin_client_VST3.cppjuce_audio_plugin_client_VST_utils.mmjuce_audio_plugin_client_utils.cpp
utility
juce_audio_processors
format
format_types
VST3_SDK
JUCE_README.mdLICENSE.txtREADME.mdVST3_License_Agreement.pdfVST3_Usage_Guidelines.pdf
base
pluginterfaces
public.sdk
juce_AU_Shared.hjuce_AudioUnitPluginFormat.hjuce_AudioUnitPluginFormat.mmjuce_LADSPAPluginFormat.cppjuce_LADSPAPluginFormat.hjuce_LegacyAudioParameter.cppjuce_VST3Common.hjuce_VST3Headers.hjuce_VST3PluginFormat.cppjuce_VST3PluginFormat.hjuce_VSTCommon.hjuce_VSTMidiEventList.hjuce_VSTPluginFormat.cppjuce_VSTPluginFormat.h
juce_audio_processors.cppjuce_audio_processors.hjuce_audio_processors.mm
processors
scanning
utilities
juce_audio_utils
juce_box2d
box2d
Box2D.h
Collision
Common
Dynamics
README.txt
Rope
juce_box2d.cppjuce_box2d.h
utils
juce_core
containers
files
javascript
juce_core.cppjuce_core.hjuce_core.mm
logging
maths
memory
misc
native
network
streams
system
text
threads
time
unit_tests
xml
zip
juce_cryptography
juce_data_structures
juce_dsp
containers
filter_design
frequency
juce_dsp.cppjuce_dsp.hjuce_dsp.mm
maths
native
processors
widgets
juce_events
juce_graphics
colour
contexts
effects
fonts
geometry
image_formats
images
juce_graphics.cppjuce_graphics.hjuce_graphics.mm
native
placement
juce_gui_basics
accessibility
application
buttons
commands
components
desktop
drawables
filebrowser
juce_gui_basics.cppjuce_gui_basics.hjuce_gui_basics.mm
keyboard
layout
lookandfeel
menus
misc
mouse
native
accessibility
java
javaopt
juce_MultiTouchMapper.hjuce_ScopedDPIAwarenessDisabler.hjuce_android_ContentSharer.cppjuce_android_FileChooser.cppjuce_android_Windowing.cppjuce_common_MimeTypes.cppjuce_ios_ContentSharer.cppjuce_ios_FileChooser.mmjuce_ios_UIViewComponentPeer.mmjuce_ios_Windowing.mmjuce_linux_FileChooser.cppjuce_linux_Windowing.cppjuce_mac_FileChooser.mmjuce_mac_MainMenu.mmjuce_mac_MouseCursor.mmjuce_mac_NSViewComponentPeer.mmjuce_mac_Windowing.mmjuce_win32_DragAndDrop.cppjuce_win32_FileChooser.cppjuce_win32_ScopedThreadDPIAwarenessSetter.hjuce_win32_Windowing.cpp
x11
positioning
properties
widgets
windows
juce_gui_extra
code_editor
documents
embedding
juce_gui_extra.cppjuce_gui_extra.hjuce_gui_extra.mm
misc
native
juce_opengl
juce_osc
juce_product_unlocking
juce_video

@ -0,0 +1,187 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2020 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 6 End-User License
Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
End User License Agreement: www.juce.com/juce-6-licence
Privacy Policy: www.juce.com/juce-privacy-policy
Or: You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
//==============================================================================
/**
Represents a type of justification to be used when positioning graphical items.
e.g. it indicates whether something should be placed top-left, top-right,
centred, etc.
It is used in various places wherever this kind of information is needed.
@tags{Graphics}
*/
class Justification
{
public:
//==============================================================================
/** Creates a Justification object using a combination of flags from the Flags enum. */
Justification (int justificationFlags) noexcept : flags (justificationFlags) {}
/** Creates a copy of another Justification object. */
Justification (const Justification&) = default;
/** Copies another Justification object. */
Justification& operator= (const Justification&) = default;
bool operator== (const Justification& other) const noexcept { return flags == other.flags; }
bool operator!= (const Justification& other) const noexcept { return flags != other.flags; }
//==============================================================================
/** Returns the raw flags that are set for this Justification object. */
inline int getFlags() const noexcept { return flags; }
/** Tests a set of flags for this object.
@returns true if any of the flags passed in are set on this object.
*/
inline bool testFlags (int flagsToTest) const noexcept { return (flags & flagsToTest) != 0; }
/** Returns just the flags from this object that deal with vertical layout. */
int getOnlyVerticalFlags() const noexcept { return flags & (top | bottom | verticallyCentred); }
/** Returns just the flags from this object that deal with horizontal layout. */
int getOnlyHorizontalFlags() const noexcept { return flags & (left | right | horizontallyCentred | horizontallyJustified); }
//==============================================================================
/** Adjusts the position of a rectangle to fit it into a space.
The (x, y) position of the rectangle will be updated to position it inside the
given space according to the justification flags.
*/
template <typename ValueType>
void applyToRectangle (ValueType& x, ValueType& y, ValueType w, ValueType h,
ValueType spaceX, ValueType spaceY, ValueType spaceW, ValueType spaceH) const noexcept
{
x = spaceX;
if ((flags & horizontallyCentred) != 0) x += (spaceW - w) / (ValueType) 2;
else if ((flags & right) != 0) x += spaceW - w;
y = spaceY;
if ((flags & verticallyCentred) != 0) y += (spaceH - h) / (ValueType) 2;
else if ((flags & bottom) != 0) y += spaceH - h;
}
/** Returns the new position of a rectangle that has been justified to fit within a given space.
*/
template <typename ValueType>
const Rectangle<ValueType> appliedToRectangle (const Rectangle<ValueType>& areaToAdjust,
const Rectangle<ValueType>& targetSpace) const noexcept
{
ValueType x = areaToAdjust.getX(), y = areaToAdjust.getY();
applyToRectangle (x, y, areaToAdjust.getWidth(), areaToAdjust.getHeight(),
targetSpace.getX(), targetSpace.getY(), targetSpace.getWidth(), targetSpace.getHeight());
return areaToAdjust.withPosition (x, y);
}
//==============================================================================
/** Flag values that can be combined and used in the constructor. */
enum Flags
{
//==============================================================================
/** Indicates that the item should be aligned against the left edge of the available space. */
left = 1,
/** Indicates that the item should be aligned against the right edge of the available space. */
right = 2,
/** Indicates that the item should be placed in the centre between the left and right
sides of the available space. */
horizontallyCentred = 4,
//==============================================================================
/** Indicates that the item should be aligned against the top edge of the available space. */
top = 8,
/** Indicates that the item should be aligned against the bottom edge of the available space. */
bottom = 16,
/** Indicates that the item should be placed in the centre between the top and bottom
sides of the available space. */
verticallyCentred = 32,
//==============================================================================
/** Indicates that lines of text should be spread out to fill the maximum width
available, so that both margins are aligned vertically.
*/
horizontallyJustified = 64,
//==============================================================================
/** Indicates that the item should be centred vertically and horizontally.
This is equivalent to (horizontallyCentred | verticallyCentred)
*/
centred = 36,
/** Indicates that the item should be centred vertically but placed on the left hand side.
This is equivalent to (left | verticallyCentred)
*/
centredLeft = 33,
/** Indicates that the item should be centred vertically but placed on the right hand side.
This is equivalent to (right | verticallyCentred)
*/
centredRight = 34,
/** Indicates that the item should be centred horizontally and placed at the top.
This is equivalent to (horizontallyCentred | top)
*/
centredTop = 12,
/** Indicates that the item should be centred horizontally and placed at the bottom.
This is equivalent to (horizontallyCentred | bottom)
*/
centredBottom = 20,
/** Indicates that the item should be placed in the top-left corner.
This is equivalent to (left | top)
*/
topLeft = 9,
/** Indicates that the item should be placed in the top-right corner.
This is equivalent to (right | top)
*/
topRight = 10,
/** Indicates that the item should be placed in the bottom-left corner.
This is equivalent to (left | bottom)
*/
bottomLeft = 17,
/** Indicates that the item should be placed in the bottom-left corner.
This is equivalent to (right | bottom)
*/
bottomRight = 18
};
private:
//==============================================================================
int flags;
};
} // namespace juce

@ -0,0 +1,122 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2020 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 6 End-User License
Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
End User License Agreement: www.juce.com/juce-6-licence
Privacy Policy: www.juce.com/juce-privacy-policy
Or: You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
bool RectanglePlacement::operator== (const RectanglePlacement& other) const noexcept
{
return flags == other.flags;
}
bool RectanglePlacement::operator!= (const RectanglePlacement& other) const noexcept
{
return flags != other.flags;
}
void RectanglePlacement::applyTo (double& x, double& y, double& w, double& h,
const double dx, const double dy, const double dw, const double dh) const noexcept
{
if (w == 0.0 || h == 0.0)
return;
if ((flags & stretchToFit) != 0)
{
x = dx;
y = dy;
w = dw;
h = dh;
}
else
{
double scale = (flags & fillDestination) != 0 ? jmax (dw / w, dh / h)
: jmin (dw / w, dh / h);
if ((flags & onlyReduceInSize) != 0)
scale = jmin (scale, 1.0);
if ((flags & onlyIncreaseInSize) != 0)
scale = jmax (scale, 1.0);
w *= scale;
h *= scale;
if ((flags & xLeft) != 0)
x = dx;
else if ((flags & xRight) != 0)
x = dx + dw - w;
else
x = dx + (dw - w) * 0.5;
if ((flags & yTop) != 0)
y = dy;
else if ((flags & yBottom) != 0)
y = dy + dh - h;
else
y = dy + (dh - h) * 0.5;
}
}
AffineTransform RectanglePlacement::getTransformToFit (const Rectangle<float>& source, const Rectangle<float>& destination) const noexcept
{
if (source.isEmpty())
return AffineTransform();
float newX = destination.getX();
float newY = destination.getY();
float scaleX = destination.getWidth() / source.getWidth();
float scaleY = destination.getHeight() / source.getHeight();
if ((flags & stretchToFit) == 0)
{
scaleX = (flags & fillDestination) != 0 ? jmax (scaleX, scaleY)
: jmin (scaleX, scaleY);
if ((flags & onlyReduceInSize) != 0)
scaleX = jmin (scaleX, 1.0f);
if ((flags & onlyIncreaseInSize) != 0)
scaleX = jmax (scaleX, 1.0f);
scaleY = scaleX;
if ((flags & xRight) != 0)
newX += destination.getWidth() - source.getWidth() * scaleX; // right
else if ((flags & xLeft) == 0)
newX += (destination.getWidth() - source.getWidth() * scaleX) / 2.0f; // centre
if ((flags & yBottom) != 0)
newY += destination.getHeight() - source.getHeight() * scaleX; // bottom
else if ((flags & yTop) == 0)
newY += (destination.getHeight() - source.getHeight() * scaleX) / 2.0f; // centre
}
return AffineTransform::translation (-source.getX(), -source.getY())
.scaled (scaleX, scaleY)
.translated (newX, newY);
}
} // namespace juce

@ -0,0 +1,174 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2020 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 6 End-User License
Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
End User License Agreement: www.juce.com/juce-6-licence
Privacy Policy: www.juce.com/juce-privacy-policy
Or: You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
//==============================================================================
/**
Defines the method used to position some kind of rectangular object within
a rectangular viewport.
Although similar to Justification, this is more specific, and has some extra
options.
@tags{Graphics}
*/
class JUCE_API RectanglePlacement
{
public:
//==============================================================================
/** Creates a RectanglePlacement object using a combination of flags from the Flags enum. */
inline RectanglePlacement (int placementFlags) noexcept : flags (placementFlags) {}
/** Creates a default RectanglePlacement object, which is equivalent to using the 'centred' flag. */
inline RectanglePlacement() = default;
/** Creates a copy of another RectanglePlacement object. */
RectanglePlacement (const RectanglePlacement&) = default;
/** Copies another RectanglePlacement object. */
RectanglePlacement& operator= (const RectanglePlacement&) = default;
bool operator== (const RectanglePlacement&) const noexcept;
bool operator!= (const RectanglePlacement&) const noexcept;
//==============================================================================
/** Flag values that can be combined and used in the constructor. */
enum Flags
{
//==============================================================================
/** Indicates that the source rectangle's left edge should be aligned with the left edge of the target rectangle. */
xLeft = 1,
/** Indicates that the source rectangle's right edge should be aligned with the right edge of the target rectangle. */
xRight = 2,
/** Indicates that the source should be placed in the centre between the left and right
sides of the available space. */
xMid = 4,
//==============================================================================
/** Indicates that the source's top edge should be aligned with the top edge of the
destination rectangle. */
yTop = 8,
/** Indicates that the source's bottom edge should be aligned with the bottom edge of the
destination rectangle. */
yBottom = 16,
/** Indicates that the source should be placed in the centre between the top and bottom
sides of the available space. */
yMid = 32,
//==============================================================================
/** If this flag is set, then the source rectangle will be resized to completely fill
the destination rectangle, and all other flags are ignored.
*/
stretchToFit = 64,
//==============================================================================
/** If this flag is set, then the source rectangle will be resized so that it is the
minimum size to completely fill the destination rectangle, without changing its
aspect ratio. This means that some of the source rectangle may fall outside
the destination.
If this flag is not set, the source will be given the maximum size at which none
of it falls outside the destination rectangle.
*/
fillDestination = 128,
/** Indicates that the source rectangle can be reduced in size if required, but should
never be made larger than its original size.
*/
onlyReduceInSize = 256,
/** Indicates that the source rectangle can be enlarged if required, but should
never be made smaller than its original size.
*/
onlyIncreaseInSize = 512,
/** Indicates that the source rectangle's size should be left unchanged.
*/
doNotResize = (onlyIncreaseInSize | onlyReduceInSize),
//==============================================================================
/** A shorthand value that is equivalent to (xMid | yMid). */
centred = 4 + 32
};
//==============================================================================
/** Returns the raw flags that are set for this object. */
inline int getFlags() const noexcept { return flags; }
/** Tests a set of flags for this object.
@returns true if any of the flags passed in are set on this object.
*/
inline bool testFlags (int flagsToTest) const noexcept { return (flags & flagsToTest) != 0; }
//==============================================================================
/** Adjusts the position and size of a rectangle to fit it into a space.
The source rectangle coordinates will be adjusted so that they fit into
the destination rectangle based on this object's flags.
*/
void applyTo (double& sourceX,
double& sourceY,
double& sourceW,
double& sourceH,
double destinationX,
double destinationY,
double destinationW,
double destinationH) const noexcept;
/** Returns the rectangle that should be used to fit the given source rectangle
into the destination rectangle using the current flags.
*/
template <typename ValueType>
Rectangle<ValueType> appliedTo (const Rectangle<ValueType>& source,
const Rectangle<ValueType>& destination) const noexcept
{
double x = source.getX(), y = source.getY(), w = source.getWidth(), h = source.getHeight();
applyTo (x, y, w, h, static_cast<double> (destination.getX()), static_cast<double> (destination.getY()),
static_cast<double> (destination.getWidth()), static_cast<double> (destination.getHeight()));
return Rectangle<ValueType> (static_cast<ValueType> (x), static_cast<ValueType> (y),
static_cast<ValueType> (w), static_cast<ValueType> (h));
}
/** Returns the transform that should be applied to these source coordinates to fit them
into the destination rectangle using the current flags.
*/
AffineTransform getTransformToFit (const Rectangle<float>& source,
const Rectangle<float>& destination) const noexcept;
private:
//==============================================================================
int flags { centred };
};
} // namespace juce