DISTRHO Plugin Framework
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.

72 lines
1.7KB

  1. /*
  2. * DISTRHO Plugin Framework (DPF)
  3. * Copyright (C) 2012-2019 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. #include "PluginMain.h"
  17. #include <string.h>
  18. ExamplePlugin::ExamplePlugin()
  19. : Plugin(0, 0, 0)
  20. {
  21. }
  22. const char *ExamplePlugin::getLabel() const
  23. {
  24. return "Cairo DPF Example";
  25. }
  26. const char *ExamplePlugin::getMaker() const
  27. {
  28. return "Jean Pierre Cimalando";
  29. }
  30. const char *ExamplePlugin::getLicense() const
  31. {
  32. return "ISC";
  33. }
  34. uint32_t ExamplePlugin::getVersion() const
  35. {
  36. return 0;
  37. }
  38. int64_t ExamplePlugin::getUniqueId() const
  39. {
  40. return 0;
  41. }
  42. void ExamplePlugin::initParameter(uint32_t, Parameter &)
  43. {
  44. }
  45. float ExamplePlugin::getParameterValue(uint32_t) const
  46. {
  47. return 0;
  48. }
  49. void ExamplePlugin::setParameterValue(uint32_t, float)
  50. {
  51. }
  52. void ExamplePlugin::run(const float **inputs, float **outputs, uint32_t frames)
  53. {
  54. memcpy(outputs[0], inputs[0], frames * sizeof(float));
  55. }
  56. Plugin *DISTRHO::createPlugin()
  57. {
  58. return new ExamplePlugin;
  59. }