Skip to content

Commit

Permalink
Updated placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
MeijisIrlnd committed Aug 17, 2024
1 parent 70f53e6 commit 878d0c8
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 13 deletions.
File renamed without changes.
12 changes: 12 additions & 0 deletions boilerplate/effect-plugin-webview/source/PluginEditor.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Created by Syl on 17/08/2024.
//
#include "PluginEditor.h"
PluginEditor::PluginEditor(std::uint32_t width, std::uint32_t height) : mostly_harmless::gui::WebviewEditor(width, height) {
}

void PluginEditor::initialise(mostly_harmless::gui::EditorContext /*context*/) {
}

void PluginEditor::onParamEvent(mostly_harmless::events::ProcToGuiParamEvent /*event*/) {
}
16 changes: 16 additions & 0 deletions boilerplate/effect-plugin-webview/source/PluginEditor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// Created by Syl on 17/08/2024.
//

#ifndef MOSTLYHARMLESS_PLUGINEDITOR_H
#define MOSTLYHARMLESS_PLUGINEDITOR_H
#include <mostly_harmless/gui/mostlyharmless_WebviewEditor.h>
class PluginEditor : public mostly_harmless::gui::WebviewEditor {
public:
PluginEditor(std::uint32_t width, std::uint32_t height);
void initialise(mostly_harmless::gui::EditorContext context) override;
void onParamEvent(mostly_harmless::events::ProcToGuiParamEvent event) override;

private:
};
#endif // MOSTLYHARMLESS_PLUGINEDITOR_H
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ std::vector<mostly_harmless::Parameter<float>> createParams() {
return {};
}
PluginProcessor::PluginProcessor(const clap_host* host) : mostly_harmless::Plugin<float>(host, createParams()) {

}

void PluginProcessor::initialise(double /*sampleRate*/, std::uint32_t /*minFrames*/, std::uint32_t /*maxFrames*/) noexcept {

}

void PluginProcessor::process(marvin::containers::BufferView<float> /*bufferView*/,
mostly_harmless::EventContext /*eventContext*/) noexcept {

void PluginProcessor::process(marvin::containers::BufferView<float> /*bufferView*/, mostly_harmless::events::InputEventContext /*eventContext*/) noexcept {
}

void PluginProcessor::flushParams(mostly_harmless::EventContext /*eventContext*/) noexcept {

void PluginProcessor::flushParams(mostly_harmless::events::InputEventContext /*eventContext*/) noexcept {
}

void PluginProcessor::reset() noexcept {
}

void PluginProcessor::loadState(std::string_view /*loaded*/) {
}

void PluginProcessor::saveState(std::ostringstream& /*dest*/) {
}

std::unique_ptr<mostly_harmless::gui::IEditor> PluginProcessor::createEditor() noexcept {
return std::make_unique<mostly_harmless::gui::WebviewEditor>(400, 400);
return nullptr;
}

MOSTLYHARMLESS_REGISTER(PluginProcessor)
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ class PluginProcessor : public mostly_harmless::Plugin<float> {
PluginProcessor(const clap_host* host);
~PluginProcessor() noexcept override = default;
void initialise(double sampleRate, std::uint32_t minFrames, std::uint32_t maxFrames) noexcept override;
void process(marvin::containers::BufferView<float> bufferView, mostly_harmless::EventContext eventContext) noexcept override;
void flushParams(mostly_harmless::EventContext eventContext) noexcept override;
void process(marvin::containers::BufferView<float> bufferView, mostly_harmless::events::InputEventContext eventContext) noexcept override;
void flushParams(mostly_harmless::events::InputEventContext eventContext) noexcept override;
void reset() noexcept override;
void loadState(std::string_view loaded) override;
void saveState(std::ostringstream& dest) override;
std::unique_ptr<mostly_harmless::gui::IEditor> createEditor() noexcept override;
private:

private:
};
#endif //PLUGINPROCESSOR_H
#endif // PLUGINPROCESSOR_H
1 change: 0 additions & 1 deletion examples/gain/source/Gain.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace examples::gain {
void saveState(std::ostringstream& dest) override;
std::unique_ptr<mostly_harmless::gui::IEditor> createEditor() noexcept override;


private:
void checkParameters();
Parameters m_params;
Expand Down

0 comments on commit 878d0c8

Please sign in to comment.