Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
port_connection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2021-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __AUDIO_PORT_CONNECTION_H__
11#define __AUDIO_PORT_CONNECTION_H__
12
13#include "zrythm-config.h"
14
15#include "dsp/port_identifier.h"
16#include "utils/yaml.h"
17
27typedef struct PortConnection
28{
29 PortIdentifier * src_id;
30 PortIdentifier * dest_id;
31
39
48 bool locked;
49
56 bool enabled;
57
61
63port_connection_new (
64 const PortIdentifier * src,
65 const PortIdentifier * dest,
66 float multiplier,
67 bool locked,
68 bool enabled);
69
70NONNULL void
71port_connection_update (
72 PortConnection * self,
73 float multiplier,
74 bool locked,
75 bool enabled);
76
77NONNULL bool
78port_connection_is_send (const PortConnection * self);
79
80NONNULL void
81port_connection_print_to_str (
82 const PortConnection * self,
83 char * buf,
84 size_t buf_sz);
85
86NONNULL void
87port_connection_print (const PortConnection * self);
88
92NONNULL PortConnection *
94
98NONNULL void
100
105#endif /* __AUDIO_PORT_CONNECTION_H__ */
NONNULL PortConnection * port_connection_clone(const PortConnection *src)
To be used during serialization.
NONNULL void port_connection_free(PortConnection *self)
Deletes port, doing required cleanup and updating counters.
Port identifier.
A connection between two ports.
bool enabled
Whether the connection is enabled.
float multiplier
Multiplier to apply, where applicable.
bool locked
Whether the connection can be removed or the multiplier edited by the user.
float base_value
Used for CV -> control port connections.
Struct used to identify Ports in the project.
YAML utils.