Audio plugin host https://kx.studio/carla
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.

94 lines
2.5KB

  1. /*
  2. * Carla Native Plugins
  3. * Copyright (C) 2012-2013 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or 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 doc/GPL.txt file.
  16. */
  17. #include "CarlaNative.h"
  18. #include <string.h>
  19. // -----------------------------------------------------------------------
  20. static PluginHandle bypass_instantiate(const PluginHostDescriptor* host)
  21. {
  22. // dummy, return non-NULL
  23. return (PluginHandle)host;
  24. }
  25. static void bypass_process(PluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const Event* events, uint32_t eventCount)
  26. {
  27. memcpy(outBuffer[0], inBuffer[0], sizeof(float)*frames);
  28. return;
  29. // unused
  30. (void)handle;
  31. (void)events;
  32. (void)eventCount;
  33. }
  34. // -----------------------------------------------------------------------
  35. static const PluginDescriptor bypassDesc = {
  36. .api = CARLA_NATIVE_API_VERSION,
  37. .categories = NULL,
  38. .features = "rtsafe",
  39. .supports = NULL,
  40. .metadata = NULL,
  41. .audioIns = 1,
  42. .audioOuts = 1,
  43. .midiIns = 0,
  44. .midiOuts = 0,
  45. .paramIns = 0,
  46. .paramOuts = 0,
  47. .author = "falkTX",
  48. .name = "ByPass",
  49. .label = "bypass",
  50. .copyright = "GNU GPL v2+",
  51. .version = 0x1000,
  52. .instantiate = bypass_instantiate,
  53. .cleanup = NULL,
  54. .get_parameter_count = NULL,
  55. .get_parameter_info = NULL,
  56. .get_parameter_value = NULL,
  57. .get_parameter_text = NULL,
  58. .set_parameter_value = NULL,
  59. .get_midi_program_count = NULL,
  60. .get_midi_program_info = NULL,
  61. .set_midi_program = NULL,
  62. .idle = NULL,
  63. .get_state = NULL,
  64. .set_state = NULL,
  65. .activate = NULL,
  66. .deactivate = NULL,
  67. .process = bypass_process,
  68. .dispatcher = NULL
  69. };
  70. // -----------------------------------------------------------------------
  71. void carla_register_native_plugin_bypass()
  72. {
  73. carla_register_native_plugin(&bypassDesc);
  74. }
  75. // -----------------------------------------------------------------------