Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
getdunne committed Oct 4, 2023
2 parents 8fe048c + 5e1865c commit d62fdf6
Show file tree
Hide file tree
Showing 603 changed files with 5,910 additions and 4,052 deletions.
22 changes: 22 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Checks: >
-clang-analyzer-cplusplus.NewDeleteLeaks,
-clang-analyzer-optin.performance.Padding,
-clang-analyzer-security.FloatLoopCounter,
-clang-analyzer-security.insecureAPI.strcpy,
WarningsAsErrors: '*'

# No negative lookahead available here, which makes things difficult.
#
# We want checks to run on JUCE files included from the JUCE modules. We can
# restrict these to files named `juce_.*`.
#
# We also want checks to run on any files inlcuded from the examples or extras
# directories. However, some include paths generated by the Android Studio build
# system look like:
#
# ~/JUCE/examples/DemoRunner/Builds/Android/app/../../../../../modules/juce_box2d/box2d/Collision/b2CollideEdge.cpp
#
# Since we can only opt-in to paths, we restrict the maximum depth of the path
# past examples/extras.
HeaderFilterRegex: '(.*\/modules\/juce_.*juce_[^\/]*$)|(\/(examples|extras)(\/[^\/]*){1,7}$)'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ extras/Projucer/JUCECompileEngine.dylib
/build

CMakeUserPresets.json
.editorconfig

2 changes: 1 addition & 1 deletion docs/CMake API.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ attributes directly to these creation functions, rather than adding them later.

`VST2_CATEGORY`
- Should be one of: `kPlugCategUnknown`, `kPlugCategEffect`, `kPlugCategSynth`,
`kPlugCategAnalysis`, `kPlugCategMatering`, `kPlugCategSpacializer`, `kPlugCategRoomFx`,
`kPlugCategAnalysis`, `kPlugCategMastering`, `kPlugCategSpacializer`, `kPlugCategRoomFx`,
`kPlugSurroundFx`, `kPlugCategRestoration`, `kPlugCategOfflineProcess`, `kPlugCategShell`,
`kPlugCategGenerator`.

Expand Down
4 changes: 2 additions & 2 deletions examples/Assets/AudioLiveScrollingDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
/* This component scrolls a continuous waveform showing the audio that's
coming into whatever audio inputs this object is connected to.
*/
class LiveScrollingAudioDisplay : public AudioVisualiserComponent,
public AudioIODeviceCallback
class LiveScrollingAudioDisplay final : public AudioVisualiserComponent,
public AudioIODeviceCallback
{
public:
LiveScrollingAudioDisplay() : AudioVisualiserComponent (1)
Expand Down
46 changes: 23 additions & 23 deletions examples/Assets/DSPDemos_Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct DSPDemoParameterBase : public ChangeBroadcaster
};

//==============================================================================
struct SliderParameter : public DSPDemoParameterBase
struct SliderParameter final : public DSPDemoParameterBase
{
SliderParameter (Range<double> range, double skew, double initialValue,
const String& labelName, const String& suffix = {})
Expand Down Expand Up @@ -66,7 +66,7 @@ struct SliderParameter : public DSPDemoParameterBase
};

//==============================================================================
struct ChoiceParameter : public DSPDemoParameterBase
struct ChoiceParameter final : public DSPDemoParameterBase
{
ChoiceParameter (const StringArray& options, int initialId, const String& labelName)
: DSPDemoParameterBase (labelName)
Expand All @@ -89,11 +89,11 @@ struct ChoiceParameter : public DSPDemoParameterBase
};

//==============================================================================
class AudioThumbnailComponent : public Component,
public FileDragAndDropTarget,
public ChangeBroadcaster,
private ChangeListener,
private Timer
class AudioThumbnailComponent final : public Component,
public FileDragAndDropTarget,
public ChangeBroadcaster,
private ChangeListener,
private Timer
{
public:
AudioThumbnailComponent (AudioDeviceManager& adm, AudioFormatManager& afm)
Expand Down Expand Up @@ -217,7 +217,7 @@ class AudioThumbnailComponent : public Component,
};

