Collection of tools useful for audio production
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.

66 lines
1.6KB

  1. /*
  2. * Carla Native Plugins
  3. * Copyright (C) 2012 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the COPYING file
  16. */
  17. #include "carla_native.h"
  18. #include <stdlib.h>
  19. enum ByPassPorts {
  20. PORT_IN,
  21. PORT_OUT,
  22. PORT_MAX
  23. };
  24. struct ByPassInstance {
  25. };
  26. void bypass_init(struct _PluginDescriptor* _this_)
  27. {
  28. _this_->portCount = PORT_MAX;
  29. _this_->ports = malloc(sizeof(PluginPort) * PORT_MAX);
  30. _this_->ports[PORT_IN].type = PORT_TYPE_AUDIO;
  31. _this_->ports[PORT_IN].hints = 0;
  32. _this_->ports[PORT_IN].name = "in";
  33. _this_->ports[PORT_OUT].type = PORT_TYPE_AUDIO;
  34. _this_->ports[PORT_OUT].hints = PORT_HINT_IS_OUTPUT;
  35. _this_->ports[PORT_OUT].name = "out";
  36. }
  37. void bypass_fini(struct _PluginDescriptor* _this_)
  38. {
  39. free(_this_->ports);
  40. _this_->portCount = 0;
  41. _this_->ports = NULL;
  42. }
  43. static PluginDescriptor bypassDesc = {
  44. .category = PLUGIN_CATEGORY_NONE,
  45. .name = "ByPass",
  46. .label = "bypass",
  47. .portCount = 0,
  48. .ports = NULL,
  49. ._handle = NULL,
  50. ._init = NULL,
  51. ._fini = NULL
  52. };
  53. CARLA_REGISTER_NATIVE_PLUGIN(bypass, bypassDesc)