comparison CloneChannel/plugins/common/DistrhoPluginMaxGen.hpp @ 12:24d60bdea349

ClonneChannel
author prymula <prymula76@outlook.com>
date Thu, 08 Feb 2024 20:24:27 +0100
parents
children
comparison
equal deleted inserted replaced
11:78390e0e674f 12:24d60bdea349
1 /*
2 * DPF Max Gen
3 * Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com>
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any purpose with
6 * or without fee is hereby granted, provided that the above copyright notice and this
7 * permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10 * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #ifndef DISTRHO_PLUGIN_MAX_GEN_HPP_INCLUDED
18 #define DISTRHO_PLUGIN_MAX_GEN_HPP_INCLUDED
19
20 #include "DistrhoPlugin.hpp"
21 #include "genlib.h"
22
23 START_NAMESPACE_DISTRHO
24
25 // -----------------------------------------------------------------------
26
27 class DistrhoPluginMaxGen : public Plugin
28 {
29 public:
30 DistrhoPluginMaxGen();
31 ~DistrhoPluginMaxGen() override;
32
33 protected:
34 // -------------------------------------------------------------------
35 // Information
36
37 const char* getLabel() const noexcept override
38 {
39 return DISTRHO_PLUGIN_NAME;
40 }
41
42 const char* getDescription() const noexcept override
43 {
44 return DISTRHO_PLUGIN_DESCRIPTION;
45 }
46
47 int64_t getUniqueId() const noexcept override
48 {
49 return DISTRHO_PLUGIN_VERSION;
50 }
51
52 const char* getMaker() const noexcept override
53 {
54 return "DISTRHO";
55 }
56
57 const char* getHomePage() const noexcept override
58 {
59 return "https://github.com/DISTRHO/DPF-Max-Gen";
60 }
61
62 const char* getLicense() const noexcept override
63 {
64 return "ISC";
65 }
66
67 uint32_t getVersion() const noexcept override
68 {
69 return d_version(0, 1, 0);
70 }
71
72 // -------------------------------------------------------------------
73 // Init
74
75 void initAudioPort(bool input, uint32_t index, AudioPort& port) override;
76 void initParameter(uint32_t index, Parameter& parameter) override;
77
78 // -------------------------------------------------------------------
79 // Internal data
80
81 float getParameterValue(uint32_t index) const override;
82 void setParameterValue(uint32_t index, float value) override;
83
84 // -------------------------------------------------------------------
85 // Process
86
87 void run(const float** inputs, float** outputs, uint32_t frames) override;
88
89 // -------------------------------------------------------------------
90
91 private:
92 CommonState* fGenState;
93
94 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginMaxGen)
95 };
96
97 // -----------------------------------------------------------------------
98
99 END_NAMESPACE_DISTRHO
100
101 #endif // DISTRHO_PLUGIN_MAX_GEN_HPP_INCLUDED