#include "plugin.h"
#include "jack_rack.h"
#include "process.h"
-#include "ui.h"
#define CONTROL_FIFO_SIZE 128
procinfo->chain_end = plugin->prev;
/* sort out the aux ports */
- if (plugin->desc->aux_channels > 0)
+ if (procinfo->jack_client && plugin->desc->aux_channels > 0)
{
plugin_t * other;
procinfo->chain_end = plugin;
}
- if (plugin->desc->aux_channels > 0)
+ if (procinfo->jack_client && plugin->desc->aux_channels > 0)
{
plugin_t * other;
other = up ? plugin->next : plugin->prev;
procinfo->chain_end = new_plugin;
/* sort out the aux ports */
- if (plugin->desc->aux_channels > 0)
+ if (procinfo->jack_client && plugin->desc->aux_channels > 0)
{
plugin_t * other;
aux_channel);
holder->aux_ports[i] =
- jack_port_register (jack_rack->ui->procinfo->jack_client,
+ jack_port_register (jack_rack->procinfo->jack_client,
port_name,
JACK_DEFAULT_AUDIO_TYPE,
desc->aux_are_input ? JackPortIsInput : JackPortIsOutput,
plugin->descriptor-> connect_port (instance, i, &unused_control_port_output);
}
- if (plugin->desc->aux_channels > 0)
+ if (jack_rack->procinfo->jack_client && plugin->desc->aux_channels > 0)
plugin_create_aux_ports (plugin, copy, jack_rack);
if (plugin->descriptor->activate)
plugin->next = NULL;
plugin->prev = NULL;
plugin->wet_dry_enabled = FALSE;
+ plugin->jack_rack = jack_rack;
/* create audio memory and wet/dry stuff */
plugin->audio_output_memory = g_malloc (sizeof (LADSPA_Data *) * jack_rack->channels);
void
-plugin_destroy (plugin_t * plugin, ui_t *ui)
+plugin_destroy (plugin_t * plugin)
{
unsigned long i, j;
int err;
}
/* aux ports */
- if (plugin->desc->aux_channels > 0)
+ if (plugin->jack_rack->procinfo->jack_client && plugin->desc->aux_channels > 0)
{
for (j = 0; j < plugin->desc->aux_channels; j++)
{
- err = jack_port_unregister (ui->procinfo->jack_client,
+ err = jack_port_unregister (plugin->jack_rack->procinfo->jack_client,
plugin->holders[i].aux_ports[j]);
if (err)
g_free (plugin->holders);
- for (i = 0; i < ui->jack_rack->channels; i++)
+ for (i = 0; i < plugin->jack_rack->channels; i++)
{
g_free (plugin->audio_output_memory[i]);
lff_free (plugin->wet_dry_fifos + i);