49 PluginHostWindowFactory host_window_factory,
50 QObject * parent =
nullptr);
55 void requestRestart () noexcept override;
56 void requestProcess () noexcept override;
57 void requestCallback () noexcept override;
60 bool implementsGui () const noexcept
override {
return true; }
61 void guiResizeHintsChanged () noexcept override;
62 bool guiRequestResize (uint32_t width, uint32_t height) noexcept override;
63 bool guiRequestShow () noexcept override;
64 bool guiRequestHide () noexcept override;
65 void guiClosed (
bool wasDestroyed) noexcept override;
68 bool implementsTimerSupport () const noexcept
override {
return true; }
69 bool timerSupportRegisterTimer (uint32_t periodMs, clap_id * timerId)
noexcept
71 bool timerSupportUnregisterTimer (clap_id timerId)
noexcept override;
74 bool implementsLog () const noexcept
override {
return true; }
75 void logLog (clap_log_severity severity,
const char * message)
76 const noexcept override;
79 bool implementsLatency () const noexcept
override {
return false; }
80 void latencyChanged () noexcept override;
83 bool threadCheckIsMainThread () const noexcept override;
84 bool threadCheckIsAudioThread () const noexcept override;
87 bool implementsParams () const noexcept
override {
return true; }
88 void paramsRescan (clap_param_rescan_flags flags)
noexcept override;
90 paramsClear (clap_id paramId, clap_param_clear_flags flags)
noexcept override;
91 void paramsRequestFlush () noexcept override;
94 bool implementsPosixFdSupport () const noexcept
override {
return true; }
95 bool posixFdSupportRegisterFd (
int fd, clap_posix_fd_flags_t flags)
noexcept
98 posixFdSupportModifyFd (
int fd, clap_posix_fd_flags_t flags)
noexcept override;
99 bool posixFdSupportUnregisterFd (
int fd)
noexcept override;
102 bool implementsThreadPool () const noexcept
override {
return true; }
103 bool threadPoolRequestExec (uint32_t numTasks)
noexcept override;
106 bool implementsState () const noexcept
override {
return true; }
107 void stateMarkDirty () noexcept override;
115 void save_state (std::optional<fs::path> abs_state_dir) override;
116 void load_state (std::optional<fs::path> abs_state_dir) override;
119 void prepare_for_processing_impl (
120 units::sample_rate_t sample_rate,
125 void release_resources_impl () override;
128 void paramsChanged ();
129 void paramAdjusted (clap_id paramId);
130 void pluginLoadedChanged (
bool pluginLoaded);
136 void on_configuration_changed ();
141 void on_ui_visibility_changed ();
153 bool load_plugin (const fs::path &path, int64_t plugin_unique_id);
154 void unload_current_plugin ();
156 void create_ports_from_clap_plugin ();
162 static constexpr auto kStateKey =
"state"sv;
163 friend
void to_json (nlohmann::json &j, const
ClapPlugin &p)
165 to_json (j,
static_cast<const Plugin &
> (p));
167 friend void from_json (
const nlohmann::json &j,
ClapPlugin &p)
169 from_json (j,
static_cast<Plugin &
> (p));
173 class ClapPluginImpl;
174 std::unique_ptr<ClapPluginImpl> pimpl_;
ClapPlugin(dsp::ProcessorBase::ProcessorBaseDependencies dependencies, StateDirectoryParentPathProvider state_path_provider, AudioThreadChecker audio_thread_checker, PluginHostWindowFactory host_window_factory, QObject *parent=nullptr)
Constructor for JucePlugin.