plugins/plugin.h file

Contents

Base plugin.

Classes

struct Plugin
The base plugin Inheriting plugins must have this as a child.

Typedefs

using Plugin = struct Plugin
The base plugin Inheriting plugins must have this as a child.

Functions

void plugin_add_automation_track(Plugin* self, AutomationTrack* at)
Adds an AutomationTrack to the Plugin.
void plugin_add_in_port(Plugin* pl, Port* port)
Adds an in port to the plugin's list.
void plugin_add_out_port(Plugin* pl, Port* port)
Adds an out port to the plugin's list.
auto plugin_new_from_descr(PluginDescriptor* descr, int track_pos, int slot) -> Plugin*
Creates/initializes a plugin and its internal plugin (LV2, etc.) using the given descriptor.
auto plugin_new_dummy(ZPluginCategory cat, int track_pos, int slot) -> Plugin*
Create a dummy plugin for tests.
void plugin_set_ui_refresh_rate(Plugin* self)
Sets the UI refresh rate on the Plugin.
auto plugin_get_enabled_port(Plugin* self) -> Port*
Gets the enable/disable port for this plugin.
void plugin_remove_ats_from_automation_tracklist(Plugin* pl, bool free_ats, bool fire_events)
Removes the automation tracks associated with this plugin from the automation tracklist in the corresponding track.
auto plugin_clone(Plugin* pl, bool src_is_project) -> Plugin*
Clones the given plugin.
auto plugin_activate(Plugin* pl, bool activate) -> int
Activates or deactivates the plugin.
void plugin_move(Plugin* pl, Track* track, PluginSlotType slot_type, int slot)
Moves the plugin to the given slot in the given channel.
void plugin_set_track_and_slot(Plugin* pl, int track_pos, PluginSlotType slot_type, int slot)
Sets the channel and slot on the plugin and its ports.
auto plugin_descriptor_is_instrument(const PluginDescriptor* descr) -> int
Returns if the Plugin is an instrument or not.
void plugin_move_automation(Plugin* pl, Track* prev_track, Track* track, PluginSlotType new_slot_type, int new_slot)
Moves the Plugin's automation from one Channel to another.
void plugin_expose_ports(Plugin* pl, bool expose, bool inputs, bool outputs)
Exposes or unexposes plugin ports to the backend.
auto plugin_get_escaped_name(Plugin* pl) -> char*
Returns the escaped name of the plugin.
auto plugin_get_abs_state_dir(Plugin* self, bool is_backup) -> char*
Returns the state dir as an absolute path.
void plugin_ensure_state_dir(Plugin* self, bool is_backup)
Ensures the state dir exists or creates it.
void plugin_update_identifier(Plugin* self)
To be called when changes to the plugin identifier were made, so we can update all children recursively.
void plugin_update_latency(Plugin* pl)
Updates the plugin's latency.
void plugin_generate_automation_tracks(Plugin* plugin, Track* track)
Generates automatables for the plugin.
void plugin_prepare_process(Plugin* self)
Prepare plugin for processing.
auto plugin_instantiate(Plugin* self, bool project, LilvState* state) -> int
Loads the plugin from its state file.
void plugin_set_track_pos(Plugin* pl, int pos)
Sets the track and track_pos on the plugin.
void plugin_process(Plugin* plugin, const long g_start_frames, const nframes_t local_offset, const nframes_t nframes)
Process plugin.
void plugin_open_ui(Plugin* plugin)
Process show ui.
auto plugin_is_selected(Plugin* pl) -> int
Returns if Plugin exists in MixerSelections.
auto plugin_is_enabled(Plugin* self) -> bool
Returns whether the plugin is enabled.
void plugin_process_passthrough(Plugin* self, const long g_start_frames, const nframes_t local_offset, const nframes_t nframes)
Processes the plugin by passing through the input to its output.
auto plugin_get_event_ports(Plugin* pl, Port** ports, int input) -> int
Returns the event ports in the plugin.
void plugin_close_ui(Plugin* plugin)
Process hide ui.
void plugin_update_automatables(Plugin* plugin)
(re)Generates automatables for the plugin.
void plugin_connect_to_plugin(Plugin* src, Plugin* dest)
Connect the output Ports of the given source Plugin to the input Ports of the given destination Plugin.
void plugin_disconnect_from_plugin(Plugin* src, Plugin* dest)
Disconnect the automatic connections from the given source Plugin to the given destination Plugin.
void plugin_connect_to_prefader(Plugin* pl, Channel* ch)
Connects the Plugin's output Port's to the input Port's of the given Channel's prefader.
void plugin_disconnect_from_prefader(Plugin* pl, Channel* ch)
Disconnect the automatic connections from the Plugin to the Channel's prefader (if last Plugin).
void plugin_disconnect(Plugin* plugin)
To be called immediately when a channel or plugin is deleted.
void plugin_delete_state_files(Plugin* self)
Deletes any state files associated with this plugin.
auto plugin_cleanup(Plugin* self) -> int
Cleans up an instantiated but not activated plugin.
void plugin_free(Plugin* plugin)
Frees given plugin, breaks all its port connections, and frees its ports and other internal pointers.

Defines

#define PLUGIN_MIN_REFRESH_RATE
Plugin UI refresh rate limits.