DPF with Max Gen
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.7KB

  1. /*
  2. * DPF Max Gen
  3. * Copyright (C) 2015 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. #ifndef DISTRHO_PLUGIN_MAX_GEN_HPP_INCLUDED
  17. #define DISTRHO_PLUGIN_MAX_GEN_HPP_INCLUDED
  18. #include "DistrhoPlugin.hpp"
  19. #include "genlib.h"
  20. START_NAMESPACE_DISTRHO
  21. // -----------------------------------------------------------------------
  22. class DistrhoPluginMaxGen : public Plugin
  23. {
  24. public:
  25. DistrhoPluginMaxGen();
  26. ~DistrhoPluginMaxGen() override;
  27. protected:
  28. // -------------------------------------------------------------------
  29. // Information
  30. const char* getLabel() const noexcept override
  31. {
  32. return DISTRHO_PLUGIN_NAME;
  33. }
  34. const char* getMaker() const noexcept override
  35. {
  36. return "DISTRHO";
  37. }
  38. const char* getLicense() const noexcept override
  39. {
  40. return "LGPL";
  41. }
  42. uint32_t getVersion() const noexcept override
  43. {
  44. return 0x1000;
  45. }
  46. int64_t getUniqueId() const noexcept override
  47. {
  48. return d_cconst('D', '3', 'E', 'Q');
  49. }
  50. // -------------------------------------------------------------------
  51. // Init
  52. void initParameter(uint32_t index, Parameter& parameter) override;
  53. // -------------------------------------------------------------------
  54. // Internal data
  55. float getParameterValue(uint32_t index) const override;
  56. void setParameterValue(uint32_t index, float value) override;
  57. // -------------------------------------------------------------------
  58. // Process
  59. void run(const float** inputs, float** outputs, uint32_t frames) override;
  60. // -------------------------------------------------------------------
  61. private:
  62. CommonState* fGenState;
  63. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginMaxGen)
  64. };
  65. // -----------------------------------------------------------------------
  66. END_NAMESPACE_DISTRHO
  67. #endif // DISTRHO_PLUGIN_MAX_GEN_HPP_INCLUDED