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,172 @@
/*
==============================================================================
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
{
#if JUCE_USE_CDBURNER || DOXYGEN
//==============================================================================
/**
@tags{Audio}
*/
class AudioCDBurner : public ChangeBroadcaster
{
public:
//==============================================================================
/** Returns a list of available optical drives.
Use openDevice() to open one of the items from this list.
*/
static StringArray findAvailableDevices();
/** Tries to open one of the optical drives.
The deviceIndex is an index into the array returned by findAvailableDevices().
*/
static AudioCDBurner* openDevice (const int deviceIndex);
/** Destructor. */
~AudioCDBurner();
//==============================================================================
enum DiskState
{
unknown, /**< An error condition, if the device isn't responding. */
trayOpen, /**< The drive is currently open. Note that a slot-loading drive
may seem to be permanently open. */
noDisc, /**< The drive has no disk in it. */
writableDiskPresent, /**< The drive contains a writeable disk. */
readOnlyDiskPresent /**< The drive contains a read-only disk. */
};
/** Returns the current status of the device.
To get informed when the drive's status changes, attach a ChangeListener to
the AudioCDBurner.
*/
DiskState getDiskState() const;
/** Returns true if there's a writable disk in the drive. */
bool isDiskPresent() const;
/** Sends an eject signal to the drive.
The eject will happen asynchronously, so you can use getDiskState() and
waitUntilStateChange() to monitor its progress.
*/
bool openTray();
/** Blocks the current thread until the drive's state changes, or until the timeout expires.
@returns the device's new state
*/
DiskState waitUntilStateChange (int timeOutMilliseconds);
//==============================================================================
/** Returns the set of possible write speeds that the device can handle.
These are as a multiple of 'normal' speed, so e.g. '24x' returns 24, etc.
Note that if there's no media present in the drive, this value may be unavailable!
@see setWriteSpeed, getWriteSpeed
*/
Array<int> getAvailableWriteSpeeds() const;
//==============================================================================
/** Tries to enable or disable buffer underrun safety on devices that support it.
@returns true if it's now enabled. If the device doesn't support it, this
will always return false.
*/
bool setBufferUnderrunProtection (bool shouldBeEnabled);
//==============================================================================
/** Returns the number of free blocks on the disk.
There are 75 blocks per second, at 44100Hz.
*/
int getNumAvailableAudioBlocks() const;
/** Adds a track to be written.
The source passed-in here will be kept by this object, and it will
be used and deleted at some point in the future, either during the
burn() method or when this AudioCDBurner object is deleted. Your caller
method shouldn't keep a reference to it or use it again after passing
it in here.
*/
bool addAudioTrack (AudioSource* source, int numSamples);
//==============================================================================
/** Receives progress callbacks during a cd-burn operation.
@see AudioCDBurner::burn()
*/
class BurnProgressListener
{
public:
BurnProgressListener() noexcept {}
virtual ~BurnProgressListener() {}
/** Called at intervals to report on the progress of the AudioCDBurner.
To cancel the burn, return true from this method.
*/
virtual bool audioCDBurnProgress (float proportionComplete) = 0;
};
/** Runs the burn process.
This method will block until the operation is complete.
@param listener the object to receive callbacks about progress
@param ejectDiscAfterwards whether to eject the disk after the burn completes
@param performFakeBurnForTesting if true, no data will actually be written to the disk
@param writeSpeed one of the write speeds from getAvailableWriteSpeeds(), or
0 or less to mean the fastest speed.
*/
String burn (BurnProgressListener* listener,
bool ejectDiscAfterwards,
bool performFakeBurnForTesting,
int writeSpeed);
/** If a burn operation is currently in progress, this tells it to stop
as soon as possible.
It's also possible to stop the burn process by returning true from
BurnProgressListener::audioCDBurnProgress()
*/
void abortBurn();
private:
//==============================================================================
AudioCDBurner (const int deviceIndex);
class Pimpl;
std::unique_ptr<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioCDBurner)
};
#endif
} // namespace juce

