1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Add final specifiers in implementation files

This commit is contained in:
Tom Poole 2023-10-06 13:08:34 +01:00
parent aee5a3a45e
commit 6bf9bb9a2e
315 changed files with 1031 additions and 1025 deletions

View file

@ -148,7 +148,7 @@ public:
{
transportSource = newSource;
struct ResetCallback : public CallbackMessage
struct ResetCallback final : public CallbackMessage
{
ResetCallback (AudioThumbnailComponent& o) : owner (o) {}
void messageCallback() override { owner.reset(); }

View file

@ -233,7 +233,7 @@ public:
private:
//==============================================================================
struct MidiDeviceListBox : private ListBoxModel,
struct MidiDeviceListBox final : private ListBoxModel,
public ListBox
{
MidiDeviceListBox (const String& name,

View file

@ -1,7 +1,7 @@
#include "MainComponent.h"
//==============================================================================
class GuiAppApplication : public juce::JUCEApplication
class GuiAppApplication final : public juce::JUCEApplication
{
public:
//==============================================================================
@ -51,7 +51,7 @@ public:
This class implements the desktop window that contains an instance of
our MainComponent class.
*/
class MainWindow : public juce::DocumentWindow
class MainWindow final : public juce::DocumentWindow
{
public:
explicit MainWindow (juce::String name)

View file

@ -148,7 +148,7 @@ public:
{
transportSource = newSource;
struct ResetCallback : public CallbackMessage
struct ResetCallback final : public CallbackMessage
{
ResetCallback (AudioThumbnailComponent& o) : owner (o) {}
void messageCallback() override { owner.reset(); }

View file

@ -27,7 +27,7 @@
//==============================================================================
class IntroScreen : public Component
class IntroScreen final : public Component
{
public:
IntroScreen()
@ -70,7 +70,7 @@ private:
HyperlinkButton linkButton { "www.juce.com", { "http://www.juce.com" } };
//==============================================================================
struct LogoDrawComponent : public Component,
struct LogoDrawComponent final : public Component,
private Timer
{
LogoDrawComponent()

View file

@ -28,7 +28,7 @@
#include "MainComponent.h"
//==============================================================================
struct DemoContent : public Component
struct DemoContent final : public Component
{
DemoContent() noexcept {}
@ -58,7 +58,7 @@ private:
//==============================================================================
#if ! (JUCE_ANDROID || JUCE_IOS)
struct CodeContent : public Component
struct CodeContent final : public Component
{
CodeContent()
{

View file

@ -32,7 +32,7 @@ struct DemoContent;
struct CodeContent;
//==============================================================================
class DemoContentComponent : public TabbedComponent
class DemoContentComponent final : public TabbedComponent
{
public:
DemoContentComponent (Component& mainComponent, std::function<void (bool)> demoChangedCallback);

View file

@ -26,7 +26,7 @@
#include "MainComponent.h"
//==============================================================================
struct SidePanelHeader : public Component
struct SidePanelHeader final : public Component
{
SidePanelHeader (MainComponent& o)
: owner (o)
@ -132,7 +132,7 @@ struct SidePanelHeader : public Component
};
//==============================================================================
class DemoList : public Component,
class DemoList final : public Component,
public ListBoxModel
{
public:
@ -214,7 +214,7 @@ public:
private:
//==============================================================================
class CategoryListHeaderComponent : public Button
class CategoryListHeaderComponent final : public Button
{
public:
explicit CategoryListHeaderComponent (DemoList& o)

View file

@ -29,7 +29,7 @@
#include "DemoContentComponent.h"
//==============================================================================
class MainComponent : public Component
class MainComponent final : public Component
{
public:
//==============================================================================

View file

@ -28,7 +28,7 @@
#include "MainComponent.h"
//==============================================================================
class SettingsContent : public Component
class SettingsContent final : public Component
{
public:
SettingsContent (MainComponent& topLevelComponent)
@ -67,7 +67,7 @@ private:
static constexpr int itemHeight = 30;
static constexpr int itemSpacing = 7;
class GraphicsSettingsGroup : public Component,
class GraphicsSettingsGroup final : public Component,
private ComponentMovementWatcher
{
public:
@ -179,7 +179,7 @@ private:
OwnedArray<LookAndFeel> lookAndFeels;
};
class AudioSettingsGroup : public Component
class AudioSettingsGroup final : public Component
{
public:
AudioSettingsGroup()
@ -211,7 +211,7 @@ private:
};
//==============================================================================
class InnerContent : public Component
class InnerContent final : public Component
{
public:
InnerContent (MainComponent& mainComponent)

View file

@ -339,7 +339,7 @@ private:
{
RootItem()
{
struct Item : public TreeViewItem
struct Item final : public TreeViewItem
{
Item (int index, int depth, int numSubItems)
: textToDisplay ("Item " + String (index)
@ -511,7 +511,7 @@ private:
and accessibility clients. This derived class represents the properties
set via the demo UI.
*/
struct CustomAccessibilityHandler : public AccessibilityHandler
struct CustomAccessibilityHandler final : public AccessibilityHandler
{
explicit CustomAccessibilityHandler (CustomWidgetComponent& comp)
: AccessibilityHandler (comp.accessibleComponent,
@ -821,7 +821,7 @@ private:
std::unique_ptr<AccessibilityValueInterface> getValueInterface()
{
struct Numeric : public AccessibilityNumericValueInterface
struct Numeric final : public AccessibilityNumericValueInterface
{
explicit Numeric (ValueInterfaceComponent& o)
: owner (o)
@ -835,7 +835,7 @@ private:
ValueInterfaceComponent& owner;
};
struct Ranged : public AccessibilityRangedNumericValueInterface
struct Ranged final : public AccessibilityRangedNumericValueInterface
{
explicit Ranged (ValueInterfaceComponent& o)
: owner (o)
@ -857,7 +857,7 @@ private:
ValueInterfaceComponent& owner;
};
struct Text : public AccessibilityTextValueInterface
struct Text final : public AccessibilityTextValueInterface
{
explicit Text (ValueInterfaceComponent& o)
: owner (o)

View file

@ -98,7 +98,7 @@ public:
private:
std::unique_ptr<Component> content;
struct CornerDragger : public Component
struct CornerDragger final : public Component
{
CornerDragger()
{

View file

@ -646,7 +646,7 @@ struct OpenGLUtils
String name;
};
struct DynamicTexture : public DemoTexture
struct DynamicTexture final : public DemoTexture
{
DynamicTexture() { name = "Dynamically-generated texture"; }
@ -693,7 +693,7 @@ struct OpenGLUtils
return image;
}
struct BuiltInTexture : public DemoTexture
struct BuiltInTexture final : public DemoTexture
{
BuiltInTexture (const char* nm, const void* imageData, size_t imageSize)
: image (resizeImageToPowerOfTwo (ImageFileFormat::loadFrom (imageData, imageSize)))
@ -710,7 +710,7 @@ struct OpenGLUtils
}
};
struct TextureFromFile : public DemoTexture
struct TextureFromFile final : public DemoTexture
{
TextureFromFile (const File& file)
{
@ -727,7 +727,7 @@ struct OpenGLUtils
}
};
struct TextureFromAsset : public DemoTexture
struct TextureFromAsset final : public DemoTexture
{
TextureFromAsset (const char* assetName)
{
@ -749,7 +749,7 @@ struct OpenGLUtils
/** This is the main demo component - the GL context gets attached to it, and
it implements the OpenGLRenderer callback so that it can do real GL work.
*/
class OpenGLDemo : public Component,
class OpenGLDemo final : public Component,
private OpenGLRenderer,
private AsyncUpdater
{
@ -982,7 +982,7 @@ private:
This component sits on top of the main GL demo, and contains all the sliders
and widgets that control things.
*/
class DemoControlsOverlay : public Component,
class DemoControlsOverlay final : public Component,
private CodeDocument::Listener,
private Slider::Listener,
private Timer

View file

@ -611,7 +611,7 @@ struct MenuPage final : public Component
addAndMakeVisible (customItemButton);
customItemButton.onClick = [&]
{
struct CustomComponent : public PopupMenu::CustomComponent
struct CustomComponent final : public PopupMenu::CustomComponent
{
CustomComponent (int widthIn, int heightIn, Colour backgroundIn)
: PopupMenu::CustomComponent (false),
@ -925,7 +925,7 @@ private:
// Demonstrates how to put a custom component into a toolbar - this one contains
// a ComboBox.
class CustomToolbarComboBox : public ToolbarItemComponent
class CustomToolbarComboBox final : public ToolbarItemComponent
{
public:
CustomToolbarComboBox (const int toolbarItemId)
@ -1161,7 +1161,7 @@ private:
//==============================================================================
// This is a custom Label component, which we use for the table's editable text columns.
class EditableTextCustomComponent : public Label
class EditableTextCustomComponent final : public Label
{
public:
EditableTextCustomComponent (TableDemoComponent& td) : owner (td)
@ -1209,7 +1209,7 @@ private:
//==============================================================================
// This is a custom component containing a combo box, which we're going to put inside
// our table's "rating" column.
class RatingColumnCustomComponent : public Component
class RatingColumnCustomComponent final : public Component
{
public:
RatingColumnCustomComponent (TableDemoComponent& td) : owner (td)
@ -1328,7 +1328,7 @@ public:
private:
//==============================================================================
struct SourceItemListboxContents : public ListBoxModel
struct SourceItemListboxContents final : public ListBoxModel
{
// The following methods implement the necessary virtual functions from ListBoxModel,
// telling the listbox how many rows there are, painting them, etc.
@ -1366,7 +1366,7 @@ private:
//==============================================================================
// and this is a component that can have things dropped onto it..
class DragAndDropDemoTarget : public Component,
class DragAndDropDemoTarget final : public Component,
public DragAndDropTarget,
public FileDragAndDropTarget,
public TextDragAndDropTarget
@ -1530,7 +1530,7 @@ struct DemoTabbedComponent final : public TabbedComponent
// This is a small star button that is put inside one of the tabs. You can
// use this technique to create things like "close tab" buttons, etc.
class CustomTabButton : public Component
class CustomTabButton final : public Component
{
public:
CustomTabButton (bool isRunningComponenTransformsDemo)

View file

@ -442,7 +442,7 @@ private:
}), true);
}
class AlertWindowCustomComponent : public Component,
class AlertWindowCustomComponent final : public Component,
private Slider::Listener
{
public:

View file

@ -1705,7 +1705,7 @@ private:
}
private:
struct ComboWithItems : public ComboBox
struct ComboWithItems final : public ComboBox
{
explicit ComboWithItems (RangedAudioParameter& param)
{

View file

@ -231,7 +231,7 @@ private:
TextEditor testResultsBox;
struct LogMessage : public Message
struct LogMessage final : public Message
{
LogMessage (const String& m) : message (m) {}
@ -343,7 +343,7 @@ inline bool invokeChildProcessDemo (const String& commandLine)
void shutdown() override { mainWindow = nullptr; }
private:
class MainWindow : public DocumentWindow
class MainWindow final : public DocumentWindow
{
public:
MainWindow (const String& name, std::unique_ptr<Component> c)

View file

@ -1087,7 +1087,7 @@ private:
#endif
}
struct ParamsView : public Component
struct ParamsView final : public Component
{
ParamsView()
{

View file

@ -27,7 +27,7 @@
#include "MainComponent.h"
//==============================================================================
class AudioPerformanceTestApplication : public JUCEApplication
class AudioPerformanceTestApplication final : public JUCEApplication
{
public:
//==============================================================================
@ -55,7 +55,7 @@ public:
}
//==============================================================================
class MainWindow : public DocumentWindow
class MainWindow final : public DocumentWindow
{
public:
explicit MainWindow (String name)

View file

@ -148,7 +148,7 @@ public:
{
transportSource = newSource;
struct ResetCallback : public CallbackMessage
struct ResetCallback final : public CallbackMessage
{
ResetCallback (AudioThumbnailComponent& o) : owner (o) {}
void messageCallback() override { owner.reset(); }

View file

@ -224,7 +224,7 @@ public:
private:
//==============================================================================
struct SineWaveSound : public SynthesiserSound
struct SineWaveSound final : public SynthesiserSound
{
SineWaveSound() = default;
@ -232,7 +232,7 @@ private:
bool appliesToChannel (int /*midiChannel*/) override { return true; }
};
struct SineWaveVoice : public SynthesiserVoice
struct SineWaveVoice final : public SynthesiserVoice
{
SineWaveVoice() = default;

View file

@ -70,7 +70,7 @@
return scanner->scanNextFile (true, pluginBeingScanned);
}
struct ScanJob : public ThreadPoolJob
struct ScanJob final : public ThreadPoolJob
{
ScanJob (AUScanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {}

View file

@ -397,7 +397,7 @@ void MainHostWindow::closeButtonPressed()
tryToQuitApplication();
}
struct AsyncQuitRetrier : private Timer
struct AsyncQuitRetrier final : private Timer
{
AsyncQuitRetrier() { startTimer (500); }

View file

@ -197,7 +197,7 @@ namespace juce::build_tools
};
//==============================================================================
struct ProjectType_GUIApp : public ProjectType
struct ProjectType_GUIApp final : public ProjectType
{
ProjectType_GUIApp() : ProjectType (getTypeName(), "GUI Application") {}
@ -206,7 +206,7 @@ namespace juce::build_tools
bool supportsTargetType (Target::Type targetType) const override { return (targetType == Target::GUIApp); }
};
struct ProjectType_ConsoleApp : public ProjectType
struct ProjectType_ConsoleApp final : public ProjectType
{
ProjectType_ConsoleApp() : ProjectType (getTypeName(), "Console Application") {}
@ -215,7 +215,7 @@ namespace juce::build_tools
bool supportsTargetType (Target::Type targetType) const override { return (targetType == Target::ConsoleApp); }
};
struct ProjectType_StaticLibrary : public ProjectType
struct ProjectType_StaticLibrary final : public ProjectType
{
ProjectType_StaticLibrary() : ProjectType (getTypeName(), "Static Library") {}
@ -233,7 +233,7 @@ namespace juce::build_tools
bool supportsTargetType (Target::Type targetType) const override { return (targetType == Target::DynamicLibrary); }
};
struct ProjectType_AudioPlugin : public ProjectType
struct ProjectType_AudioPlugin final : public ProjectType
{
ProjectType_AudioPlugin() : ProjectType (getTypeName(), "Audio Plug-in") {}
@ -270,7 +270,7 @@ namespace juce::build_tools
}
};
struct ProjectType_ARAAudioPlugin : public ProjectType
struct ProjectType_ARAAudioPlugin final : public ProjectType
{
ProjectType_ARAAudioPlugin() : ProjectType (getTypeName(), "ARA Audio Plug-in") {}

View file

@ -96,7 +96,7 @@ private:
canvasStateOSCMessageReceived (message);
}
struct NewStateMessage : public Message
struct NewStateMessage final : public Message
{
NewStateMessage (const MemoryBlock& d) : data (d) {}
MemoryBlock data;

View file

@ -64,7 +64,7 @@ struct GridLines final : public AnimatedContent
};
//==============================================================================
struct BackgroundLogo : public AnimatedContent
struct BackgroundLogo final : public AnimatedContent
{
BackgroundLogo()
{

View file

@ -199,7 +199,7 @@ void ProjucerApplication::shutdown()
deleteLogger();
}
struct AsyncQuitRetrier : private Timer
struct AsyncQuitRetrier final : private Timer
{
AsyncQuitRetrier() { startTimer (500); }

View file

@ -167,7 +167,7 @@ private:
//==============================================================================
#if JUCE_MAC
class AppleMenuRebuildListener : private MenuBarModel::Listener
class AppleMenuRebuildListener final : private MenuBarModel::Listener
{
public:
AppleMenuRebuildListener()

View file

@ -148,7 +148,7 @@ void ThreadedAnalyticsDestination::EventDispatcher::addToQueue (const AnalyticsE
namespace DestinationTestHelpers
{
//==============================================================================
struct BasicDestination : public ThreadedAnalyticsDestination
struct BasicDestination final : public ThreadedAnalyticsDestination
{
BasicDestination (std::deque<AnalyticsEvent>& loggedEvents,
std::deque<AnalyticsEvent>& unloggedEvents)
@ -211,7 +211,7 @@ namespace DestinationTestHelpers
}
//==============================================================================
struct ThreadedAnalyticsDestinationTests : public UnitTest
struct ThreadedAnalyticsDestinationTests final : public UnitTest
{
ThreadedAnalyticsDestinationTests()
: UnitTest ("ThreadedAnalyticsDestination", UnitTestCategories::analytics)

View file

@ -750,7 +750,7 @@ int AudioChannelSet::getAmbisonicOrderForNumChannels (int numChannels, int maxOr
//==============================================================================
#if JUCE_UNIT_TESTS
class AudioChannelSetUnitTest : public UnitTest
class AudioChannelSetUnitTest final : public UnitTest
{
public:
AudioChannelSetUnitTest()

View file

@ -454,7 +454,7 @@ void AudioDataConverters::deinterleaveSamples (const float* source, float** dest
//==============================================================================
#if JUCE_UNIT_TESTS
class AudioConversionTests : public UnitTest
class AudioConversionTests final : public UnitTest
{
public:
AudioConversionTests()

View file

@ -1555,7 +1555,7 @@ ScopedNoDenormals::~ScopedNoDenormals() noexcept
//==============================================================================
#if JUCE_UNIT_TESTS
class FloatVectorOperationsTests : public UnitTest
class FloatVectorOperationsTests final : public UnitTest
{
public:
FloatVectorOperationsTests()

View file

@ -252,7 +252,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE
//==============================================================================
#if JUCE_UNIT_TESTS
struct MidiBufferTest : public UnitTest
struct MidiBufferTest final : public UnitTest
{
MidiBufferTest()
: UnitTest ("MidiBuffer", UnitTestCategories::midi)

View file

@ -33,7 +33,7 @@ namespace juce
@tags{Audio}
*/
struct MidiMessageMetadata final
struct MidiMessageMetadata
{
MidiMessageMetadata() noexcept = default;

View file

@ -530,7 +530,7 @@ bool MidiFile::writeTrack (OutputStream& mainOut, const MidiMessageSequence& ms)
//==============================================================================
#if JUCE_UNIT_TESTS
struct MidiFileTest : public UnitTest
struct MidiFileTest final : public UnitTest
{
MidiFileTest()
: UnitTest ("MidiFile", UnitTestCategories::midi)

View file

@ -1164,7 +1164,7 @@ const char* MidiMessage::getControllerName (const int n)
//==============================================================================
#if JUCE_UNIT_TESTS
struct MidiMessageTest : public UnitTest
struct MidiMessageTest final : public UnitTest
{
MidiMessageTest()
: UnitTest ("MidiMessage", UnitTestCategories::midi)

View file

@ -477,7 +477,7 @@ void MidiMessageSequence::createControllerUpdatesForTime (int channel, double ti
//==============================================================================
#if JUCE_UNIT_TESTS
struct MidiMessageSequenceTest : public UnitTest
struct MidiMessageSequenceTest final : public UnitTest
{
MidiMessageSequenceTest()
: UnitTest ("MidiMessageSequence", UnitTestCategories::midi)

View file

@ -158,7 +158,7 @@ MidiBuffer MidiRPNGenerator::generate (int midiChannel,
//==============================================================================
#if JUCE_UNIT_TESTS
class MidiRPNDetectorTests : public UnitTest
class MidiRPNDetectorTests final : public UnitTest
{
public:
MidiRPNDetectorTests()
@ -364,7 +364,7 @@ public:
static MidiRPNDetectorTests MidiRPNDetectorUnitTests;
//==============================================================================
class MidiRPNGeneratorTests : public UnitTest
class MidiRPNGeneratorTests final : public UnitTest
{
public:
MidiRPNGeneratorTests()

View file

@ -28,7 +28,7 @@ constexpr uint16_t operator""_u16 (unsigned long long int i) { return static_cas
constexpr uint32_t operator""_u32 (unsigned long long int i) { return static_cast<uint32_t> (i); }
constexpr uint64_t operator""_u64 (unsigned long long int i) { return static_cast<uint64_t> (i); }
class UniversalMidiPacketTests : public UnitTest
class UniversalMidiPacketTests final : public UnitTest
{
public:
UniversalMidiPacketTests()

View file

@ -866,7 +866,7 @@ void MPEInstrument::Listener::zoneLayoutChanged()
//==============================================================================
#if JUCE_UNIT_TESTS
class MPEInstrumentTests : public UnitTest
class MPEInstrumentTests final : public UnitTest
{
public:
MPEInstrumentTests()
@ -2201,7 +2201,7 @@ private:
/* This mock class is used for unit testing whether the methods of
MPEInstrument are called correctly.
*/
class UnitTestInstrument : public MPEInstrument,
class UnitTestInstrument final : public MPEInstrument,
private MPEInstrument::Listener
{
using Base = MPEInstrument;

View file

@ -111,7 +111,7 @@ MidiBuffer MPEMessages::setZoneLayout (MPEZoneLayout layout)
//==============================================================================
#if JUCE_UNIT_TESTS
class MPEMessagesTests : public UnitTest
class MPEMessagesTests final : public UnitTest
{
public:
MPEMessagesTests()

View file

@ -89,7 +89,7 @@ bool MPENote::operator!= (const MPENote& other) const noexcept
//==============================================================================
#if JUCE_UNIT_TESTS
class MPENoteTests : public UnitTest
class MPENoteTests final : public UnitTest
{
public:
MPENoteTests()

View file

@ -164,7 +164,7 @@ void MPESynthesiserBase::setMinimumRenderingSubdivisionSize (int numSamples, boo
namespace
{
class MpeSynthesiserBaseTests : public UnitTest
class MpeSynthesiserBaseTests final : public UnitTest
{
enum class CallbackKind { process, midi };
@ -190,7 +190,7 @@ namespace
std::vector<CallbackKind> order;
};
class MockSynthesiser : public MPESynthesiserBase
class MockSynthesiser final : public MPESynthesiserBase
{
public:
Events events;

View file

@ -284,7 +284,7 @@ void MPEChannelRemapper::zeroArrays()
//==============================================================================
#if JUCE_UNIT_TESTS
struct MPEUtilsUnitTests : public UnitTest
struct MPEUtilsUnitTests final : public UnitTest
{
MPEUtilsUnitTests()
: UnitTest ("MPE Utilities", UnitTestCategories::midi)

View file

@ -99,7 +99,7 @@ bool MPEValue::operator!= (const MPEValue& other) const noexcept
//==============================================================================
#if JUCE_UNIT_TESTS
class MPEValueTests : public UnitTest
class MPEValueTests final : public UnitTest
{
public:
MPEValueTests()

View file

@ -213,7 +213,7 @@ void MPEZoneLayout::checkAndLimitZoneParameters (int minValue, int maxValue,
//==============================================================================
#if JUCE_UNIT_TESTS
class MPEZoneLayoutTests : public UnitTest
class MPEZoneLayoutTests final : public UnitTest
{
public:
MPEZoneLayoutTests()

View file

@ -108,7 +108,7 @@ void MemoryAudioSource::setLooping (bool shouldLoop)
//==============================================================================
#if JUCE_UNIT_TESTS
struct MemoryAudioSourceTests : public UnitTest
struct MemoryAudioSourceTests final : public UnitTest
{
MemoryAudioSourceTests() : UnitTest ("MemoryAudioSource", UnitTestCategories::audio) {}

View file

@ -23,7 +23,7 @@
namespace juce
{
struct ADSRTests : public UnitTest
struct ADSRTests final : public UnitTest
{
ADSRTests() : UnitTest ("ADSR", UnitTestCategories::audio) {}

View file

@ -25,7 +25,7 @@ namespace juce
#if JUCE_UNIT_TESTS
class InterpolatorTests : public UnitTest
class InterpolatorTests final : public UnitTest
{
public:
InterpolatorTests()

View file

@ -28,7 +28,7 @@ namespace juce
static CommonSmoothedValueTests <SmoothedValue<float, ValueSmoothingTypes::Linear>> commonLinearSmoothedValueTests;
static CommonSmoothedValueTests <SmoothedValue<float, ValueSmoothingTypes::Multiplicative>> commonMultiplicativeSmoothedValueTests;
class SmoothedValueTests : public UnitTest
class SmoothedValueTests final : public UnitTest
{
public:
SmoothedValueTests()

View file

@ -61,7 +61,7 @@ bool AudioDeviceManager::AudioDeviceSetup::operator!= (const AudioDeviceManager:
}
//==============================================================================
class AudioDeviceManager::CallbackHandler : public AudioIODeviceCallback,
class AudioDeviceManager::CallbackHandler final : public AudioIODeviceCallback,
public MidiInputCallback,
public AudioIODeviceType::Listener
{
@ -1379,7 +1379,7 @@ void AudioDeviceManager::setDefaultMidiOutput (const String& name)
//==============================================================================
#if JUCE_UNIT_TESTS
class AudioDeviceManagerTests : public UnitTest
class AudioDeviceManagerTests final : public UnitTest
{
public:
AudioDeviceManagerTests() : UnitTest ("AudioDeviceManager", UnitTestCategories::audio) {}
@ -1757,7 +1757,7 @@ private:
virtual void restart (double newSr, int newBs) = 0;
};
class MockDevice : public AudioIODevice,
class MockDevice final : public AudioIODevice,
private Restartable
{
public:
@ -1836,7 +1836,7 @@ private:
bool on = false, playing = false;
};
class MockDeviceType : public AudioIODeviceType
class MockDeviceType final : public AudioIODeviceType
{
public:
explicit MockDeviceType (String kind)
@ -1891,7 +1891,7 @@ private:
ListenerList<Restartable> listeners;
};
class MockCallback : public AudioIODeviceCallback
class MockCallback final : public AudioIODeviceCallback
{
public:
std::function<void()> callback;

View file

@ -23,7 +23,7 @@
namespace juce
{
class MidiDeviceListConnectionBroadcaster : private AsyncUpdater
class MidiDeviceListConnectionBroadcaster final : private AsyncUpdater
{
public:
~MidiDeviceListConnectionBroadcaster() override

View file

@ -481,7 +481,7 @@ private:
};
//==============================================================================
class ALSAThread : public Thread
class ALSAThread final : public Thread
{
public:
ALSAThread (const String& inputDeviceID, const String& outputDeviceID)
@ -838,7 +838,7 @@ private:
//==============================================================================
class ALSAAudioIODevice : public AudioIODevice
class ALSAAudioIODevice final : public AudioIODevice
{
public:
ALSAAudioIODevice (const String& deviceName,
@ -967,7 +967,7 @@ private:
//==============================================================================
class ALSAAudioIODeviceType : public AudioIODeviceType
class ALSAAudioIODeviceType final : public AudioIODeviceType
{
public:
ALSAAudioIODeviceType (bool onlySoundcards, const String& deviceTypeName)

View file

@ -308,7 +308,7 @@ class ASIOAudioIODeviceType;
static void sendASIODeviceChangeToListeners (ASIOAudioIODeviceType*);
//==============================================================================
class ASIOAudioIODevice : public AudioIODevice,
class ASIOAudioIODevice final : public AudioIODevice,
private Timer
{
public:
@ -1438,7 +1438,7 @@ struct ASIOAudioIODevice::ASIOCallbackFunctions<maxNumASIODevices>
};
//==============================================================================
class ASIOAudioIODeviceType : public AudioIODeviceType
class ASIOAudioIODeviceType final : public AudioIODeviceType
{
public:
ASIOAudioIODeviceType() : AudioIODeviceType ("ASIO") {}

View file

@ -65,7 +65,7 @@ enum
const char* const javaAudioTypeName = "Android Audio";
//==============================================================================
class AndroidAudioIODevice : public AudioIODevice,
class AndroidAudioIODevice final : public AudioIODevice,
public Thread
{
public:
@ -429,7 +429,7 @@ private:
};
//==============================================================================
class AndroidAudioIODeviceType : public AudioIODeviceType
class AndroidAudioIODeviceType final : public AudioIODeviceType
{
public:
AndroidAudioIODeviceType() : AudioIODeviceType (javaAudioTypeName) {}

View file

@ -217,7 +217,7 @@ static void logNSError (NSError* e)
#define JUCE_NSERROR_CHECK(X) { NSError* error = nil; X; logNSError (error); }
//==============================================================================
class iOSAudioIODeviceType : public AudioIODeviceType,
class iOSAudioIODeviceType final : public AudioIODeviceType,
public AsyncUpdater
{
public:
@ -246,7 +246,7 @@ private:
};
//==============================================================================
struct iOSAudioIODevice::Pimpl : public AsyncUpdater
struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
{
Pimpl (iOSAudioIODeviceType* ioDeviceType, iOSAudioIODevice& ioDevice)
: deviceType (ioDeviceType),
@ -557,7 +557,7 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater
}
//==============================================================================
class PlayHead : public AudioPlayHead
class PlayHead final : public AudioPlayHead
{
public:
explicit PlayHead (Pimpl& implIn) : impl (implIn) {}

View file

@ -180,7 +180,7 @@ Array<MidiInput::Pimpl*> MidiInput::Pimpl::midiInputs;
//==============================================================================
class BelaAudioIODevice : public AudioIODevice
class BelaAudioIODevice final : public AudioIODevice
{
public:
BelaAudioIODevice() : AudioIODevice (BelaAudioIODevice::belaTypeName,
@ -504,7 +504,7 @@ private:
const char* const BelaAudioIODevice::belaTypeName = "Bela Analog";
//==============================================================================
struct BelaAudioIODeviceType : public AudioIODeviceType
struct BelaAudioIODeviceType final : public AudioIODeviceType
{
BelaAudioIODeviceType() : AudioIODeviceType ("Bela") {}

View file

@ -39,7 +39,7 @@ constexpr auto juceAudioObjectPropertyElementMain =
#endif
//==============================================================================
class ManagedAudioBufferList : public AudioBufferList
class ManagedAudioBufferList final : public AudioBufferList
{
public:
struct Deleter
@ -290,7 +290,7 @@ class CoreAudioIODeviceType;
class CoreAudioIODevice;
//==============================================================================
class CoreAudioInternal : private Timer,
class CoreAudioInternal final : private Timer,
private AsyncUpdater
{
private:
@ -1204,7 +1204,7 @@ private:
//==============================================================================
class CoreAudioIODevice : public AudioIODevice,
class CoreAudioIODevice final : public AudioIODevice,
private Timer
{
public:
@ -1435,7 +1435,7 @@ private:
//==============================================================================
class AudioIODeviceCombiner : public AudioIODevice,
class AudioIODeviceCombiner final : public AudioIODevice,
private AsyncRestarter,
private Timer
{
@ -1970,7 +1970,7 @@ private:
void handleAudioDeviceError (const String& errorMessage) { shutdown (errorMessage.isNotEmpty() ? errorMessage : String ("unknown")); }
//==============================================================================
struct DeviceWrapper : public AudioIODeviceCallback
struct DeviceWrapper final : public AudioIODeviceCallback
{
DeviceWrapper (AudioIODeviceCombiner& cd, std::unique_ptr<CoreAudioIODevice> d, bool shouldBeInput)
: owner (cd),
@ -2069,7 +2069,7 @@ private:
/* If the current AudioIODeviceCombiner::callback is nullptr, it sets itself as the callback
and forwards error related callbacks to the provided callback
*/
class ScopedErrorForwarder : public AudioIODeviceCallback
class ScopedErrorForwarder final : public AudioIODeviceCallback
{
public:
ScopedErrorForwarder (AudioIODeviceCombiner& ownerIn, AudioIODeviceCallback* cb)
@ -2127,7 +2127,7 @@ private:
//==============================================================================
class CoreAudioIODeviceType : public AudioIODeviceType,
class CoreAudioIODeviceType final : public AudioIODeviceType,
private AsyncUpdater
{
public:

View file

@ -80,7 +80,7 @@ namespace CoreMidiHelpers
#if JUCE_HAS_NEW_COREMIDI_API
template <>
struct API_AVAILABLE (macos (11.0), ios (14.0)) Sender<ImplementationStrategy::onlyNew> : public SenderBase
struct API_AVAILABLE (macos (11.0), ios (14.0)) Sender<ImplementationStrategy::onlyNew> final : public SenderBase
{
void send (MIDIPortRef port, MIDIEndpointRef endpoint, const ump::BytestreamMidiView& m) override
{
@ -167,7 +167,7 @@ namespace CoreMidiHelpers
#if JUCE_HAS_OLD_COREMIDI_API
template <>
struct Sender<ImplementationStrategy::onlyOld> : public SenderBase
struct Sender<ImplementationStrategy::onlyOld> final : public SenderBase
{
void send (MIDIPortRef port, MIDIEndpointRef endpoint, const ump::BytestreamMidiView& m) override
{

View file

@ -739,7 +739,7 @@ private:
};
//==============================================================================
class DSoundAudioIODevice : public AudioIODevice,
class DSoundAudioIODevice final : public AudioIODevice,
public Thread
{
public:
@ -1214,7 +1214,7 @@ String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels,
}
//==============================================================================
class DSoundAudioIODeviceType : public AudioIODeviceType
class DSoundAudioIODeviceType final : public AudioIODeviceType
{
public:
DSoundAudioIODeviceType()

View file

@ -158,7 +158,7 @@ struct JackPortIterator
};
//==============================================================================
class JackAudioIODevice : public AudioIODevice
class JackAudioIODevice final : public AudioIODevice
{
public:
JackAudioIODevice (const String& inName,
@ -416,7 +416,7 @@ public:
private:
//==============================================================================
class MainThreadDispatcher : private AsyncUpdater
class MainThreadDispatcher final : private AsyncUpdater
{
public:
explicit MainThreadDispatcher (JackAudioIODevice& device) : ref (device) {}
@ -579,7 +579,7 @@ private:
//==============================================================================
class JackAudioIODeviceType;
class JackAudioIODeviceType : public AudioIODeviceType
class JackAudioIODeviceType final : public AudioIODeviceType
{
public:
JackAudioIODeviceType()

View file

@ -334,7 +334,7 @@ private:
// created on the main thread, but the MidiDeviceListConnectionBroadcaster's constructor
// can't complete until the AlsaClient's destructor has run, which in turn requires the
// SequencerThread to join.
class UpdateNotifier : private AsyncUpdater
class UpdateNotifier final : private AsyncUpdater
{
public:
~UpdateNotifier() override { cancelPendingUpdate(); }
@ -528,13 +528,13 @@ struct AlsaPortPtr
explicit AlsaPortPtr (AlsaClient::Port* p)
: ptr (p) {}
~AlsaPortPtr() noexcept { AlsaClient::getInstance()->deletePort (ptr); }
virtual ~AlsaPortPtr() noexcept { AlsaClient::getInstance()->deletePort (ptr); }
AlsaClient::Port* ptr = nullptr;
};
//==============================================================================
class MidiInput::Pimpl : public AlsaPortPtr
class MidiInput::Pimpl final : public AlsaPortPtr
{
public:
using AlsaPortPtr::AlsaPortPtr;
@ -633,7 +633,7 @@ void MidiInput::stop()
}
//==============================================================================
class MidiOutput::Pimpl : public AlsaPortPtr
class MidiOutput::Pimpl final : public AlsaPortPtr
{
public:
using AlsaPortPtr::AlsaPortPtr;

View file

@ -100,7 +100,7 @@ struct MidiServiceType
};
//==============================================================================
struct Win32MidiService : public MidiServiceType,
struct Win32MidiService final : public MidiServiceType,
private Timer
{
Win32MidiService() = default;
@ -131,7 +131,7 @@ private:
struct Win32InputWrapper;
//==============================================================================
struct MidiInCollector : public ReferenceCountedObject
struct MidiInCollector final : public ReferenceCountedObject
{
MidiInCollector (Win32MidiService& s, MidiDeviceInfo d)
: deviceInfo (d), midiService (s)
@ -370,6 +370,8 @@ private:
template <class WrapperType>
struct Win32MidiDeviceQuery
{
virtual ~Win32MidiDeviceQuery() = default;
static Array<MidiDeviceInfo> getAvailableDevices()
{
StringArray deviceNames, deviceIDs;
@ -419,7 +421,7 @@ private:
}
};
struct Win32InputWrapper : public MidiInput::Pimpl,
struct Win32InputWrapper final : public MidiInput::Pimpl,
public Win32MidiDeviceQuery<Win32InputWrapper>
{
Win32InputWrapper (Win32MidiService& parentService, MidiInput& midiInput, const String& deviceIdentifier, MidiInputCallback& c)
@ -517,7 +519,7 @@ private:
};
//==============================================================================
struct MidiOutHandle : public ReferenceCountedObject
struct MidiOutHandle final : public ReferenceCountedObject
{
using Ptr = ReferenceCountedObjectPtr<MidiOutHandle>;
@ -543,7 +545,7 @@ private:
};
//==============================================================================
struct Win32OutputWrapper : public MidiOutput::Pimpl,
struct Win32OutputWrapper final : public MidiOutput::Pimpl,
public Win32MidiDeviceQuery<Win32OutputWrapper>
{
Win32OutputWrapper (Win32MidiService& p, const String& deviceIdentifier)
@ -745,7 +747,7 @@ using namespace ABI::Windows::Devices::Enumeration;
using namespace ABI::Windows::Storage::Streams;
//==============================================================================
struct WinRTMidiService : public MidiServiceType
struct WinRTMidiService final : public MidiServiceType
{
public:
//==============================================================================
@ -1008,7 +1010,7 @@ private:
private:
//==============================================================================
struct DeviceEnumerationThread : public Thread
struct DeviceEnumerationThread final : public Thread
{
DeviceEnumerationThread (DeviceCallbackHandler& h,
ComSmartPtr<IDeviceWatcher>& w,
@ -1503,7 +1505,7 @@ private:
//==============================================================================
template <typename MIDIIOStaticsType, typename MIDIPort>
class WinRTIOWrapper : private BLEDeviceWatcher::Listener
class WinRTIOWrapper final : private BLEDeviceWatcher::Listener
{
public:
WinRTIOWrapper (BLEDeviceWatcher& bleWatcher,
@ -1834,7 +1836,7 @@ private:
extern RTL_OSVERSIONINFOW getWindowsVersionInfo();
#endif
struct MidiService : public DeletedAtShutdown
struct MidiService final : public DeletedAtShutdown
{
MidiService()
{

View file

@ -124,7 +124,7 @@ static String getOboeString (const Type& value)
}
//==============================================================================
class OboeAudioIODevice : public AudioIODevice
class OboeAudioIODevice final : public AudioIODevice
{
public:
//==============================================================================
@ -370,7 +370,7 @@ private:
// providing a callback is required on some devices to get a FAST track, so we pass an
// empty one to the temp stream to get the best available buffer size
struct DummyCallback : public oboe::AudioStreamCallback
struct DummyCallback final : public oboe::AudioStreamCallback
{
oboe::DataCallbackResult onAudioReady (oboe::AudioStream*, void*, int32_t) override { return oboe::DataCallbackResult::Stop; }
};
@ -730,7 +730,7 @@ private:
//==============================================================================
template <typename SampleType>
class OboeSessionImpl : public OboeSessionBase
class OboeSessionImpl final : public OboeSessionBase
{
public:
OboeSessionImpl (OboeAudioIODevice& ownerToUse,
@ -1038,7 +1038,7 @@ OboeAudioIODevice::OboeSessionBase* OboeAudioIODevice::OboeSessionBase::create (
}
//==============================================================================
class OboeAudioIODeviceType : public AudioIODeviceType
class OboeAudioIODeviceType final : public AudioIODeviceType
{
public:
OboeAudioIODeviceType()
@ -1302,7 +1302,7 @@ const char* const OboeAudioIODevice::oboeTypeName = "Android Oboe";
bool isOboeAvailable() { return OboeAudioIODeviceType::isOboeAvailable(); }
//==============================================================================
class OboeRealtimeThread : private oboe::AudioStreamCallback
class OboeRealtimeThread final : private oboe::AudioStreamCallback
{
using OboeStream = OboeAudioIODevice::OboeStream;

View file

@ -41,7 +41,7 @@ DECLARE_JNI_CLASS (AndroidAudioManager, "android/media/AudioManager")
#endif
//==============================================================================
struct PCMDataFormatEx : SLDataFormat_PCM
struct PCMDataFormatEx final : SLDataFormat_PCM
{
SLuint32 representation;
};
@ -106,7 +106,7 @@ public:
private:
//==============================================================================
struct ControlBlock : ReferenceCountedObject
struct ControlBlock final : ReferenceCountedObject
{
ControlBlock() = default;
ControlBlock (SLObjectItf o) : ptr (o) {}
@ -118,7 +118,7 @@ private:
};
template <typename T>
class SlRef : public SlObjectRef
class SlRef final : public SlObjectRef
{
public:
//==============================================================================
@ -312,7 +312,7 @@ OpenSLEngineHolder& getEngineHolder()
class SLRealtimeThread;
//==============================================================================
class OpenSLAudioIODevice : public AudioIODevice
class OpenSLAudioIODevice final : public AudioIODevice
{
public:
//==============================================================================
@ -427,7 +427,7 @@ public:
//==============================================================================
template <typename T>
struct OpenSLQueueRunnerPlayer : OpenSLQueueRunner<T, OpenSLQueueRunnerPlayer<T>, SLPlayItf_>
struct OpenSLQueueRunnerPlayer final : OpenSLQueueRunner<T, OpenSLQueueRunnerPlayer<T>, SLPlayItf_>
{
using Base = OpenSLQueueRunner<T, OpenSLQueueRunnerPlayer<T>, SLPlayItf_>;
@ -472,7 +472,7 @@ public:
};
template <typename T>
struct OpenSLQueueRunnerRecorder : public OpenSLQueueRunner<T, OpenSLQueueRunnerRecorder<T>, SLRecordItf_>
struct OpenSLQueueRunnerRecorder final : public OpenSLQueueRunner<T, OpenSLQueueRunnerRecorder<T>, SLRecordItf_>
{
using Base = OpenSLQueueRunner<T, OpenSLQueueRunnerRecorder<T>, SLRecordItf_>;
@ -631,7 +631,7 @@ public:
};
template <typename T>
class OpenSLSessionT : public OpenSLSession
class OpenSLSessionT final : public OpenSLSession
{
public:
OpenSLSessionT (int numInputChannels, int numOutputChannels,
@ -1068,7 +1068,7 @@ OpenSLAudioIODevice::OpenSLSession* OpenSLAudioIODevice::OpenSLSession::create (
}
//==============================================================================
class OpenSLAudioDeviceType : public AudioIODeviceType
class OpenSLAudioDeviceType final : public AudioIODeviceType
{
public:
OpenSLAudioDeviceType() : AudioIODeviceType (OpenSLAudioIODevice::openSLTypeName) {}

View file

@ -560,7 +560,7 @@ public:
private:
//==============================================================================
struct SessionEventCallback : public ComBaseClassHelper<IAudioSessionEvents>
struct SessionEventCallback final : public ComBaseClassHelper<IAudioSessionEvents>
{
SessionEventCallback (WASAPIDeviceBase& d) : owner (d) {}
@ -923,7 +923,7 @@ private:
};
//==============================================================================
class WASAPIInputDevice : public WASAPIDeviceBase
class WASAPIInputDevice final : public WASAPIDeviceBase
{
public:
WASAPIInputDevice (const ComSmartPtr<IMMDevice>& d, WASAPIDeviceMode mode)
@ -1071,7 +1071,7 @@ private:
};
//==============================================================================
class WASAPIOutputDevice : public WASAPIDeviceBase
class WASAPIOutputDevice final : public WASAPIDeviceBase
{
public:
WASAPIOutputDevice (const ComSmartPtr<IMMDevice>& d, WASAPIDeviceMode mode)
@ -1198,7 +1198,7 @@ private:
};
//==============================================================================
class WASAPIAudioIODevice : public AudioIODevice,
class WASAPIAudioIODevice final : public AudioIODevice,
public Thread,
private AsyncUpdater
{
@ -1716,7 +1716,7 @@ private:
//==============================================================================
class WASAPIAudioIODeviceType : public AudioIODeviceType
class WASAPIAudioIODeviceType final : public AudioIODeviceType
{
public:
explicit WASAPIAudioIODeviceType (WASAPIDeviceMode mode)
@ -1815,7 +1815,7 @@ private:
ComSmartPtr<IMMDeviceEnumerator> enumerator;
//==============================================================================
class ChangeNotificationClient : public ComBaseClassHelper<IMMNotificationClient>
class ChangeNotificationClient final : public ComBaseClassHelper<IMMNotificationClient>
{
public:
explicit ChangeNotificationClient (WASAPIAudioIODeviceType* d)

View file

@ -382,7 +382,7 @@ namespace AiffFileHelpers
}
//==============================================================================
class AiffAudioFormatReader : public AudioFormatReader
class AiffAudioFormatReader final : public AudioFormatReader
{
public:
AiffAudioFormatReader (InputStream* in)
@ -640,7 +640,7 @@ private:
};
//==============================================================================
class AiffAudioFormatWriter : public AudioFormatWriter
class AiffAudioFormatWriter final : public AudioFormatWriter
{
public:
AiffAudioFormatWriter (OutputStream* out, double rate,
@ -818,7 +818,7 @@ private:
};
//==============================================================================
class MemoryMappedAiffReader : public MemoryMappedAudioFormatReader
class MemoryMappedAiffReader final : public MemoryMappedAudioFormatReader
{
public:
MemoryMappedAiffReader (const File& f, const AiffAudioFormatReader& reader)

View file

@ -384,7 +384,7 @@ struct CoreAudioFormatMetatdata
};
//==============================================================================
class CoreAudioReader : public AudioFormatReader
class CoreAudioReader final : public AudioFormatReader
{
public:
using StreamKind = CoreAudioFormat::StreamKind;
@ -664,7 +664,7 @@ AudioFormatWriter* CoreAudioFormat::createWriterFor (OutputStream*,
#define DEFINE_CHANNEL_LAYOUT_DFL_ENTRY(x) CoreAudioChannelLayoutTag { x, #x, AudioChannelSet() }
#define DEFINE_CHANNEL_LAYOUT_TAG_ENTRY(x, y) CoreAudioChannelLayoutTag { x, #x, y }
class CoreAudioLayoutsUnitTest : public UnitTest
class CoreAudioLayoutsUnitTest final : public UnitTest
{
public:
CoreAudioLayoutsUnitTest()

View file

@ -183,7 +183,7 @@ template <typename Item>
auto emptyRange (Item item) { return Range<Item>::emptyRange (item); }
//==============================================================================
class FlacReader : public AudioFormatReader
class FlacReader final : public AudioFormatReader
{
public:
FlacReader (InputStream* in) : AudioFormatReader (in, flacFormatName)
@ -386,7 +386,7 @@ private:
//==============================================================================
class FlacWriter : public AudioFormatWriter
class FlacWriter final : public AudioFormatWriter
{
public:
FlacWriter (OutputStream* out, double rate, uint32 numChans, uint32 bits, int qualityOptionIndex)

View file

@ -28,7 +28,7 @@ namespace juce
#if JUCE_USE_LAME_AUDIO_FORMAT
class LAMEEncoderAudioFormat::Writer : public AudioFormatWriter
class LAMEEncoderAudioFormat::Writer final : public AudioFormatWriter
{
public:
Writer (OutputStream* destStream, const String& formatName,

View file

@ -2954,7 +2954,7 @@ private:
static const char* const mp3FormatName = "MP3 file";
//==============================================================================
class MP3Reader : public AudioFormatReader
class MP3Reader final : public AudioFormatReader
{
public:
MP3Reader (InputStream* const in)

View file

@ -109,7 +109,7 @@ const char* const OggVorbisAudioFormat::id3trackNumber = "id3trackNumber";
//==============================================================================
class OggReader : public AudioFormatReader
class OggReader final : public AudioFormatReader
{
public:
OggReader (InputStream* inp) : AudioFormatReader (inp, oggFormatName)
@ -262,7 +262,7 @@ private:
};
//==============================================================================
class OggWriter : public AudioFormatWriter
class OggWriter final : public AudioFormatWriter
{
public:
OggWriter (OutputStream* out, double rate,

View file

@ -1204,7 +1204,7 @@ namespace WavFileHelpers
}
//==============================================================================
class WavAudioFormatReader : public AudioFormatReader
class WavAudioFormatReader final : public AudioFormatReader
{
public:
WavAudioFormatReader (InputStream* in) : AudioFormatReader (in, wavFormatName)
@ -1579,7 +1579,7 @@ private:
};
//==============================================================================
class WavAudioFormatWriter : public AudioFormatWriter
class WavAudioFormatWriter final : public AudioFormatWriter
{
public:
WavAudioFormatWriter (OutputStream* const out, const double rate,
@ -1843,7 +1843,7 @@ private:
};
//==============================================================================
class MemoryMappedWavReader : public MemoryMappedAudioFormatReader
class MemoryMappedWavReader final : public MemoryMappedAudioFormatReader
{
public:
MemoryMappedWavReader (const File& wavFile, const WavAudioFormatReader& reader)
@ -2113,7 +2113,7 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai
//==============================================================================
#if JUCE_UNIT_TESTS
struct WaveAudioFormatTests : public UnitTest
struct WaveAudioFormatTests final : public UnitTest
{
WaveAudioFormatTests()
: UnitTest ("Wave audio format tests", UnitTestCategories::audio)

View file

@ -29,7 +29,7 @@ namespace juce
namespace WindowsMediaCodec
{
class JuceIStream : public ComBaseClassHelper<IStream>
class JuceIStream final : public ComBaseClassHelper<IStream>
{
public:
JuceIStream (InputStream& in) noexcept
@ -127,7 +127,7 @@ static const char* wmFormatName = "Windows Media";
static const char* const extensions[] = { ".mp3", ".wmv", ".asf", ".wm", ".wma", nullptr };
//==============================================================================
class WMAudioReader : public AudioFormatReader
class WMAudioReader final : public AudioFormatReader
{
public:
WMAudioReader (InputStream* const input_)

View file

@ -211,7 +211,7 @@ bool AudioFormatWriter::flush()
}
//==============================================================================
class AudioFormatWriter::ThreadedWriter::Buffer : private TimeSliceClient
class AudioFormatWriter::ThreadedWriter::Buffer final : private TimeSliceClient
{
public:
Buffer (TimeSliceThread& tst, AudioFormatWriter* w, int channels, int numSamples)

View file

@ -238,7 +238,7 @@ static AudioBuffer<float> generateTestBuffer (Random& random, int bufferSize)
return buffer;
}
class BufferingAudioReaderTests : public UnitTest
class BufferingAudioReaderTests final : public UnitTest
{
public:
BufferingAudioReaderTests() : UnitTest ("BufferingAudioReader", UnitTestCategories::audio) {}
@ -250,7 +250,7 @@ public:
beginTest ("Reading samples from a blocked reader should produce silence");
{
struct BlockingReader : public TestAudioFormatReader
struct BlockingReader final : public TestAudioFormatReader
{
explicit BlockingReader (const AudioBuffer<float>* b)
: TestAudioFormatReader (b)

View file

@ -547,7 +547,7 @@ namespace AAXClasses
//==============================================================================
class JuceAAX_Processor;
class JuceAAX_GUI : public AAX_CEffectGUI,
class JuceAAX_GUI final : public AAX_CEffectGUI,
public ModifierKeyProvider
{
public:
@ -668,7 +668,7 @@ namespace AAXClasses
}
//==============================================================================
struct ContentWrapperComponent : public Component
struct ContentWrapperComponent final : public Component
{
ContentWrapperComponent (JuceAAX_GUI& gui, AudioProcessor& plugin)
: owner (gui)
@ -805,7 +805,7 @@ namespace AAXClasses
static Array<JuceAAX_Processor*> activeProcessors;
//==============================================================================
class JuceAAX_Processor : public AAX_CEffectParameters,
class JuceAAX_Processor final : public AAX_CEffectParameters,
public juce::AudioPlayHead,
public AudioProcessorListener,
private AsyncUpdater

View file

@ -104,7 +104,7 @@ struct AudioProcessorHolder
};
//==============================================================================
class JuceAU : public AudioProcessorHolder,
class JuceAU final : public AudioProcessorHolder,
public ausdk::MusicDeviceBase,
public AudioProcessorListener,
public AudioProcessorParameter::Listener
@ -1152,7 +1152,7 @@ public:
return rate > 0 ? juceFilter->getLatencySamples() / rate : 0;
}
class ScopedPlayHead : private AudioPlayHead
class ScopedPlayHead final : private AudioPlayHead
{
public:
explicit ScopedPlayHead (JuceAU& juceAudioUnit)
@ -1594,7 +1594,7 @@ public:
}
//==============================================================================
class EditorCompHolder : public Component
class EditorCompHolder final : public Component
{
public:
EditorCompHolder (AudioProcessorEditor* const editor)
@ -1740,7 +1740,7 @@ public:
}
//==============================================================================
struct JuceUIViewClass : public ObjCClass<NSView>
struct JuceUIViewClass final : public ObjCClass<NSView>
{
JuceUIViewClass() : ObjCClass<NSView> ("JUCEAUView_")
{
@ -1831,7 +1831,7 @@ public:
};
//==============================================================================
struct JuceUICreationClass : public ObjCClass<NSObject>
struct JuceUICreationClass final : public ObjCClass<NSObject>
{
JuceUICreationClass() : ObjCClass<NSObject> ("JUCE_AUCocoaViewClass_")
{

View file

@ -68,7 +68,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wnullability-completeness")
using namespace juce;
struct AudioProcessorHolder : public ReferenceCountedObject
struct AudioProcessorHolder final : public ReferenceCountedObject
{
AudioProcessorHolder() = default;
explicit AudioProcessorHolder (std::unique_ptr<AudioProcessor> p) : processor (std::move (p)) {}
@ -103,7 +103,7 @@ private:
//==============================================================================
//=========================== The actual AudioUnit =============================
//==============================================================================
class JuceAudioUnitv3 : public AudioProcessorListener,
class JuceAudioUnitv3 final : public AudioProcessorListener,
public AudioPlayHead,
private AudioProcessorParameter::Listener
{
@ -741,7 +741,7 @@ public:
AUAudioUnit* getAudioUnit() const { return au; }
private:
struct Class : public ObjCClass<AUAudioUnit>
struct Class final : public ObjCClass<AUAudioUnit>
{
Class() : ObjCClass<AUAudioUnit> ("AUAudioUnit_")
{
@ -789,7 +789,7 @@ private:
{
WaitableEvent deletionEvent;
struct AUDeleter : public CallbackMessage
struct AUDeleter final : public CallbackMessage
{
AUDeleter (id selfToDelete, WaitableEvent& event)
: parentSelf (selfToDelete), parentDeletionEvent (event)

View file

@ -114,7 +114,7 @@ static const LV2_Options_Option* findMatchingOption (const LV2_Options_Option* o
return nullptr;
}
class ParameterStorage : private AudioProcessorListener
class ParameterStorage final : private AudioProcessorListener
{
public:
ParameterStorage (AudioProcessor& proc, LV2_URID_Map map)
@ -290,7 +290,7 @@ struct PortIndices
};
//==============================================================================
class PlayHead : public AudioPlayHead
class PlayHead final : public AudioPlayHead
{
public:
PlayHead (LV2_URID_Map mapFeatureIn, double sampleRateIn)
@ -488,7 +488,7 @@ private:
JUCE_LEAK_DETECTOR (Ports)
};
class LV2PluginInstance : private AudioProcessorListener
class LV2PluginInstance final : private AudioProcessorListener
{
public:
LV2PluginInstance (double sampleRate,
@ -1514,7 +1514,7 @@ static Optional<float> findScaleFactor (const LV2_URID_Map* symap, const LV2_Opt
return parser.parseNumericOption<float> (scaleFactorOption);
}
class LV2UIInstance : private Component,
class LV2UIInstance final : private Component,
private ComponentListener
{
public:

View file

@ -54,7 +54,7 @@ namespace juce
{
//==============================================================================
class StandaloneFilterApp : public JUCEApplication
class StandaloneFilterApp final : public JUCEApplication
{
public:
StandaloneFilterApp()

View file

@ -46,7 +46,7 @@ typedef ComponentPeer* (*createUnityPeerFunctionType) (Component&);
extern createUnityPeerFunctionType juce_createUnityPeerFn;
//==============================================================================
class UnityPeer : public ComponentPeer,
class UnityPeer final : public ComponentPeer,
public AsyncUpdater
{
public:
@ -141,7 +141,7 @@ public:
private:
//==============================================================================
struct UnityBitmapImage : public ImagePixelData
struct UnityBitmapImage final : public ImagePixelData
{
UnityBitmapImage (uint8* data, int w, int h)
: ImagePixelData (Image::PixelFormat::ARGB, w, h),
@ -187,7 +187,7 @@ private:
};
//==============================================================================
struct MouseWatcher : public Timer
struct MouseWatcher final : public Timer
{
MouseWatcher (ComponentPeer& o) : owner (o) {}

View file

@ -196,7 +196,7 @@ struct AbletonLiveHostSpecific
/**
This is an AudioEffectX object that holds and wraps our AudioProcessor...
*/
class JuceVSTWrapper : public AudioProcessorListener,
class JuceVSTWrapper final : public AudioProcessorListener,
public AudioPlayHead,
private Timer,
private AudioProcessorParameter::Listener
@ -933,7 +933,7 @@ public:
//==============================================================================
// A component to hold the AudioProcessorEditor, and cope with some housekeeping
// chores when it changes or repaints.
struct EditorCompWrapper : public Component
struct EditorCompWrapper final : public Component
#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE
, public Timer
#endif
@ -1272,7 +1272,7 @@ public:
//==============================================================================
private:
struct HostChangeUpdater : private AsyncUpdater
struct HostChangeUpdater final : private AsyncUpdater
{
explicit HostChangeUpdater (JuceVSTWrapper& o) : owner (o) {}
~HostChangeUpdater() override { cancelPendingUpdate(); }
@ -1370,7 +1370,7 @@ private:
{
MessageManager::getInstance()->setCurrentThreadAsMessageThread();
struct MessageThreadCallback : public CallbackMessage
struct MessageThreadCallback final : public CallbackMessage
{
MessageThreadCallback (bool& tr) : triggered (tr) {}
void messageCallback() override { triggered = true; }

View file

@ -401,7 +401,7 @@ static tresult extractResult (const QueryInterfaceResult& userInterface,
}
//==============================================================================
class JuceAudioProcessor : public Vst::IUnitInfo
class JuceAudioProcessor final : public Vst::IUnitInfo
{
public:
explicit JuceAudioProcessor (AudioProcessor* source) noexcept
@ -410,8 +410,6 @@ public:
setupParameters();
}
virtual ~JuceAudioProcessor() = default;
AudioProcessor* get() const noexcept { return audioProcessor.get(); }
JUCE_DECLARE_VST3_COM_QUERY_METHODS
@ -724,7 +722,7 @@ static void setValueAndNotifyIfChanged (AudioProcessorParameter& param, float ne
}
//==============================================================================
class JuceVST3EditController : public Vst::EditController,
class JuceVST3EditController final : public Vst::EditController,
public Vst::IMidiMapping,
public Vst::IUnitInfo,
public Vst::ChannelContext::IInfoListener,
@ -791,7 +789,7 @@ public:
}
//==============================================================================
struct Param : public Vst::Parameter
struct Param final : public Vst::Parameter
{
Param (JuceVST3EditController& editController, AudioProcessorParameter& p,
Vst::ParamID vstParamID, Vst::UnitID vstUnitID,
@ -903,7 +901,7 @@ public:
};
//==============================================================================
struct ProgramChangeParameter : public Vst::Parameter
struct ProgramChangeParameter final : public Vst::Parameter
{
ProgramChangeParameter (AudioProcessor& p, Vst::ParamID vstParamID)
: owner (p)
@ -1440,7 +1438,7 @@ private:
}
//==============================================================================
struct OwnedParameterListener : public AudioProcessorParameter::Listener
struct OwnedParameterListener final : public AudioProcessorParameter::Listener
{
OwnedParameterListener (JuceVST3EditController& editController,
AudioProcessorParameter& parameter,
@ -1617,7 +1615,7 @@ private:
}
}
class EditorContextMenu : public HostProvidedContextMenu
class EditorContextMenu final : public HostProvidedContextMenu
{
public:
EditorContextMenu (AudioProcessorEditor& editorIn,
@ -1700,7 +1698,7 @@ private:
VSTComSmartPtr<Steinberg::Vst::IContextMenu> contextMenu;
};
class EditorHostContext : public AudioProcessorEditorHostContext
class EditorHostContext final : public AudioProcessorEditorHostContext
{
public:
EditorHostContext (JuceAudioProcessor& processorIn,
@ -1732,7 +1730,7 @@ private:
};
//==============================================================================
class JuceVST3Editor : public Vst::EditorView,
class JuceVST3Editor final : public Vst::EditorView,
public Steinberg::IPlugViewContentScaleSupport,
private Timer
{
@ -2069,7 +2067,7 @@ private:
}
//==============================================================================
struct ContentWrapperComponent : public Component
struct ContentWrapperComponent final : public Component
#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE
, public Timer
#endif
@ -2309,7 +2307,7 @@ private:
// On macOS Cubase 10 resizes the host window after calling onSize() resulting in the peer
// bounds being a step behind the plug-in. Calling updateBounds() asynchronously seems to fix things...
struct Cubase10WindowResizeWorkaround : public AsyncUpdater
struct Cubase10WindowResizeWorkaround final : public AsyncUpdater
{
Cubase10WindowResizeWorkaround (JuceVST3Editor& o) : owner (o) {}
@ -2374,7 +2372,7 @@ private:
//==============================================================================
#if JucePlugin_Enable_ARA
class JuceARAFactory : public ARA::IMainFactory
class JuceARAFactory final : public ARA::IMainFactory
{
public:
JuceARAFactory() = default;
@ -2418,7 +2416,7 @@ private:
#endif
//==============================================================================
class JuceVST3Component : public Vst::IComponent,
class JuceVST3Component final : public Vst::IComponent,
public Vst::IAudioProcessor,
public Vst::IUnitInfo,
public Vst::IConnectionPoint,
@ -3953,7 +3951,7 @@ bool shutdownModule()
#endif
// See https://steinbergmedia.github.io/vst3_dev_portal/pages/FAQ/Compatibility+with+VST+2.x+or+VST+1.html
class JucePluginCompatibility : public IPluginCompatibility
class JucePluginCompatibility final : public IPluginCompatibility
{
public:
virtual ~JucePluginCompatibility() = default;
@ -4023,7 +4021,7 @@ private:
using CreateFunction = FUnknown* (*)(Vst::IHostApplication*);
//==============================================================================
struct JucePluginFactory : public IPluginFactory3
struct JucePluginFactory final : public IPluginFactory3
{
JucePluginFactory()
: factoryInfo (JucePlugin_Manufacturer, JucePlugin_ManufacturerWebsite,

View file

@ -68,7 +68,7 @@ std::unique_ptr<AudioPluginInstance> AudioPluginFormat::createInstanceFromDescri
return instance;
}
struct AudioPluginFormat::AsyncCreateMessage : public Message
struct AudioPluginFormat::AsyncCreateMessage final : public Message
{
AsyncCreateMessage (const PluginDescription& d, double sr, int size, PluginCreationCallback call)
: desc (d), sampleRate (sr), bufferSize (size), callbackToUse (std::move (call))

View file

@ -159,7 +159,7 @@ void AudioPluginFormatManager::createPluginInstanceAsync (const PluginDescriptio
if (auto* format = findFormatForDescription (description, error))
return format->createPluginInstanceAsync (description, initialSampleRate, initialBufferSize, std::move (callback));
struct DeliverError : public CallbackMessage
struct DeliverError final : public CallbackMessage
{
DeliverError (AudioPluginFormat::PluginCreationCallback c, const String& e)
: call (std::move (c)), error (e)

View file

@ -340,7 +340,7 @@ public:
using Vst3Fn = decltype (vst3Fn);
using AuFn = decltype (auFn);
struct Visitor : ExtensionsVisitor, Vst3Fn, AuFn
struct Visitor final : public ExtensionsVisitor, Vst3Fn, AuFn
{
explicit Visitor (Vst3Fn vst3Fn, AuFn auFn) : Vst3Fn (std::move (vst3Fn)), AuFn (std::move (auFn)) {}
void visitVST3Client (const VST3Client& x) override { Vst3Fn::operator() (x); }
@ -458,7 +458,7 @@ void createARAFactoryAsync (AudioPluginInstance& instance, std::function<void (A
if (! instance.getPluginDescription().hasARAExtension)
cb (ARAFactoryWrapper{});
struct Extensions : public ExtensionsVisitor
struct Extensions final : public ExtensionsVisitor
{
Extensions (std::function<void (ARAFactoryWrapper)> callbackIn)
: callback (std::move (callbackIn))

View file

@ -332,7 +332,7 @@ namespace AudioUnitFormatHelpers
using ViewComponentBaseClass = NSViewComponent;
#endif
struct AutoResizingNSViewComponent : public ViewComponentBaseClass,
struct AutoResizingNSViewComponent final : public ViewComponentBaseClass,
private AsyncUpdater
{
void childBoundsChanged (Component*) override { triggerAsyncUpdate(); }
@ -838,7 +838,7 @@ public:
if (audioUnit != nullptr)
{
struct AUDeleter : public CallbackMessage
struct AUDeleter final : public CallbackMessage
{
AUDeleter (AudioUnitPluginInstance& inInstance, WaitableEvent& inEvent)
: auInstance (inInstance), completionSignal (inEvent)
@ -1165,7 +1165,7 @@ public:
void getExtensions (ExtensionsVisitor& visitor) const override
{
struct Extensions : public ExtensionsVisitor::AudioUnitClient
struct Extensions final : public ExtensionsVisitor::AudioUnitClient
{
explicit Extensions (const AudioUnitPluginInstance* instanceIn) : instance (instanceIn) {}
@ -1177,7 +1177,7 @@ public:
visitor.visitAudioUnitClient (Extensions { this });
#ifdef JUCE_PLUGINHOST_ARA
struct ARAExtensions : public ExtensionsVisitor::ARAClient
struct ARAExtensions final : public ExtensionsVisitor::ARAClient
{
explicit ARAExtensions (const AudioUnitPluginInstance* instanceIn) : instance (instanceIn) {}
@ -2581,7 +2581,7 @@ private:
};
//==============================================================================
class AudioUnitPluginWindowCocoa : public AudioProcessorEditor
class AudioUnitPluginWindowCocoa final : public AudioProcessorEditor
{
public:
AudioUnitPluginWindowCocoa (AudioUnitPluginInstance& p, bool createGenericViewIfNeeded)
@ -2747,7 +2747,7 @@ private:
if (! MessageManager::getInstance()->isThisTheMessageThread())
{
struct AsyncViewControllerCallback : public CallbackMessage
struct AsyncViewControllerCallback final : public CallbackMessage
{
AudioUnitPluginWindowCocoa* owner;
JUCE_IOS_MAC_VIEW* controllerView;

View file

@ -42,7 +42,7 @@ static int insideLADSPACallback = 0;
#endif
//==============================================================================
class LADSPAModuleHandle : public ReferenceCountedObject
class LADSPAModuleHandle final : public ReferenceCountedObject
{
public:
LADSPAModuleHandle (const File& f)

View file

@ -1087,7 +1087,7 @@ private:
returns garbage, so make sure to check that the plugin `hasExtensionData` before
constructing one of these!
*/
class SharedThreadedWorker : public WorkerResponseListener
class SharedThreadedWorker final : public WorkerResponseListener
{
public:
~SharedThreadedWorker() noexcept override
@ -1383,7 +1383,7 @@ struct MessageBufferInterface
};
template <typename Header, typename LockTraits>
class Messages : public MessageBufferInterface<Header>
class Messages final : public MessageBufferInterface<Header>
{
using Read = typename LockTraits::Read;
using Write = typename LockTraits::Write;
@ -1438,7 +1438,7 @@ private:
};
//==============================================================================
class LambdaTimer : private Timer
class LambdaTimer final : private Timer
{
public:
explicit LambdaTimer (std::function<void()> c) : callback (c) {}
@ -1466,7 +1466,7 @@ struct UiMessageHeader
MessageHeader header;
};
class ProcessorToUi : public MessageBufferInterface<UiMessageHeader>
class ProcessorToUi final : public MessageBufferInterface<UiMessageHeader>
{
public:
ProcessorToUi() { timer.startTimerHz (60); }
@ -1988,7 +1988,7 @@ private:
std::vector<AtomPort> atomPorts;
};
class InstanceWithSupports : private FeaturesDataListener,
class InstanceWithSupports final : private FeaturesDataListener,
private HandleHolder
{
public:
@ -2740,7 +2740,7 @@ struct TouchListener
virtual void controlGrabbed (uint32_t port, bool grabbed) = 0;
};
class AsyncFn : public AsyncUpdater
class AsyncFn final : public AsyncUpdater
{
public:
explicit AsyncFn (std::function<void()> callbackIn)
@ -2976,7 +2976,7 @@ static bool noneOf (Range&& range, Predicate&& pred)
return std::none_of (begin (range), end (range), std::forward<Predicate> (pred));
}
class PeerChangedListener : private ComponentMovementWatcher
class PeerChangedListener final : private ComponentMovementWatcher
{
public:
PeerChangedListener (Component& c, std::function<void()> peerChangedIn)
@ -2995,7 +2995,7 @@ private:
std::function<void()> peerChanged;
};
struct ViewSizeListener : private ComponentMovementWatcher
struct ViewSizeListener final : private ComponentMovementWatcher
{
ViewSizeListener (Component& c, PhysicalResizeListener& l)
: ComponentMovementWatcher (&c), listener (l)
@ -3025,7 +3025,7 @@ struct ViewSizeListener : private ComponentMovementWatcher
PhysicalResizeListener& listener;
};
class ConfiguredEditorComponent : public Component,
class ConfiguredEditorComponent final : public Component,
private PhysicalResizeListener
{
public:
@ -3182,7 +3182,7 @@ private:
#if JUCE_LINUX || JUCE_BSD
struct InnerHolder
{
struct Inner : public XEmbedComponent
struct Inner final : public XEmbedComponent
{
Inner() : XEmbedComponent (true, true)
{
@ -3194,7 +3194,7 @@ private:
Inner inner;
};
struct ViewComponent : public InnerHolder,
struct ViewComponent final : public InnerHolder,
public XEmbedComponent
{
explicit ViewComponent (PhysicalResizeListener& l)
@ -3221,7 +3221,7 @@ private:
ViewSizeListener listener;
};
#elif JUCE_MAC
struct ViewComponent : public NSViewComponentWithParent
struct ViewComponent final : public NSViewComponentWithParent
{
explicit ViewComponent (PhysicalResizeListener&)
: NSViewComponentWithParent (WantsNudge::no) {}
@ -3231,7 +3231,7 @@ private:
void prepareForDestruction() {}
};
#elif JUCE_WINDOWS
struct ViewComponent : public HWNDComponent
struct ViewComponent final : public HWNDComponent
{
explicit ViewComponent (PhysicalResizeListener&)
{
@ -3252,7 +3252,7 @@ private:
void prepareForDestruction() {}
private:
struct Inner : public Component
struct Inner final : public Component
{
Inner() { setOpaque (true); }
void paint (Graphics& g) override { g.fillAll (Colours::black); }
@ -3261,7 +3261,7 @@ private:
Inner inner;
};
#else
struct ViewComponent : public Component
struct ViewComponent final : public Component
{
explicit ViewComponent (PhysicalResizeListener&) {}
void* getWidget() { return nullptr; }
@ -3339,7 +3339,7 @@ struct InstanceProvider
virtual InstanceWithSupports* getInstanceWithSupports() const = 0;
};
class Editor : public AudioProcessorEditor,
class Editor final : public AudioProcessorEditor,
public UiEventListener,
private LogicalResizeListener
{
@ -3785,7 +3785,7 @@ private:
JUCE_LEAK_DETECTOR (IntermediateParameterTree)
};
struct BypassParameter : public LV2Parameter
struct BypassParameter final : public LV2Parameter
{
BypassParameter (const ParameterInfo& parameterInfo, ParameterValuesAndFlags& cacheIn)
: LV2Parameter ("Bypass", parameterInfo, cacheIn) {}
@ -4350,7 +4350,7 @@ public:
};
//==============================================================================
class LV2AudioPluginInstance : public AudioPluginInstance,
class LV2AudioPluginInstance final : public AudioPluginInstance,
private TouchListener,
private EditorListener,
private InstanceProvider

View file

@ -28,7 +28,7 @@
namespace juce
{
class LV2PluginFormatTests : public UnitTest
class LV2PluginFormatTests final : public UnitTest
{
public:
LV2PluginFormatTests()

View file

@ -29,7 +29,7 @@ namespace juce
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996)
class LegacyAudioParameter : public HostedAudioProcessorParameter
class LegacyAudioParameter final : public HostedAudioProcessorParameter
{
public:
LegacyAudioParameter (AudioProcessor& audioProcessorToUse, int audioParameterIndex)

View file

@ -119,7 +119,7 @@ static std::vector<Vst::ParamID> getAllParamIDs (Vst::IEditController& controlle
/* Allows parameter updates to be queued up without blocking,
and automatically dispatches these updates on the main thread.
*/
class EditControllerParameterDispatcher : private Timer
class EditControllerParameterDispatcher final : private Timer
{
public:
~EditControllerParameterDispatcher() override { stopTimer(); }
@ -402,7 +402,7 @@ static void toProcessContext (Vst::ProcessContext& context,
//==============================================================================
class VST3PluginInstance;
struct VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0
struct VST3HostContext final : public Vst::IComponentHandler, // From VST V3.0.0
public Vst::IComponentHandler2, // From VST V3.1.0 (a very well named class, of course!)
public Vst::IComponentHandler3, // From VST V3.5.0 (also very well named!)
public Vst::IContextMenuTarget,
@ -460,7 +460,7 @@ struct VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0
}
//==============================================================================
struct ContextMenu : public Vst::IContextMenu
struct ContextMenu final : public Vst::IContextMenu
{
ContextMenu (VST3PluginInstance& pluginInstance) : owner (pluginInstance) {}
virtual ~ContextMenu() {}
@ -762,7 +762,7 @@ private:
};
//==============================================================================
class AttributeList : public Vst::IAttributeList
class AttributeList final : public Vst::IAttributeList
{
public:
AttributeList() = default;
@ -850,7 +850,7 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AttributeList)
};
struct Message : public Vst::IMessage
struct Message final : public Vst::IMessage
{
Message() = default;
virtual ~Message() = default;
@ -1159,7 +1159,7 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DLLHandle)
};
struct DLLHandleCache : public DeletedAtShutdown
struct DLLHandleCache final : public DeletedAtShutdown
{
DLLHandleCache() = default;
~DLLHandleCache() override { clearSingletonInstance(); }
@ -1315,7 +1315,7 @@ public:
private:
//==============================================================================
struct TimerCaller : private Timer
struct TimerCaller final : private Timer
{
TimerCaller (Linux::ITimerHandler* h, int interval) : handler (h) { startTimer (interval); }
~TimerCaller() override { stopTimer(); }
@ -1338,7 +1338,7 @@ private:
#endif
//==============================================================================
struct VST3ModuleHandle : public ReferenceCountedObject
struct VST3ModuleHandle final : public ReferenceCountedObject
{
explicit VST3ModuleHandle (const File& pluginFile, const PluginDescription& pluginDesc)
: file (pluginFile)
@ -1785,7 +1785,7 @@ private:
#if JUCE_WINDOWS
using HandleFormat = HWND;
struct ViewComponent : public HWNDComponent
struct ViewComponent final : public HWNDComponent
{
ViewComponent()
{
@ -1799,7 +1799,7 @@ private:
void paint (Graphics& g) override { g.fillAll (Colours::black); }
private:
struct Inner : public Component
struct Inner final : public Component
{
Inner() { setOpaque (true); }
void paint (Graphics& g) override { g.fillAll (Colours::black); }
@ -2086,7 +2086,7 @@ struct VST3ComponentHolder
This is more memory-efficient than storing large vectors of
parameter changes that we'll just throw away.
*/
class ParamValueQueue : public Vst::IParamValueQueue
class ParamValueQueue final : public Vst::IParamValueQueue
{
public:
ParamValueQueue (Vst::ParamID idIn, Steinberg::int32 parameterIndexIn)
@ -2154,7 +2154,7 @@ private:
- Lookup by paramID is also O(1)
- addParameterData never allocates, as long you pass a paramID already passed to initialise
*/
class ParameterChanges : public Vst::IParameterChanges
class ParameterChanges final : public Vst::IParameterChanges
{
static constexpr Steinberg::int32 notInVector = -1;
@ -2482,7 +2482,7 @@ public:
void getExtensions (ExtensionsVisitor& visitor) const override
{
struct Extensions : public ExtensionsVisitor::VST3Client,
struct Extensions final : public ExtensionsVisitor::VST3Client,
public ExtensionsVisitor::ARAClient
{
explicit Extensions (const VST3PluginInstance* instanceIn) : instance (instanceIn) {}
@ -2877,7 +2877,7 @@ public:
}
}
struct TrackPropertiesAttributeList : public Vst::IAttributeList
struct TrackPropertiesAttributeList final : public Vst::IAttributeList
{
TrackPropertiesAttributeList (const TrackProperties& properties) : props (properties) {}
virtual ~TrackPropertiesAttributeList() {}

View file

@ -29,7 +29,7 @@
namespace juce
{
class VST3PluginFormatTests : public UnitTest
class VST3PluginFormatTests final : public UnitTest
{
public:
VST3PluginFormatTests()

View file

@ -282,7 +282,7 @@ public:
Group* parent = nullptr;
};
struct Param : public Base
struct Param final : public Base
{
int paramID;
juce::String expr, name, label;
@ -292,7 +292,7 @@ public:
float defaultValue;
};
struct Group : public Base
struct Group final : public Base
{
juce::String name;
juce::OwnedArray<Base> paramTree;
@ -582,7 +582,7 @@ private:
};
//==============================================================================
struct ModuleHandle : public ReferenceCountedObject
struct ModuleHandle final : public ReferenceCountedObject
{
File file;
MainCall moduleMain, customMain = {};
@ -1257,7 +1257,7 @@ struct VSTPluginInstance final : public AudioPluginInstance,
void getExtensions (ExtensionsVisitor& visitor) const override
{
struct Extensions : public ExtensionsVisitor::VSTClient
struct Extensions final : public ExtensionsVisitor::VSTClient
{
explicit Extensions (const VSTPluginInstance* instanceIn) : instance (instanceIn) {}
@ -2761,7 +2761,7 @@ struct VSTPluginWindow;
static Array<VSTPluginWindow*> activeVSTWindows;
//==============================================================================
struct VSTPluginWindow : public AudioProcessorEditor,
struct VSTPluginWindow final : public AudioProcessorEditor,
#if ! JUCE_MAC
private ComponentMovementWatcher,
#endif
@ -3384,7 +3384,7 @@ private:
NativeScaleFactorNotifier scaleNotifier { this, ScaleNotifierCallback { *this } };
#if JUCE_WINDOWS
struct ViewComponent : public HWNDComponent
struct ViewComponent final : public HWNDComponent
{
ViewComponent()
{
@ -3398,7 +3398,7 @@ private:
void paint (Graphics& g) override { g.fillAll (Colours::black); }
private:
struct Inner : public Component
struct Inner final : public Component
{
Inner() { setOpaque (true); }
void paint (Graphics& g) override { g.fillAll (Colours::black); }

View file

@ -156,7 +156,7 @@ private:
}
}
struct InnerNSView : public ObjCClass<NSView>
struct InnerNSView final : public ObjCClass<NSView>
{
InnerNSView()
: ObjCClass ("JuceInnerNSView_")

View file

@ -569,7 +569,7 @@ struct GraphRenderSequence
void addClearChannelOp (int index)
{
struct ClearOp : public RenderOp
struct ClearOp final : public RenderOp
{
explicit ClearOp (int indexIn) : index (indexIn) {}
@ -592,7 +592,7 @@ struct GraphRenderSequence
void addCopyChannelOp (int srcIndex, int dstIndex)
{
struct CopyOp : public RenderOp
struct CopyOp final : public RenderOp
{
explicit CopyOp (int fromIn, int toIn) : from (fromIn), to (toIn) {}
@ -617,7 +617,7 @@ struct GraphRenderSequence
void addAddChannelOp (int srcIndex, int dstIndex)
{
struct AddOp : public RenderOp
struct AddOp final : public RenderOp
{
explicit AddOp (int fromIn, int toIn) : from (fromIn), to (toIn) {}
@ -644,7 +644,7 @@ struct GraphRenderSequence
void addClearMidiBufferOp (int index)
{
struct ClearOp : public RenderOp
struct ClearOp final : public RenderOp
{
explicit ClearOp (int indexIn) : index (indexIn) {}
@ -667,7 +667,7 @@ struct GraphRenderSequence
void addCopyMidiBufferOp (int srcIndex, int dstIndex)
{
struct CopyOp : public RenderOp
struct CopyOp final : public RenderOp
{
explicit CopyOp (int fromIn, int toIn) : from (fromIn), to (toIn) {}
@ -692,7 +692,7 @@ struct GraphRenderSequence
void addAddMidiBufferOp (int srcIndex, int dstIndex)
{
struct AddOp : public RenderOp
struct AddOp final : public RenderOp
{
explicit AddOp (int fromIn, int toIn) : from (fromIn), to (toIn) {}
@ -717,7 +717,7 @@ struct GraphRenderSequence
void addDelayChannelOp (int chan, int delaySize)
{
struct DelayChannelOp : public RenderOp
struct DelayChannelOp final : public RenderOp
{
DelayChannelOp (int chan, int delaySize)
: buffer ((size_t) (delaySize + 1), (FloatType) 0),
@ -887,7 +887,7 @@ private:
const int midiBufferToUse;
};
struct ProcessOp : public NodeOp
struct ProcessOp final : public NodeOp
{
using NodeOp::NodeOp;
@ -936,7 +936,7 @@ private:
AudioBuffer<float> tempBufferFloat, tempBufferDouble;
};
struct MidiInOp : public NodeOp
struct MidiInOp final : public NodeOp
{
using NodeOp::NodeOp;
@ -947,7 +947,7 @@ private:
}
};
struct MidiOutOp : public NodeOp
struct MidiOutOp final : public NodeOp
{
using NodeOp::NodeOp;
@ -958,7 +958,7 @@ private:
}
};
struct AudioInOp : public NodeOp
struct AudioInOp final : public NodeOp
{
using NodeOp::NodeOp;
@ -972,7 +972,7 @@ private:
}
};
struct AudioOutOp : public NodeOp
struct AudioOutOp final : public NodeOp
{
using NodeOp::NodeOp;
@ -1591,7 +1591,7 @@ private:
At the top of the audio callback, RenderSequenceExchange::updateAudioThreadState will
attempt to install the most-recently-baked graph, if there's one waiting.
*/
class RenderSequenceExchange : private Timer
class RenderSequenceExchange final : private Timer
{
public:
RenderSequenceExchange()
@ -2103,7 +2103,7 @@ void AudioProcessorGraph::AudioGraphIOProcessor::setParentGraph (AudioProcessorG
//==============================================================================
#if JUCE_UNIT_TESTS
class AudioProcessorGraphTests : public UnitTest
class AudioProcessorGraphTests final : public UnitTest
{
public:
AudioProcessorGraphTests()
@ -2239,7 +2239,7 @@ private:
enum class MidiIn { no, yes };
enum class MidiOut { no, yes };
class BasicProcessor : public AudioProcessor
class BasicProcessor final : public AudioProcessor
{
public:
explicit BasicProcessor (const AudioProcessor::BusesProperties& layout, MidiIn mIn, MidiOut mOut)

View file

@ -184,7 +184,7 @@ const AudioProcessorParameterGroup* AudioProcessorParameterGroup::getGroupForPar
//==============================================================================
#if JUCE_UNIT_TESTS
class ParameterGroupTests : public UnitTest
class ParameterGroupTests final : public UnitTest
{
public:
ParameterGroupTests()
@ -292,7 +292,7 @@ public:
}
private:
struct TestAudioProcessor : public AudioProcessor
struct TestAudioProcessor final : public AudioProcessor
{
const String getName() const override { return "ap"; }
void prepareToPlay (double, int) override {}

View file

@ -107,7 +107,7 @@ public:
};
//==============================================================================
class BooleanParameterComponent : public ParameterComponent
class BooleanParameterComponent final : public ParameterComponent
{
public:
BooleanParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param)
@ -154,7 +154,7 @@ private:
};
//==============================================================================
class SwitchParameterComponent : public ParameterComponent
class SwitchParameterComponent final : public ParameterComponent
{
public:
SwitchParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param)
@ -256,7 +256,7 @@ private:
};
//==============================================================================
class ChoiceParameterComponent : public ParameterComponent
class ChoiceParameterComponent final : public ParameterComponent
{
public:
ChoiceParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param)
@ -318,7 +318,7 @@ private:
};
//==============================================================================
class SliderParameterComponent : public ParameterComponent
class SliderParameterComponent final : public ParameterComponent
{
public:
SliderParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param)
@ -411,7 +411,7 @@ private:
};
//==============================================================================
class ParameterDisplayComponent : public Component,
class ParameterDisplayComponent final : public Component,
private AudioProcessorListener,
private AsyncUpdater
{
@ -515,7 +515,7 @@ private:
};
//==============================================================================
struct ParamControlItem : public TreeViewItem
struct ParamControlItem final : public TreeViewItem
{
ParamControlItem (AudioProcessorEditor& editorIn, AudioProcessorParameter& paramIn)
: editor (editorIn), param (paramIn) {}
@ -533,7 +533,7 @@ struct ParamControlItem : public TreeViewItem
AudioProcessorParameter& param;
};
struct ParameterGroupItem : public TreeViewItem
struct ParameterGroupItem final : public TreeViewItem
{
ParameterGroupItem (AudioProcessorEditor& editor, const AudioProcessorParameterGroup& group)
: name (group.getName())

View file

@ -381,7 +381,7 @@ void PluginListComponent::setLastSearchPath (PropertiesFile& properties, AudioPl
}
//==============================================================================
class PluginListComponent::Scanner : private Timer
class PluginListComponent::Scanner final : private Timer
{
public:
Scanner (PluginListComponent& plc, AudioPluginFormat& format, const StringArray& filesOrIdentifiers,
@ -609,7 +609,7 @@ private:
return false;
}
struct ScanJob : public ThreadPoolJob
struct ScanJob final : public ThreadPoolJob
{
ScanJob (Scanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {}

Some files were not shown because too many files have changed in this diff Show more