comparison DPF-Prymula-audioplugins/dpf/distrho/src/travesty/unit.h @ 3:84e66ea83026

DPF-Prymula-audioplugins-0.231015-2
author prymula <prymula76@outlook.com>
date Mon, 16 Oct 2023 21:53:34 +0200
parents
children
comparison
equal deleted inserted replaced
2:cf2cb71d31dd 3:84e66ea83026
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
17 #pragma once
18
19 #include "base.h"
20
21 #include "align_push.h"
22
23 struct v3_unit_info {
24 int32_t id; // 0 for root unit
25 int32_t parent_unit_id; // -1 for none
26 v3_str_128 name;
27 int32_t program_list_id; // -1 for none
28 };
29
30 struct v3_program_list_info {
31 int32_t id;
32 v3_str_128 name;
33 int32_t programCount;
34 };
35
36 struct v3_unit_information {
37 #ifndef __cplusplus
38 struct v3_funknown;
39 #endif
40 int32_t (V3_API* get_unit_count)(void* self);
41 v3_result (V3_API* get_unit_info)(void* self, int32_t unit_idx, v3_unit_info* info);
42 int32_t (V3_API* get_program_list_count)(void* self);
43 v3_result (V3_API* get_program_list_info)(void* self, int32_t list_idx, v3_program_list_info* info);
44 v3_result (V3_API* get_program_name)(void* self, int32_t list_id, int32_t program_idx, v3_str_128 name);
45 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);
46 v3_result (V3_API* has_program_pitch_names)(void* self, int32_t list_id, int32_t program_idx);
47 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);
48 int32_t (V3_API* get_selected_unit)(void* self);
49 v3_result (V3_API* select_unit)(void* self, int32_t unit_id);
50 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);
51 v3_result (V3_API* set_unit_program_data)(void* self, int32_t list_or_unit_id, int32_t program_idx, struct v3_bstream** data);
52 };
53
54 static constexpr const v3_tuid v3_unit_information_iid =
55 V3_ID(0x3D4BD6B5, 0x913A4FD2, 0xA886E768, 0xA5EB92C1);
56
57 #ifdef __cplusplus
58
59 /**
60 * C++ variants
61 */
62
63 struct v3_unit_information_cpp : v3_funknown {
64 v3_unit_information unit;
65 };
66
67 #endif
68
69 #include "align_pop.h"