Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
control_room.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2021 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9#ifndef __AUDIO_CONTROL_ROOM_H__
10#define __AUDIO_CONTROL_ROOM_H__
11
12#include "dsp/fader.h"
13
14typedef struct AudioEngine AudioEngine;
15
22#define CONTROL_ROOM_SCHEMA_VERSION 2
23
24#define CONTROL_ROOM (AUDIO_ENGINE->control_room)
25
26#define control_room_is_in_active_project(self) \
27 (self->audio_engine && engine_is_in_active_project (self->audio_engine))
28
35typedef struct ControlRoom
36{
37 int schema_version;
38
44
50
57
60
70
71 char * hw_out_l_id;
72 char * hw_out_r_id;
73
74 /* caches */
75 ExtPort * hw_out_l;
76 ExtPort * hw_out_r;
77
81
82static const cyaml_schema_field_t control_room_fields_schema[] = {
83 YAML_FIELD_INT (ControlRoom, schema_version),
84 YAML_FIELD_MAPPING_PTR (ControlRoom, monitor_fader, fader_fields_schema),
85
86 CYAML_FIELD_END
87};
88
89static const cyaml_schema_value_t control_room_schema = {
90 YAML_VALUE_PTR (ControlRoom, control_room_fields_schema),
91};
92
96COLD NONNULL_ARGS (
97 1) void control_room_init_loaded (ControlRoom * self, AudioEngine * engine);
98
102COLD WARN_UNUSED_RESULT ControlRoom *
104
109void
111
115NONNULL ControlRoom *
117
118void
119control_room_free (ControlRoom * self);
120
125#endif
Backend for faders or other volume/gain controls.
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
void control_room_set_dim_output(ControlRoom *self, int dim_output)
Sets dim_output to on/off and notifies interested parties.
NONNULL ControlRoom * control_room_clone(const ControlRoom *src)
Used during serialization.
COLD WARN_UNUSED_RESULT ControlRoom * control_room_new(AudioEngine *engine)
Creates a new control room.
#define YAML_FIELD_MAPPING_PTR(owner, member, schema)
Mapping pointer to a struct.
Definition yaml.h:37
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
Definition yaml.h:202
The audio engine.
Definition engine.h:364
The control room allows to specify how Listen will work on each Channel and to set overall volume aft...
Fader * dim_fader
The volume to set other channels to when Listen is enabled on a Channel, or the monitor when dim is e...
AudioEngine * audio_engine
Pointer to owner audio engine, if any.
Fader * listen_fader
The volume to set listened channels to when Listen is enabled on a Channel.
Fader * monitor_fader
Monitor fader.
bool dim_output
Dim the output volume.
Fader * mute_fader
The volume to set muted channels to when soloing/muting.
External port.
Definition ext_port.h:77
A Fader is a processor that is used for volume controls and pan.
Definition fader.h:118