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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_PatchBay.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
14class PatchBayPlugin : public Plugin
15{
16public:
18 ~PatchBayPlugin() override;
19
20 //==============================================================================
21 struct Wire
22 {
24
25 juce::ValueTree state;
26 juce::CachedValue<int> sourceChannelIndex, destChannelIndex;
28 };
29
30 //==============================================================================
31 int getNumWires() const;
32 Wire* getWire (int index) const;
33
34 void makeConnection (int inputChannel, int outputChannel, float gainDb, juce::UndoManager*);
35 void breakConnection (int inputChannel, int outputChannel);
36
37 //==============================================================================
38 static const char* getPluginName() { return NEEDS_TRANS("Patch Bay"); }
39 static const char* xmlTypeName;
40
41 juce::String getName() const override { return TRANS("Patch Bay Plugin"); }
42 juce::String getPluginType() override { return xmlTypeName; }
43 juce::String getShortName (int) override { return TRANS("Patch"); }
44 juce::String getSelectableDescription() override { return TRANS("Patch Bay Plugin"); }
45 bool canBeAddedToClip() override { return false; }
46 bool canBeAddedToRack() override { return false; }
47 bool canBeDisabled() override { return false; }
48 bool needsConstantBufferSize() override { return false; }
49
50 void initialise (const PluginInitialisationInfo&) override;
51 void deinitialise() override;
52
53 void getChannelNames (juce::StringArray*, juce::StringArray*) override;
54 void applyToBuffer (const PluginRenderContext&) override;
55
56private:
57 struct WireList;
59 bool recursionCheck = false;
60 SafeSelectable<Plugin> inputPlugin, outputPlugin;
61
62 void cacheInputAndOutputPlugins();
63
65};
66
67}} // namespace tracktion { inline namespace engine
void applyToBuffer(const PluginRenderContext &) override
Process the next block of data.
void initialise(const PluginInitialisationInfo &) override
Gives the plugin a chance to set itself up before being played.
void deinitialise() override
Called after play stops to release resources.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
juce::String getName() const override
The name of the type, e.g.
#define TRANS(stringLiteral)
#define NEEDS_TRANS(stringLiteral)
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)