-
Notifications
You must be signed in to change notification settings - Fork 10
/
BrowserIntegrationPluginClient.h
36 lines (30 loc) · 1.14 KB
/
BrowserIntegrationPluginClient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
BrowserIntegrationPluginClient is intended as a base class for a JUCE
PluginEditor which wants to communicate with a web UI inside a
BrowserComponent.
It takes a reference to the plugin's AudioProcessorValueTreeState, and
takes care of synchronising state changes to JS and handling state changes
from JS.
*/
#pragma once
namespace tomduncalf
{
namespace BrowserIntegration
{
class BrowserIntegrationPluginClient : public BrowserIntegrationClient
{
public:
BrowserIntegrationPluginClient (BrowserIntegration& browserIntegration,
juce::AudioProcessorValueTreeState& parameterValueTree,
juce::String pluginEditorFilePath,
juce::String clientName = "Plugin");
void setupBrowserPluginIntegration();
protected:
juce::AudioProcessorValueTreeState& parameterValueTree;
BrowserValueTreeSynchroniser valueTreeSynchroniser;
juce::File pluginEditorSourceFile;
void sendParameterMetadata();
void writeParameterConfigForTs (juce::Array<juce::var> parameterInfos);
};
}
}