diff options
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/Makefile.mingw32.in | 1 | ||||
-rw-r--r-- | plugin/drumgizmo_plugin.cc | 12 | ||||
-rw-r--r-- | plugin/drumgizmo_plugin.h | 14 |
3 files changed, 14 insertions, 13 deletions
diff --git a/plugin/Makefile.mingw32.in b/plugin/Makefile.mingw32.in index 92b627c..40233b4 100644 --- a/plugin/Makefile.mingw32.in +++ b/plugin/Makefile.mingw32.in @@ -36,6 +36,7 @@ DG_SRC = \ @top_srcdir@/src/mutex.cc \ @top_srcdir@/src/path.cc \ @top_srcdir@/src/powerlist.cc \ + @top_srcdir@/src/random.cc \ @top_srcdir@/src/sample.cc \ @top_srcdir@/src/semaphore.cc \ @top_srcdir@/src/saxparser.cc \ diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index 6563dcc..24cfb9a 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -182,13 +182,13 @@ DrumGizmoPlugin::Input::Input(DrumGizmoPlugin& plugin) { } -bool DrumGizmoPlugin::Input::init(Instruments &instruments) +bool DrumGizmoPlugin::Input::init(const Instruments &instruments) { this->instruments = &instruments; return true; } -void DrumGizmoPlugin::Input::setParm(std::string parm, std::string value) +void DrumGizmoPlugin::Input::setParm(const std::string& parm, const std::string& value) { } @@ -241,12 +241,12 @@ DrumGizmoPlugin::Output::Output(DrumGizmoPlugin& plugin) { } -bool DrumGizmoPlugin::Output::init(Channels channels) +bool DrumGizmoPlugin::Output::init(const Channels& channels) { return true; } -void DrumGizmoPlugin::Output::setParm(std::string parm, std::string value) +void DrumGizmoPlugin::Output::setParm(const std::string& parm, const std::string& value) { } @@ -291,7 +291,7 @@ void DrumGizmoPlugin::Output::post(size_t nsamples) { } -sample_t* DrumGizmoPlugin::Output::getBuffer(int ch) +sample_t* DrumGizmoPlugin::Output::getBuffer(int ch) const { assert(plugin.output_samples); @@ -303,7 +303,7 @@ sample_t* DrumGizmoPlugin::Output::getBuffer(int ch) return (*plugin.output_samples)[ch]; } -size_t DrumGizmoPlugin::Output::getBufferSize() +size_t DrumGizmoPlugin::Output::getBufferSize() const { return plugin.getFramesize(); } diff --git a/plugin/drumgizmo_plugin.h b/plugin/drumgizmo_plugin.h index 5d4a648..3508c3e 100644 --- a/plugin/drumgizmo_plugin.h +++ b/plugin/drumgizmo_plugin.h @@ -108,9 +108,9 @@ private: public: Input(DrumGizmoPlugin& plugin); - bool init(Instruments& instruments) override; + bool init(const Instruments& instruments) override; - void setParm(std::string parm, std::string value) override; + void setParm(const std::string& parm, const std::string& value) override; bool start() override; void stop() override; @@ -121,7 +121,7 @@ private: protected: DrumGizmoPlugin& plugin; - Instruments* instruments{nullptr}; + const Instruments* instruments{nullptr}; }; class Output @@ -130,9 +130,9 @@ private: public: Output(DrumGizmoPlugin& plugin); - bool init(Channels channels) override; + bool init(const Channels& channels) override; - void setParm(std::string parm, std::string value) override; + void setParm(const std::string& parm, const std::string& value) override; bool start() override; void stop() override; @@ -141,8 +141,8 @@ private: void run(int ch, sample_t *samples, size_t nsamples) override; void post(size_t nsamples) override; - sample_t *getBuffer(int ch) override; - size_t getBufferSize() override; + sample_t *getBuffer(int ch) const override; + size_t getBufferSize() const override; protected: DrumGizmoPlugin& plugin; |