LV2 Extensions
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.

73 lines
2.6KB

  1. /*
  2. LV2 ControlInputPort change request extension
  3. Copyright 2020 Filipe Coelho <falktx@falktx.com>
  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. /**
  16. @file control-input-port-change-request.h
  17. C header for the LV2 ControlInputPort change request extension <http://kx.studio/ns/lv2ext/control-input-port-change-request>.
  18. */
  19. #ifndef LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H
  20. #define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H
  21. #include "lv2/lv2plug.in/ns/lv2core/lv2.h"
  22. #define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI "http://kx.studio/ns/lv2ext/control-input-port-change-request"
  23. #define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_PREFIX LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI "#"
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #else
  27. #include <stdbool.h>
  28. #endif
  29. typedef void* LV2_ControlInputPort_Change_Request_Handle;
  30. /**
  31. * On instantiation, host must supply LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI feature.
  32. * LV2_Feature::data must be pointer to LV2_ControlInputPort_Change_Request.
  33. */
  34. typedef struct _LV2_ControlInputPort_Change_Request {
  35. /**
  36. * Opaque host data.
  37. */
  38. LV2_ControlInputPort_Change_Request_Handle handle;
  39. /**
  40. * request_change()
  41. *
  42. * Ask the host to change a plugin's control input port value.
  43. * Parameter handle MUST be the 'handle' member of this struct.
  44. * Parameter index is port index to change.
  45. * Parameter value is the requested value to change the control port input to.
  46. *
  47. * Returns true if the operation succeeded.
  48. * The host may decline this request, if e.g. it is currently automating this port.
  49. *
  50. * The plugin MUST call this function during run().
  51. */
  52. bool (*request_change)(LV2_ControlPortChangeRequest_Handle handle,
  53. uint32_t index,
  54. float value);
  55. } LV2_ControlInputPort_Change_Request;
  56. #ifdef __cplusplus
  57. } /* extern "C" */
  58. #endif
  59. #endif /* LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H */