4#ifndef __AUDIO_EXT_PORT_H__
5#define __AUDIO_EXT_PORT_H__
13#include "zrythm-config.h"
24# include "weak_libjack.h"
31typedef struct WindowsMmeDevice WindowsMmeDevice;
40#define EXT_PORT_SCHEMA_VERSION 1
47#define EXT_PORTS_MAX 1024
49#define ext_port_is_in_active_project(self) \
51 && hw_processor_is_in_active_project ((self)->hw_processor))
60 EXT_PORT_TYPE_WINDOWS_MME,
62 EXT_PORT_TYPE_RTAUDIO,
100 WindowsMmeDevice * mme_dev;
116 bool rtaudio_is_duplex;
119 RtAudioDevice * rtaudio_dev;
128 RtMidiDevice * rtmidi_dev;
237ext_port_new_from_jack_port (jack_port_t * jport);
Backend for faders or other volume/gain controls.
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
ExtPortType
External port type.
void ext_ports_free(ExtPort **ext_port, int size)
Frees an array of ExtPort pointers.
int ext_port_activate(ExtPort *self, Port *port, bool activate)
Activates the port (starts receiving data) or deactivates it.
ZPortType
Type of signals the Port handles.
bool ext_port_get_enabled(ExtPort *self)
Checks in the GSettings whether this port is marked as enabled by the user.
void ext_port_clear_buffer(ExtPort *ext_port, nframes_t nframes)
Clears the buffer of the external port.
ExtPort * ext_port_clone(ExtPort *ext_port)
Creates a shallow clone of the port.
void ext_port_disconnect(ExtPort *ext_port, Port *port, int src)
Disconnects the Port from the ExtPort.
void ext_ports_get(ZPortType type, ZPortFlow flow, bool hw, GPtrArray *ports)
Collects external ports of the given type.
float * ext_port_get_buffer(ExtPort *ext_port, nframes_t nframes)
Returns the buffer of the external port.
void ext_port_print(ExtPort *self)
Prints the port info.
ZPortFlow
Direction of the signal.
void ext_port_free(ExtPort *ext_port)
Frees the ext_port.
bool ext_port_matches_backend(ExtPort *self)
Returns if the ext port matches the current backend.
uint32_t nframes_t
Frame count.
bool is_midi
True if MIDI, false if audio.
int hw_processor_index
Index in the HW processor (cache for real-time use)
HardwareProcessor * hw_processor
Pointer to owner hardware processor, if any.
char * short_name
Short port name.
unsigned int rtaudio_id
RtAudio device ID (NOT index!!!).
unsigned int rtaudio_channel_idx
RtAudio channel index.
char * full_name
Full port name, used also as ID.
char * alias2
Alias #2 if any.
char * rtaudio_dev_name
RtAudio device name.
unsigned int rtmidi_id
RtMidi port index.
char * alias1
Alias #1 if any.
bool active
Whether the port is active and receiving events (for use by hw processor).
bool rtaudio_is_input
Whether the channel is input.
bool pending_reconnect
Set to true when a hardware port is disconnected.
Port * port
Temporary port to receive data.
Must ONLY be created via port_new()