@ -0,0 +1,63 @@
/*
==============================================================================
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
{
#if JUCE_USE_CDREADER
int AudioCDReader::getNumTracks() const
{
return trackStartSamples.size() - 1;
}
int AudioCDReader::getPositionOfTrackStart (int trackNum) const
{
return trackStartSamples [trackNum];
}
const Array<int>& AudioCDReader::getTrackOffsets() const
{
return trackStartSamples;
}
int AudioCDReader::getCDDBId()
{
int checksum = 0;
const int numTracks = getNumTracks();
for (int i = 0; i < numTracks; ++i)
for (int offset = (trackStartSamples.getUnchecked(i) + 88200) / 44100; offset > 0; offset /= 10)
checksum += offset % 10;
const int length = (trackStartSamples.getLast() - trackStartSamples.getFirst()) / 44100;
// CCLLLLTT: checksum, length, tracks
return ((checksum & 0xff) << 24) | (length << 8) | numTracks;
}
#endif
} // namespace juce

@ -0,0 +1,177 @@
/*
==============================================================================
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
{
#if JUCE_USE_CDREADER || DOXYGEN
//==============================================================================
/**
A type of AudioFormatReader that reads from an audio CD.
One of these can be used to read a CD as if it's one big audio stream. Use the
getPositionOfTrackStart() method to find where the individual tracks are
within the stream.
@see AudioFormatReader
@tags{Audio}
*/
class JUCE_API AudioCDReader : public AudioFormatReader
{
public:
//==============================================================================
/** Returns a list of names of Audio CDs currently available for reading.
If there's a CD drive but no CD in it, this might return an empty list, or
possibly a device that can be opened but which has no tracks, depending
on the platform.
@see createReaderForCD
*/
static StringArray getAvailableCDNames();
/** Tries to create an AudioFormatReader that can read from an Audio CD.
@param index the index of one of the available CDs - use getAvailableCDNames()
to find out how many there are.
@returns a new AudioCDReader object, or nullptr if it couldn't be created. The
caller will be responsible for deleting the object returned.
*/
static AudioCDReader* createReaderForCD (const int index);
//==============================================================================
/** Destructor. */
~AudioCDReader() override;
/** Implementation of the AudioFormatReader method. */
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
int64 startSampleInFile, int numSamples) override;
/** Checks whether the CD has been removed from the drive. */
bool isCDStillPresent() const;
/** Returns the total number of tracks (audio + data). */
int getNumTracks() const;
/** Finds the sample offset of the start of a track.
@param trackNum the track number, where trackNum = 0 is the first track
and trackNum = getNumTracks() means the end of the CD.
*/
int getPositionOfTrackStart (int trackNum) const;
/** Returns true if a given track is an audio track.
@param trackNum the track number, where 0 is the first track.
*/
bool isTrackAudio (int trackNum) const;
/** Returns an array of sample offsets for the start of each track, followed by
the sample position of the end of the CD.
*/
const Array<int>& getTrackOffsets() const;
/** Refreshes the object's table of contents.
If the disc has been ejected and a different one put in since this
object was created, this will cause it to update its idea of how many tracks
there are, etc.
*/
void refreshTrackLengths();
/** Enables scanning for indexes within tracks.
@see getLastIndex
*/
void enableIndexScanning (bool enabled);
/** Returns the index number found during the last read() call.
Index scanning is turned off by default - turn it on with enableIndexScanning().
Then when the read() method is called, if it comes across an index within that
block, the index number is stored and returned by this method.
Some devices might not support indexes, of course.
(If you don't know what CD indexes are, it's unlikely you'll ever need them).
@see enableIndexScanning
*/
int getLastIndex() const;
/** Scans a track to find the position of any indexes within it.
@param trackNumber the track to look in, where 0 is the first track on the disc
@returns an array of sample positions of any index points found (not including
the index that marks the start of the track)
*/
Array<int> findIndexesInTrack (const int trackNumber);
/** Returns the CDDB id number for the CD.
It's not a great way of identifying a disc, but it's traditional.
*/
int getCDDBId();
/** Tries to eject the disk.
Ejecting the disk might not actually be possible, e.g. if some other process is using it.
*/
void ejectDisk();
//==============================================================================
enum
{
framesPerSecond = 75,
samplesPerFrame = 44100 / framesPerSecond
};
private:
//==============================================================================
Array<int> trackStartSamples;
#if JUCE_MAC
File volumeDir;
Array<File> tracks;
int currentReaderTrack;
std::unique_ptr<AudioFormatReader> reader;
AudioCDReader (const File& volume);
#elif JUCE_WINDOWS
bool audioTracks [100];
void* handle;
MemoryBlock buffer;
bool indexingEnabled;
int lastIndex, firstFrameInBuffer, samplesInBuffer;
AudioCDReader (void* handle);
int getIndexAt (int samplePos);
#elif JUCE_LINUX || JUCE_BSD
AudioCDReader();
#endif
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioCDReader)
};
#endif
} // namespace juce