Remove juce completely, cleanup
[carla.git] / source / jackbridge / JackBridge3.cpp
blob6340f86d4052c4c30e9690782ce6e6be05a6937f
1 /*
2 * JackBridge (Part 3, Export)
3 * Copyright (C) 2013-2023 Filipe Coelho <falktx@falktx.com>
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.
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.
17 #include "JackBridgeExport.hpp"
19 #include "CarlaUtils.hpp"
21 // --------------------------------------------------------------------------------------------------------------------
23 #if defined(CARLA_OS_WIN) && ! defined(__WINE__)
24 # define JACKBRIDGE_EXPORT extern "C" __declspec (dllexport)
25 #else
26 # define JACKBRIDGE_EXPORT extern "C" __attribute__ ((visibility("default")))
27 #endif
29 // --------------------------------------------------------------------------------------------------------------------
31 JACKBRIDGE_EXPORT
32 const JackBridgeExportedFunctions* JACKBRIDGE_API jackbridge_get_exported_functions();
34 JACKBRIDGE_EXPORT
35 const JackBridgeExportedFunctions* JACKBRIDGE_API jackbridge_get_exported_functions()
37 static JackBridgeExportedFunctions funcs;
38 carla_zeroStruct(funcs);
40 funcs.init_ptr = jackbridge_init;
41 funcs.get_version_ptr = jackbridge_get_version;
42 funcs.get_version_string_ptr = jackbridge_get_version_string;
43 funcs.client_open_ptr = jackbridge_client_open;
44 funcs.client_close_ptr = jackbridge_client_close;
45 funcs.client_name_size_ptr = jackbridge_client_name_size;
46 funcs.get_client_name_ptr = jackbridge_get_client_name;
47 funcs.client_get_uuid_ptr = jackbridge_client_get_uuid;
48 funcs.get_uuid_for_client_name_ptr = jackbridge_get_uuid_for_client_name;
49 funcs.get_client_name_by_uuid_ptr = jackbridge_get_client_name_by_uuid;
50 funcs.uuid_parse_ptr = jackbridge_uuid_parse;
51 funcs.uuid_unparse_ptr = jackbridge_uuid_unparse;
52 funcs.activate_ptr = jackbridge_activate;
53 funcs.deactivate_ptr = jackbridge_deactivate;
54 funcs.is_realtime_ptr = jackbridge_is_realtime;
55 funcs.set_thread_init_callback_ptr = jackbridge_set_thread_init_callback;
56 funcs.on_shutdown_ptr = jackbridge_on_shutdown;
57 funcs.on_info_shutdown_ptr = jackbridge_on_info_shutdown;
58 funcs.set_process_callback_ptr = jackbridge_set_process_callback;
59 funcs.set_freewheel_callback_ptr = jackbridge_set_freewheel_callback;
60 funcs.set_buffer_size_callback_ptr = jackbridge_set_buffer_size_callback;
61 funcs.set_sample_rate_callback_ptr = jackbridge_set_sample_rate_callback;
62 funcs.set_client_registration_callback_ptr = jackbridge_set_client_registration_callback;
63 funcs.set_port_registration_callback_ptr = jackbridge_set_port_registration_callback;
64 funcs.set_port_rename_callback_ptr = jackbridge_set_port_rename_callback;
65 funcs.set_port_connect_callback_ptr = jackbridge_set_port_connect_callback;
66 funcs.set_graph_order_callback_ptr = jackbridge_set_graph_order_callback;
67 funcs.set_xrun_callback_ptr = jackbridge_set_xrun_callback;
68 funcs.set_latency_callback_ptr = jackbridge_set_latency_callback;
69 funcs.set_freewheel_ptr = jackbridge_set_freewheel;
70 funcs.set_buffer_size_ptr = jackbridge_set_buffer_size;
71 funcs.get_sample_rate_ptr = jackbridge_get_sample_rate;
72 funcs.get_buffer_size_ptr = jackbridge_get_buffer_size;
73 funcs.cpu_load_ptr = jackbridge_cpu_load;
74 funcs.port_register_ptr = jackbridge_port_register;
75 funcs.port_unregister_ptr = jackbridge_port_unregister;
76 funcs.port_get_buffer_ptr = jackbridge_port_get_buffer;
77 funcs.port_name_ptr = jackbridge_port_name;
78 funcs.port_uuid_ptr = jackbridge_port_uuid;
79 funcs.port_short_name_ptr = jackbridge_port_short_name;
80 funcs.port_flags_ptr = jackbridge_port_flags;
81 funcs.port_type_ptr = jackbridge_port_type;
82 funcs.port_is_mine_ptr = jackbridge_port_is_mine;
83 funcs.port_connected_ptr = jackbridge_port_connected;
84 funcs.port_connected_to_ptr = jackbridge_port_connected_to;
85 funcs.port_get_connections_ptr = jackbridge_port_get_connections;
86 funcs.port_get_all_connections_ptr = jackbridge_port_get_all_connections;
87 funcs.port_rename_ptr = jackbridge_port_rename;
88 funcs.port_set_alias_ptr = jackbridge_port_set_alias;
89 funcs.port_unset_alias_ptr = jackbridge_port_unset_alias;
90 funcs.port_get_aliases_ptr = jackbridge_port_get_aliases;
91 funcs.port_request_monitor_ptr = jackbridge_port_request_monitor;
92 funcs.port_request_monitor_by_name_ptr = jackbridge_port_request_monitor_by_name;
93 funcs.port_ensure_monitor_ptr = jackbridge_port_ensure_monitor;
94 funcs.port_monitoring_input_ptr = jackbridge_port_monitoring_input;
95 funcs.connect_ptr = jackbridge_connect;
96 funcs.disconnect_ptr = jackbridge_disconnect;
97 funcs.port_disconnect_ptr = jackbridge_port_disconnect;
98 funcs.port_name_size_ptr = jackbridge_port_name_size;
99 funcs.port_type_size_ptr = jackbridge_port_type_size;
100 funcs.port_type_get_buffer_size_ptr = jackbridge_port_type_get_buffer_size;
101 funcs.port_get_latency_range_ptr = jackbridge_port_get_latency_range;
102 funcs.port_set_latency_range_ptr = jackbridge_port_set_latency_range;
103 funcs.recompute_total_latencies_ptr = jackbridge_recompute_total_latencies;
104 funcs.get_ports_ptr = jackbridge_get_ports;
105 funcs.port_by_name_ptr = jackbridge_port_by_name;
106 funcs.port_by_id_ptr = jackbridge_port_by_id;
107 funcs.free_ptr = jackbridge_free;
108 funcs.midi_get_event_count_ptr = jackbridge_midi_get_event_count;
109 funcs.midi_event_get_ptr = jackbridge_midi_event_get;
110 funcs.midi_clear_buffer_ptr = jackbridge_midi_clear_buffer;
111 funcs.midi_event_write_ptr = jackbridge_midi_event_write;
112 funcs.midi_event_reserve_ptr = jackbridge_midi_event_reserve;
113 funcs.release_timebase_ptr = jackbridge_release_timebase;
114 funcs.set_sync_callback_ptr = jackbridge_set_sync_callback;
115 funcs.set_sync_timeout_ptr = jackbridge_set_sync_timeout;
116 funcs.set_timebase_callback_ptr = jackbridge_set_timebase_callback;
117 funcs.transport_locate_ptr = jackbridge_transport_locate;
118 funcs.transport_query_ptr = jackbridge_transport_query;
119 funcs.get_current_transport_frame_ptr = jackbridge_get_current_transport_frame;
120 funcs.transport_reposition_ptr = jackbridge_transport_reposition;
121 funcs.transport_start_ptr = jackbridge_transport_start;
122 funcs.transport_stop_ptr = jackbridge_transport_stop;
123 funcs.set_property_ptr = jackbridge_set_property;
124 funcs.get_property_ptr = jackbridge_get_property;
125 funcs.free_description_ptr = jackbridge_free_description;
126 funcs.get_properties_ptr = jackbridge_get_properties;
127 funcs.get_all_properties_ptr = jackbridge_get_all_properties;
128 funcs.remove_property_ptr = jackbridge_remove_property;
129 funcs.remove_properties_ptr = jackbridge_remove_properties;
130 funcs.remove_all_properties_ptr = jackbridge_remove_all_properties;
131 funcs.set_property_change_callback_ptr = jackbridge_set_property_change_callback;
132 funcs.sem_init_ptr = jackbridge_sem_init;
133 funcs.sem_destroy_ptr = jackbridge_sem_destroy;
134 funcs.sem_connect_ptr = jackbridge_sem_connect;
135 funcs.sem_post_ptr = jackbridge_sem_post;
136 funcs.sem_timedwait_ptr = jackbridge_sem_timedwait;
137 funcs.shm_is_valid_ptr = jackbridge_shm_is_valid;
138 funcs.shm_init_ptr = jackbridge_shm_init;
139 funcs.shm_attach_ptr = jackbridge_shm_attach;
140 funcs.shm_close_ptr = jackbridge_shm_close;
141 funcs.shm_map_ptr = jackbridge_shm_map;
142 funcs.shm_unmap_ptr = jackbridge_shm_unmap;
143 funcs.discovery_pipe_create_ptr = jackbridge_discovery_pipe_create;
144 funcs.discovery_pipe_message_ptr = jackbridge_discovery_pipe_message;
145 funcs.discovery_pipe_destroy_ptr = jackbridge_discovery_pipe_destroy;
146 funcs.parent_deathsig_ptr = jackbridge_parent_deathsig;
148 funcs.unique1 = funcs.unique2 = funcs.unique3 = 0xdeadf00d;
150 return &funcs;
153 // --------------------------------------------------------------------------------------------------------------------