Download Source/Helper/HelperPluginHost.h from RAM2118/pluginbridge: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/RAM2118/pluginbridge/resolve/1dd0405171bf6efd5a8dfd67bc5b5d3a24dc7aee/Source/Helper/HelperPluginHost.h
- Command line
-
hf download hf://RAM2118/pluginbridge@1dd0405171bf6efd5a8dfd67bc5b5d3a24dc7aee/Source/Helper/HelperPluginHost.h
-
curl -L -o HelperPluginHost.h https://huggingface.co/RAM2118/pluginbridge/resolve/1dd0405171bf6efd5a8dfd67bc5b5d3a24dc7aee/Source/Helper/HelperPluginHost.h
1.97 kB
| class HelperPluginHost | |
| { | |
| public: | |
| HelperPluginHost(); | |
| ~HelperPluginHost(); | |
| // Plugin lifecycle | |
| bool loadPlugin(const juce::String& path, double sampleRate, int blockSize); | |
| void unloadPlugin(); | |
| bool isLoaded() const { return plugin != nullptr; } | |
| juce::String getPluginName() const; | |
| int getParameterCount() const; | |
| // Audio processing (shared memory) | |
| void setSharedAudio(SharedAudioBuffer* shm, SharedSemaphore* inSem, SharedSemaphore* outSem); | |
| void startProcessing(); | |
| void stopProcessing(); | |
| // Parameters | |
| struct ParamInfo { | |
| int index; | |
| juce::String id; | |
| juce::String name; | |
| float value; | |
| juce::String displayText; | |
| }; | |
| std::vector<ParamInfo> searchParams(const juce::String& keyword) const; | |
| std::vector<std::pair<int, float>> getParams(const std::vector<int>& ids) const; | |
| bool setParams(const std::map<int, float>& values); | |
| // GUI | |
| void showGui(); | |
| void hideGui(); | |
| // State | |
| juce::String getStateBase64() const; | |
| bool setStateBase64(const juce::String& base64State); | |
| // Configure | |
| void configure(double sampleRate, int blockSize, int channels); | |
| // Param change callback | |
| std::function<void(int index, float value)> onParamChanged; | |
| private: | |
| void audioProcessingLoop(); | |
| juce::AudioPluginFormatManager formatManager; | |
| std::unique_ptr<juce::AudioPluginInstance> plugin; | |
| std::thread audioThread; | |
| std::atomic<bool> processing{false}; | |
| SharedAudioBuffer* sharedAudio = nullptr; | |
| SharedSemaphore* inputSem = nullptr; | |
| SharedSemaphore* outputSem = nullptr; | |
| double currentSampleRate = 44100.0; | |
| int currentBlockSize = 512; | |
| int currentChannels = 2; | |
| std::unique_ptr<juce::DocumentWindow> guiWindow; | |
| }; | |