//==============================================================================
class DemoParametersComponent : public Component
class DemoParametersComponent final : public Component
{
public:
DemoParametersComponent (const std::vector<DSPDemoParameterBase*>& demoParams)
Expand Down Expand Up @@ -270,9 +270,9 @@ class DemoParametersComponent : public Component

//==============================================================================
template <class DemoType>
struct DSPDemo : public AudioSource,
public ProcessorWrapper<DemoType>,
private ChangeListener
struct DSPDemo final : public AudioSource,
public ProcessorWrapper<DemoType>,
private ChangeListener
{
DSPDemo (AudioSource& input)
: inputSource (&input)
Expand Down Expand Up @@ -327,10 +327,10 @@ struct DSPDemo : public AudioSource,

//==============================================================================
template <class DemoType>
class AudioFileReaderComponent : public Component,
private TimeSliceThread,
private Value::Listener,
private ChangeListener
class AudioFileReaderComponent final : public Component,
private TimeSliceThread,
private Value::Listener,
private ChangeListener
{
public:
//==============================================================================
Expand Down Expand Up @@ -379,7 +379,7 @@ class AudioFileReaderComponent : public Component,

r.removeFromTop (20);

if (parametersComponent.get() != nullptr)
if (parametersComponent != nullptr)
parametersComponent->setBounds (r.removeFromTop (parametersComponent->getHeightNeeded()).reduced (20, 0));
}

Expand Down Expand Up @@ -443,7 +443,7 @@ class AudioFileReaderComponent : public Component,
transportSource.reset (new AudioTransportSource());
transportSource->addChangeListener (this);

if (readerSource.get() != nullptr)
if (readerSource != nullptr)
{
if (auto* device = audioDeviceManager.getCurrentAudioDevice())
{
Expand Down Expand Up @@ -475,7 +475,7 @@ class AudioFileReaderComponent : public Component,

void play()
{
if (readerSource.get() == nullptr)
if (readerSource == nullptr)
return;

if (transportSource->getCurrentPosition() >= transportSource->getLengthInSeconds()
Expand All @@ -488,17 +488,17 @@ class AudioFileReaderComponent : public Component,

void setLooping (bool shouldLoop)
{
if (readerSource.get() != nullptr)
if (readerSource != nullptr)
readerSource->setLooping (shouldLoop);
}

AudioThumbnailComponent& getThumbnailComponent() { return header.thumbnailComp; }

private:
//==============================================================================
class AudioPlayerHeader : public Component,
private ChangeListener,
private Value::Listener
class AudioPlayerHeader final : public Component,
private ChangeListener,
private Value::Listener
{
public:
AudioPlayerHeader (AudioDeviceManager& adm,
Expand Down Expand Up @@ -633,7 +633,7 @@ class AudioFileReaderComponent : public Component,
//==============================================================================
void valueChanged (Value& v) override
{
if (readerSource.get() != nullptr)
if (readerSource != nullptr)
readerSource->setLooping (v.getValue());
}

Expand Down
11 changes: 4 additions & 7 deletions examples/Assets/DemoUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,7 @@ inline Path getJUCELogoPath()
// 0.0 and 1.0 at a random speed
struct BouncingNumber
{
BouncingNumber()
: speed (0.0004 + 0.0007 * Random::getSystemRandom().nextDouble()),
phase (Random::getSystemRandom().nextDouble())
{
}
virtual ~BouncingNumber() = default;

float getValue() const
{
Expand All @@ -231,10 +227,11 @@ struct BouncingNumber
}

protected:
double speed, phase;
double speed = 0.0004 + 0.0007 * Random::getSystemRandom().nextDouble(),
phase = Random::getSystemRandom().nextDouble();
};

struct SlowerBouncingNumber : public BouncingNumber
struct SlowerBouncingNumber final : public BouncingNumber
{
SlowerBouncingNumber()
{
Expand Down
2 changes: 1 addition & 1 deletion examples/Audio/AudioAppDemo.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


//==============================================================================
class AudioAppDemo : public AudioAppComponent
class AudioAppDemo final : public AudioAppComponent
{
public:
//==============================================================================
Expand Down
6 changes: 3 additions & 3 deletions examples/Audio/AudioLatencyDemo.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
#include "../Assets/AudioLiveScrollingDisplay.h"

//==============================================================================
class LatencyTester : public AudioIODeviceCallback,
private Timer
class LatencyTester final : public AudioIODeviceCallback,
private Timer
{
public:
LatencyTester (TextEditor& editorBox)
Expand Down Expand Up @@ -304,7 +304,7 @@ class LatencyTester : public AudioIODeviceCallback,
};

//==============================================================================
class AudioLatencyDemo : public Component
class AudioLatencyDemo final : public Component
{
public:
AudioLatencyDemo()
Expand Down
26 changes: 13 additions & 13 deletions examples/Audio/AudioPlaybackDemo.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@

#include "../Assets/DemoUtilities.h"

class DemoThumbnailComp : public Component,
public ChangeListener,
public FileDragAndDropTarget,
public ChangeBroadcaster,
private ScrollBar::Listener,
private Timer
class DemoThumbnailComp final : public Component,
public ChangeListener,
public FileDragAndDropTarget,
public ChangeBroadcaster,
private ScrollBar::Listener,
private Timer
{
public:
DemoThumbnailComp (AudioFormatManager& formatManager,
Expand Down Expand Up @@ -251,13 +251,13 @@ class DemoThumbnailComp : public Component,
};

//==============================================================================
class AudioPlaybackDemo : public Component,
#if (JUCE_ANDROID || JUCE_IOS)
private Button::Listener,
#else
private FileBrowserListener,
#endif
private ChangeListener
class AudioPlaybackDemo final : public Component,
#if (JUCE_ANDROID || JUCE_IOS)
private Button::Listener,
#else
private FileBrowserListener,
#endif
private ChangeListener
{
public:
AudioPlaybackDemo()
Expand Down
8 changes: 4 additions & 4 deletions examples/Audio/AudioRecordingDemo.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/** A simple class that acts as an AudioIODeviceCallback and writes the
incoming audio data to a WAV file.
*/
class AudioRecorder : public AudioIODeviceCallback
class AudioRecorder final : public AudioIODeviceCallback
{
public:
AudioRecorder (AudioThumbnail& thumbnailToUpdate)
Expand Down Expand Up @@ -170,8 +170,8 @@ class AudioRecorder : public AudioIODeviceCallback
};

//==============================================================================
class RecordingThumbnail : public Component,
private ChangeListener
class RecordingThumbnail final : public Component,
private ChangeListener
{
public:
RecordingThumbnail()
Expand Down Expand Up @@ -230,7 +230,7 @@ class RecordingThumbnail : public Component,
};

//==============================================================================
class AudioRecordingDemo : public Component
class AudioRecordingDemo final : public Component
{
public:
AudioRecordingDemo()
Expand Down
4 changes: 2 additions & 2 deletions examples/Audio/AudioSettingsDemo.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
#include "../Assets/DemoUtilities.h"

//==============================================================================
class AudioSettingsDemo : public Component,
public ChangeListener
class AudioSettingsDemo final : public Component,
public ChangeListener
{
public:
AudioSettingsDemo()
Expand Down
10 changes: 5 additions & 5 deletions examples/Audio/AudioSynthesiserDemo.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@

//==============================================================================
/** Our demo synth sound is just a basic sine wave.. */
struct SineWaveSound : public SynthesiserSound
struct SineWaveSound final : public SynthesiserSound
{
bool appliesToNote (int /*midiNoteNumber*/) override { return true; }
bool appliesToChannel (int /*midiChannel*/) override { return true; }
};

//==============================================================================
/** Our demo synth voice just plays a sine wave.. */
struct SineWaveVoice : public SynthesiserVoice
struct SineWaveVoice final : public SynthesiserVoice
{
bool canPlaySound (SynthesiserSound* sound) override
{
Expand Down Expand Up @@ -153,7 +153,7 @@ struct SineWaveVoice : public SynthesiserVoice

//==============================================================================
// This is an audio source that streams the output of our demo synth.
struct SynthAudioSource : public AudioSource
struct SynthAudioSource final : public AudioSource
{
SynthAudioSource (MidiKeyboardState& keyState) : keyboardState (keyState)
{
Expand Down Expand Up @@ -238,7 +238,7 @@ struct SynthAudioSource : public AudioSource
};

//==============================================================================
class Callback : public AudioIODeviceCallback
class Callback final : public AudioIODeviceCallback
{
public:
Callback (AudioSourcePlayer& playerIn, LiveScrollingAudioDisplay& displayIn)
Expand Down Expand Up @@ -283,7 +283,7 @@ class Callback : public AudioIODeviceCallback
};

//==============================================================================
class AudioSynthesiserDemo : public Component
class AudioSynthesiserDemo final : public Component
{
public:
AudioSynthesiserDemo()
Expand Down
Loading

0 comments on commit d62fdf6

Please sign in to comment.