10#ifndef __AUDIO_HARDWARE_PROCESSOR_H__
11#define __AUDIO_HARDWARE_PROCESSOR_H__
16#include "gtk_wrapper.h"
26#define HW_PROCESSOR_SCHEMA_VERSION 1
28#define HW_IN_PROCESSOR (AUDIO_ENGINE->hw_in_processor)
29#define HW_OUT_PROCESSOR (AUDIO_ENGINE->hw_out_processor)
31#define hw_processor_is_in_active_project(self) \
32 (self->engine && engine_is_in_active_project ((self)->engine))
57 int num_selected_midi_ports;
58 char ** selected_audio_ports;
59 int num_selected_audio_ports;
65 int num_ext_audio_ports;
66 size_t ext_audio_ports_size;
68 int num_ext_midi_ports;
69 size_t ext_midi_ports_size;
86 guint rescan_timeout_id;
93COLD
NONNULL_ARGS (1) void hardware_processor_init_loaded (
Ports that transfer audio/midi/other signals to one another.
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
void hardware_processor_activate(HardwareProcessor *self, bool activate)
Starts or stops the ports.
ExtPort * hardware_processor_find_ext_port(HardwareProcessor *self, const char *id)
Finds an ext port from its ID (type + full name).
int hardware_processor_setup(HardwareProcessor *self)
Sets up the ports but does not start them.
COLD WARN_UNUSED_RESULT HardwareProcessor * hardware_processor_new(bool input, AudioEngine *engine)
Returns a new empty instance.
Port * hardware_processor_find_port(HardwareProcessor *self, const char *id)
Finds a port from its ID (type + full name).
REALTIME void hardware_processor_process(HardwareProcessor *self, nframes_t nframes)
Processes the data.
bool hardware_processor_rescan_ext_ports(HardwareProcessor *self)
Rescans the hardware ports and appends any missing ones.
HardwareProcessor * hardware_processor_clone(const HardwareProcessor *src)
To be used during serialization.
uint32_t nframes_t
Frame count.
Port ** audio_ports
Ports to be used by Zrythm, corresponding to the external ports.
bool activated
Whether currently active.
bool setup
Whether set up already.
bool is_input
Whether this is the processor at the start of the graph (input) or at the end (output).
char ** selected_midi_ports
Ports selected by the user in the preferences to enable.
ExtPort ** ext_audio_ports
All known external ports.
AudioEngine * engine
Pointer to owner engine, if any.
Must ONLY be created via port_new()