tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_TextPlugin.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
15class TextPlugin : public Plugin
16{
17public:
19 ~TextPlugin() override;
20
21 static const char* getPluginName() { return NEEDS_TRANS("Text"); }
22 static juce::ValueTree create();
23
24 //==============================================================================
25 static const char* xmlTypeName;
26
27 bool canBeAddedToFolderTrack() override { return true; }
28 juce::String getName() const override { return textTitle.get().isNotEmpty() ? textTitle : TRANS("Text Plugin"); }
29 juce::String getPluginType() override { return xmlTypeName; }
30 void initialise (const PluginInitialisationInfo&) override {}
31 void deinitialise() override {}
32 void applyToBuffer (const PluginRenderContext&) override {}
33 int getNumOutputChannelsGivenInputs (int numInputChannels) override { return numInputChannels; }
34 bool producesAudioWhenNoAudioInput() override { return false; }
35 bool needsConstantBufferSize() override { return false; }
36 juce::String getSelectableDescription() override { return TRANS("Text Plugin"); }
37
38 juce::CachedValue<juce::String> textTitle, textBody;
39
40private:
42};
43
44}} // namespace tracktion { inline namespace engine
Type get() const noexcept
void applyToBuffer(const PluginRenderContext &) override
Process the next block of data.
void deinitialise() override
Called after play stops to release resources.
void initialise(const PluginInitialisationInfo &) override
Gives the plugin a chance to set itself up before being played.
int getNumOutputChannelsGivenInputs(int numInputChannels) override
This must return the number of output channels that the plugin will produce, given a number of input ...
juce::String getName() const override
The name of the type, e.g.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
#define TRANS(stringLiteral)
#define NEEDS_TRANS(stringLiteral)
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Passed into Plugins when they are being initialised, to give them useful contextual information that ...
The context passed to plugin render methods to provide it with buffers to fill.