Collection of DPF-based plugins for packaging
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.

111 lines
3.0KB

  1. /*
  2. * DISTRHO glBars Plugin based on XMMS/XBMC "GL Bars"
  3. * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies
  4. * Copyright (C) 2000 Christian Zander <phoenix@minion.de>
  5. * Copyright (C) 2015 Nedko Arnaudov
  6. * Copyright (C) 2016 Filipe Coelho <falktx@falktx.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * For a full copy of the license see the LICENSE file.
  19. */
  20. #ifndef DISTRHO_PLUGIN_GLBARS_HPP_INCLUDED
  21. #define DISTRHO_PLUGIN_GLBARS_HPP_INCLUDED
  22. #include "DistrhoPlugin.hpp"
  23. #include "extra/Mutex.hpp"
  24. class DistrhoUIGLBars;
  25. struct glBarsState;
  26. START_NAMESPACE_DISTRHO
  27. // -----------------------------------------------------------------------
  28. class DistrhoPluginGLBars : public Plugin
  29. {
  30. public:
  31. DistrhoPluginGLBars();
  32. ~DistrhoPluginGLBars() override;
  33. protected:
  34. // -------------------------------------------------------------------
  35. // Information
  36. const char* getLabel() const noexcept override
  37. {
  38. return "glBars";
  39. }
  40. const char* getDescription() const override
  41. {
  42. return "OpenGL Bars";
  43. }
  44. const char* getMaker() const noexcept override
  45. {
  46. return "DISTRHO";
  47. }
  48. const char* getHomePage() const override
  49. {
  50. return "https://github.com/DISTRHO/GLBars";
  51. }
  52. const char* getLicense() const noexcept override
  53. {
  54. return "LGPL";
  55. }
  56. uint32_t getVersion() const noexcept override
  57. {
  58. return d_version(1, 0, 0);
  59. }
  60. int64_t getUniqueId() const noexcept override
  61. {
  62. return d_cconst('D', 'g', 'l', 'B');
  63. }
  64. // -------------------------------------------------------------------
  65. // Init
  66. void initParameter(uint32_t, Parameter&) override;
  67. // -------------------------------------------------------------------
  68. // Internal data
  69. float getParameterValue(uint32_t) const override;
  70. void setParameterValue(uint32_t, float) override;
  71. // -------------------------------------------------------------------
  72. // Process
  73. void run(const float** inputs, float** outputs, uint32_t frames) override;
  74. // -------------------------------------------------------------------
  75. private:
  76. Mutex fMutex;
  77. glBarsState* fState;
  78. float fParameters[kParameterCount];
  79. friend class DistrhoUIGLBars;
  80. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginGLBars)
  81. };
  82. // -----------------------------------------------------------------------
  83. END_NAMESPACE_DISTRHO
  84. #endif // DISTRHO_PLUGIN_GLBARS_HPP_INCLUDED