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.

failed_instantiation.c 1.7KB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. Lilv Test Plugin - Failed instantiation
  3. Copyright 2011-2016 David Robillard <d@drobilla.net>
  4. Permission to use, copy, modify, and/or distribute this software for any
  5. purpose with or without fee is hereby granted, provided that the above
  6. copyright notice and this permission notice appear in all copies.
  7. THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #include <stdlib.h>
  16. #include "lv2/lv2plug.in/ns/lv2core/lv2.h"
  17. #define PLUGIN_URI "http://example.org/failed-instantiation"
  18. enum {
  19. TEST_INPUT = 0,
  20. TEST_OUTPUT = 1
  21. };
  22. typedef struct {
  23. float* input;
  24. float* output;
  25. } Test;
  26. static void
  27. cleanup(LV2_Handle instance)
  28. {}
  29. static void
  30. connect_port(LV2_Handle instance, uint32_t port, void* data)
  31. {}
  32. static LV2_Handle
  33. instantiate(const LV2_Descriptor* descriptor,
  34. double rate,
  35. const char* path,
  36. const LV2_Feature* const* features)
  37. {
  38. return NULL;
  39. }
  40. static void
  41. run(LV2_Handle instance, uint32_t sample_count)
  42. {}
  43. static const LV2_Descriptor descriptor = {
  44. PLUGIN_URI,
  45. instantiate,
  46. connect_port,
  47. NULL, // activate,
  48. run,
  49. NULL, // deactivate,
  50. cleanup,
  51. NULL // extension_data
  52. };
  53. LV2_SYMBOL_EXPORT
  54. const LV2_Descriptor* lv2_descriptor(uint32_t index)
  55. {
  56. return (index == 0) ? &descriptor : NULL;
  57. }