/*
- * jack-ladspa-host
- *
- * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * JACK Rack
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Original:
+ * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net)
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Modification for MLT:
+ * Copyright (C) 2004 Ushodaya Enterprises Limited
+ * Author: Dan Dennedy <dan@dennedy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdio.h>
#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);