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.

70 lines
2.6KB

  1. /*
  2. * travesty, pure C VST3-compatible interface
  3. * Copyright (C) 2021-2022 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. #pragma once
  17. #include "base.h"
  18. #include "align_push.h"
  19. struct v3_unit_info {
  20. int32_t id; // 0 for root unit
  21. int32_t parent_unit_id; // -1 for none
  22. v3_str_128 name;
  23. int32_t program_list_id; // -1 for none
  24. };
  25. struct v3_program_list_info {
  26. int32_t id;
  27. v3_str_128 name;
  28. int32_t programCount;
  29. };
  30. struct v3_unit_information {
  31. #ifndef __cplusplus
  32. struct v3_funknown;
  33. #endif
  34. int32_t (V3_API* get_unit_count)(void* self);
  35. v3_result (V3_API* get_unit_info)(void* self, int32_t unit_idx, v3_unit_info* info);
  36. int32_t (V3_API* get_program_list_count)(void* self);
  37. v3_result (V3_API* get_program_list_info)(void* self, int32_t list_idx, v3_program_list_info* info);
  38. v3_result (V3_API* get_program_name)(void* self, int32_t list_id, int32_t program_idx, v3_str_128 name);
  39. v3_result (V3_API* get_program_info)(void* self, int32_t list_id, int32_t program_idx, const char *attribute_id, v3_str_128 attribute_value);
  40. v3_result (V3_API* has_program_pitch_names)(void* self, int32_t list_id, int32_t program_idx);
  41. v3_result (V3_API* get_program_pitch_name)(void* self, int32_t list_id, int32_t program_idx, int16_t midi_pitch, v3_str_128 name);
  42. int32_t (V3_API* get_selected_unit)(void* self);
  43. v3_result (V3_API* select_unit)(void* self, int32_t unit_id);
  44. v3_result (V3_API* get_unit_by_bus)(void* self, int32_t type, int32_t bus_direction, int32_t bus_idx, int32_t channel, int32_t* unit_id);
  45. v3_result (V3_API* set_unit_program_data)(void* self, int32_t list_or_unit_id, int32_t program_idx, struct v3_bstream** data);
  46. };
  47. static constexpr const v3_tuid v3_unit_information_iid =
  48. V3_ID(0x3D4BD6B5, 0x913A4FD2, 0xA886E768, 0xA5EB92C1);
  49. #ifdef __cplusplus
  50. /**
  51. * C++ variants
  52. */
  53. struct v3_unit_information_cpp : v3_funknown {
  54. v3_unit_information unit;
  55. };
  56. #endif
  57. #include "align_pop.h"