forked from palob/patchmatrix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatchmatrix_db.h
More file actions
126 lines (92 loc) · 2.87 KB
/
patchmatrix_db.h
File metadata and controls
126 lines (92 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/*
* Copyright (c) 2016-2021 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License 2.0 as published by
* The Perl Foundation.
*
* This source is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the iapplied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Artistic License 2.0 for more details.
*
* You should have received a copy of the Artistic License 2.0
* along the source as a COPYING file. If not, obtain it from
* http://www.perlfoundation.org/artistic_license_2_0.
*/
#ifndef _PATCHMATRIX_DB_H
#define _PATCHMATRIX_DB_H
#include <patchmatrix.h>
// client
client_t *
_client_add(app_t *app, const char *client_name, int client_flags);
void
_client_free(app_t *app, client_t *client);
bool
_client_remove_cb(void *node, void *data);
void
_client_remove(app_t *app, client_t *client);
client_t *
_client_find_by_name(app_t *app, const char *client_name, int client_flags);
#ifdef JACK_HAS_METADATA_API
client_t *
_client_find_by_uuid(app_t *app, jack_uuid_t client_uuid, int client_flags);
#endif
port_t *
_client_find_port_by_name(client_t *client, const char *port_name);
void
_client_refresh_type(client_t *client);
void
_client_sort(client_t *client);
// client connection
client_conn_t *
_client_conn_add(app_t *app, client_t *source_client, client_t *sink_client);
void
_client_conn_free(client_conn_t *client_conn);
void
_client_conn_remove(app_t *app, client_conn_t *client_conn);
client_conn_t *
_client_conn_find(app_t *app, client_t *source_client, client_t *sink_client);
client_conn_t *
_client_conn_find_or_add(app_t *app, client_t *source_client, client_t *sink_client);
void
_client_conn_refresh_type(client_conn_t *client_conn);
// port connection
port_conn_t *
_port_conn_add(client_conn_t *client_conn, port_t *source_port, port_t *sink_port);
void
_port_conn_free(port_conn_t *port_conn);
port_conn_t *
_port_conn_find(client_conn_t *client_conn, port_t *source_port, port_t *sink_port);
void
_port_conn_remove(app_t *app, client_conn_t *client_conn, port_t *source_port, port_t *sink_port);
// port
port_t *
_port_add(app_t *app, jack_port_t *jport);
void
_port_free(port_t *port);
void
_port_remove(app_t *app, port_t *port);
port_t *
_port_find_by_name(app_t *app, const char *port_name);
#ifdef JACK_HAS_METADATA_API
port_t *
_port_find_by_uuid(app_t *app, jack_uuid_t port_uuid);
#endif
port_t *
_port_find_by_body(app_t *app, jack_port_t *body);
// mixer
void
_mixer_spawn(app_t *app, unsigned nsinks, unsigned nsources);
mixer_shm_t *
_mixer_add(const char *client_name);
void
_mixer_free(mixer_shm_t *mixer_shm);
// monitor
void
_monitor_spawn(app_t *app, unsigned nsinks);
monitor_shm_t *
_monitor_add(const char *client_name);
void
_monitor_free(monitor_shm_t *monitor_shm);
#endif