Renamed Insert to Processor and Redirect to IOProcessor.

git-svn-id: svn://localhost/ardour2/trunk@2071 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2007-06-27 20:23:48 +00:00
parent 09264537c4
commit 05bcdd1d4c
68 changed files with 2525 additions and 2547 deletions

View file

@ -51,7 +51,7 @@
<Option name="time-stretch-fill" value="e2b5b596"/> <Option name="time-stretch-fill" value="e2b5b596"/>
<Option name="time-stretch-outline" value="63636396"/> <Option name="time-stretch-outline" value="63636396"/>
<Option name="automation line" value="44bc59ff"/> <Option name="automation line" value="44bc59ff"/>
<Option name="redirect automation line" value="7aa3f9ff"/> <Option name="processor automation line" value="7aa3f9ff"/>
<Option name="control point fill" value="000000ff"/> <Option name="control point fill" value="000000ff"/>
<Option name="control point outline" value="000000ff"/> <Option name="control point outline" value="000000ff"/>
<Option name="entered control point outline" value="ff0000ee"/> <Option name="entered control point outline" value="ff0000ee"/>

View file

@ -168,9 +168,9 @@ plugin_selector.cc
plugin_ui.cc plugin_ui.cc
prompter.cc prompter.cc
public_editor.cc public_editor.cc
redirect_automation_line.cc plugin_automation_line.cc
redirect_automation_time_axis.cc processor_automation_time_axis.cc
redirect_box.cc processor_box.cc
region_gain_line.cc region_gain_line.cc
region_selection.cc region_selection.cc
region_view.cc region_view.cc
@ -178,7 +178,7 @@ audio_region_view.cc
midi_region_view.cc midi_region_view.cc
tape_region_view.cc tape_region_view.cc
route_params_ui.cc route_params_ui.cc
route_redirect_selection.cc route_processor_selection.cc
route_ui.cc route_ui.cc
selection.cc selection.cc
sfdb_ui.cc sfdb_ui.cc

View file

@ -74,7 +74,7 @@ void
ARDOUR_UI::setup_keybindings () ARDOUR_UI::setup_keybindings ()
{ {
install_actions (); install_actions ();
RedirectBox::register_actions (); ProcessorBox::register_actions ();
cerr << "loading bindings from " << keybindings_path << endl; cerr << "loading bindings from " << keybindings_path << endl;

View file

@ -19,7 +19,7 @@
*/ */
#include <ardour/audio_unit.h> #include <ardour/audio_unit.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <gtkmm2ext/doi.h> #include <gtkmm2ext/doi.h>
@ -123,7 +123,7 @@ AUPluginUI::~AUPluginUI ()
} }
void void
AUPluginUI::plugin_going_away (ARDOUR::Redirect* ignored) AUPluginUI::plugin_going_away (ARDOUR::IOProcessor* ignored)
{ {
ENSURE_GUI_THREAD(bind (mem_fun(*this, &AUPluginUI::plugin_going_away), ignored)); ENSURE_GUI_THREAD(bind (mem_fun(*this, &AUPluginUI::plugin_going_away), ignored));

View file

@ -28,7 +28,7 @@
namespace ARDOUR { namespace ARDOUR {
class AUPlugin; class AUPlugin;
class PluginInsert; class PluginInsert;
class Redirect; class IOProcessor;
} }
class AUPluginUI class AUPluginUI
@ -41,7 +41,7 @@ class AUPluginUI
WindowRef wr; WindowRef wr;
boost::shared_ptr<ARDOUR::AUPlugin> au; boost::shared_ptr<ARDOUR::AUPlugin> au;
void plugin_going_away (ARDOUR::Redirect*); void plugin_going_away (ARDOUR::IOProcessor*);
Component get_carbon_view_component(OSType subtype); Component get_carbon_view_component(OSType subtype);
}; };

View file

@ -39,7 +39,7 @@
#include <ardour/audioplaylist.h> #include <ardour/audioplaylist.h>
#include <ardour/audio_diskstream.h> #include <ardour/audio_diskstream.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/location.h> #include <ardour/location.h>
#include <ardour/panner.h> #include <ardour/panner.h>
#include <ardour/playlist.h> #include <ardour/playlist.h>
@ -102,8 +102,8 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
/* map current state of the route */ /* map current state of the route */
inserts_changed (); processors_changed ();
reset_insert_automation_curves (); reset_processor_automation_curves ();
ensure_xml_node (); ensure_xml_node ();

View file

@ -44,8 +44,8 @@ namespace ARDOUR {
class Session; class Session;
class AudioDiskstream; class AudioDiskstream;
class RouteGroup; class RouteGroup;
class Redirect; class IOProcessor;
class Insert; class Processor;
class Location; class Location;
class AudioPlaylist; class AudioPlaylist;
} }

View file

@ -37,7 +37,7 @@
#include "automation_pan_line.h" #include "automation_pan_line.h"
#include "automation_midi_cc_line.h" #include "automation_midi_cc_line.h"
#include "automation_time_axis.h" #include "automation_time_axis.h"
#include "redirect_automation_line.h" #include "plugin_automation_line.h"
#include "canvas_impl.h" #include "canvas_impl.h"
#include "simplerect.h" #include "simplerect.h"
@ -591,7 +591,7 @@ Editor::canvas_control_point_event (GdkEvent *event, ArdourCanvas::Item* item, C
type = GainAutomationControlPointItem; type = GainAutomationControlPointItem;
} else if (dynamic_cast<AutomationPanLine*> (&cp->line) != 0) { } else if (dynamic_cast<AutomationPanLine*> (&cp->line) != 0) {
type = PanAutomationControlPointItem; type = PanAutomationControlPointItem;
} else if (dynamic_cast<RedirectAutomationLine*> (&cp->line) != 0) { } else if (dynamic_cast<ProcessorAutomationLine*> (&cp->line) != 0) {
type = RedirectAutomationControlPointItem; type = RedirectAutomationControlPointItem;
} else if (dynamic_cast<AutomationMidiCCLine*> (&cp->line) != 0) { } else if (dynamic_cast<AutomationMidiCCLine*> (&cp->line) != 0) {
type = MidiCCAutomationControlPointItem; type = MidiCCAutomationControlPointItem;
@ -613,8 +613,8 @@ Editor::canvas_line_event (GdkEvent *event, ArdourCanvas::Item* item, Automation
type = GainAutomationLineItem; type = GainAutomationLineItem;
} else if (dynamic_cast<AutomationPanLine*> (al) != 0) { } else if (dynamic_cast<AutomationPanLine*> (al) != 0) {
type = PanAutomationLineItem; type = PanAutomationLineItem;
} else if (dynamic_cast<RedirectAutomationLine*> (al) != 0) { } else if (dynamic_cast<ProcessorAutomationLine*> (al) != 0) {
type = RedirectAutomationLineItem; type = ProcessorAutomationLineItem;
} else if (dynamic_cast<AutomationMidiCCLine*> (al) != 0) { } else if (dynamic_cast<AutomationMidiCCLine*> (al) != 0) {
type = MidiCCAutomationLineItem; type = MidiCCAutomationLineItem;
} else { } else {

View file

@ -37,7 +37,7 @@ enum ItemType {
PanAutomationControlPointItem, PanAutomationControlPointItem,
PanAutomationLineItem, PanAutomationLineItem,
RedirectAutomationControlPointItem, RedirectAutomationControlPointItem,
RedirectAutomationLineItem, ProcessorAutomationLineItem,
MidiCCAutomationControlPointItem, MidiCCAutomationControlPointItem,
MidiCCAutomationLineItem, MidiCCAutomationLineItem,
MeterMarkerItem, MeterMarkerItem,

View file

@ -547,7 +547,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
case GainAutomationLineItem: case GainAutomationLineItem:
case PanAutomationLineItem: case PanAutomationLineItem:
case RedirectAutomationLineItem: case ProcessorAutomationLineItem:
case MidiCCAutomationLineItem: case MidiCCAutomationLineItem:
start_line_grab_from_line (item, event); start_line_grab_from_line (item, event);
return true; return true;
@ -632,7 +632,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
case GainAutomationLineItem: case GainAutomationLineItem:
case PanAutomationLineItem: case PanAutomationLineItem:
case RedirectAutomationLineItem: case ProcessorAutomationLineItem:
case MidiCCAutomationLineItem: case MidiCCAutomationLineItem:
start_line_grab_from_line (item, event); start_line_grab_from_line (item, event);
break; break;
@ -924,7 +924,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case GainLineItem: case GainLineItem:
case GainAutomationLineItem: case GainAutomationLineItem:
case PanAutomationLineItem: case PanAutomationLineItem:
case RedirectAutomationLineItem: case ProcessorAutomationLineItem:
case MidiCCAutomationLineItem: case MidiCCAutomationLineItem:
case StartSelectionTrimItem: case StartSelectionTrimItem:
case EndSelectionTrimItem: case EndSelectionTrimItem:
@ -1105,7 +1105,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
break; break;
case GainAutomationLineItem: case GainAutomationLineItem:
case RedirectAutomationLineItem: case ProcessorAutomationLineItem:
case MidiCCAutomationLineItem: case MidiCCAutomationLineItem:
case PanAutomationLineItem: case PanAutomationLineItem:
if (mouse_mode == MouseGain || mouse_mode == MouseObject) { if (mouse_mode == MouseGain || mouse_mode == MouseObject) {
@ -1228,7 +1228,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
switch (item_type) { switch (item_type) {
case GainLineItem: case GainLineItem:
case GainAutomationLineItem: case GainAutomationLineItem:
case RedirectAutomationLineItem: case ProcessorAutomationLineItem:
case MidiCCAutomationLineItem: case MidiCCAutomationLineItem:
case PanAutomationLineItem: case PanAutomationLineItem:
case GainControlPointItem: case GainControlPointItem:
@ -1302,7 +1302,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
case GainLineItem: case GainLineItem:
case GainAutomationLineItem: case GainAutomationLineItem:
case RedirectAutomationLineItem: case ProcessorAutomationLineItem:
case MidiCCAutomationLineItem: case MidiCCAutomationLineItem:
case PanAutomationLineItem: case PanAutomationLineItem:
al = reinterpret_cast<AutomationLine*> (item->get_data ("line")); al = reinterpret_cast<AutomationLine*> (item->get_data ("line"));
@ -1457,7 +1457,7 @@ Editor::motion_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item
case EndSelectionTrimItem: case EndSelectionTrimItem:
case SelectionItem: case SelectionItem:
case GainLineItem: case GainLineItem:
case RedirectAutomationLineItem: case ProcessorAutomationLineItem:
case MidiCCAutomationLineItem: case MidiCCAutomationLineItem:
case GainAutomationLineItem: case GainAutomationLineItem:
case PanAutomationLineItem: case PanAutomationLineItem:

View file

@ -47,7 +47,7 @@ namespace ARDOUR {
class Session; class Session;
class PortInsert; class PortInsert;
class Port; class Port;
class Redirect; class IOProcessor;
} }
class IOSelector : public Gtk::VBox { class IOSelector : public Gtk::VBox {

View file

@ -103,9 +103,9 @@ LadspaPluginUI::LadspaPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrolla
pack_start (hpacker, false, false); pack_start (hpacker, false, false);
} }
insert->ActiveChanged.connect (bind(mem_fun(*this, &LadspaPluginUI::insert_active_changed), pi->ActiveChanged.connect (bind(mem_fun(*this, &LadspaPluginUI::processor_active_changed),
boost::weak_ptr<Insert>(insert))); boost::weak_ptr<Processor>(pi)));
bypass_button.set_active (!insert->active()); bypass_button.set_active (!pi->active());
build (); build ();
} }
@ -673,13 +673,13 @@ LadspaPluginUI::control_combo_changed (ControlUI* cui)
} }
void void
LadspaPluginUI::insert_active_changed (boost::weak_ptr<Insert> weak_insert) LadspaPluginUI::processor_active_changed (boost::weak_ptr<Processor> weak_processor)
{ {
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LadspaPluginUI::insert_active_changed), weak_insert)); ENSURE_GUI_THREAD(bind (mem_fun(*this, &LadspaPluginUI::processor_active_changed), weak_processor));
boost::shared_ptr<Insert> insert = weak_insert.lock(); boost::shared_ptr<Processor> processor = weak_processor.lock();
bypass_button.set_active (!insert || !insert->active()); bypass_button.set_active (!processor || !processor->active());
} }
bool bool

View file

@ -37,7 +37,7 @@
#include <ardour/midi_playlist.h> #include <ardour/midi_playlist.h>
#include <ardour/midi_diskstream.h> #include <ardour/midi_diskstream.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/ladspa_plugin.h> #include <ardour/ladspa_plugin.h>
#include <ardour/location.h> #include <ardour/location.h>
#include <ardour/playlist.h> #include <ardour/playlist.h>
@ -60,8 +60,8 @@
#include "point_selection.h" #include "point_selection.h"
#include "prompter.h" #include "prompter.h"
#include "public_editor.h" #include "public_editor.h"
#include "redirect_automation_line.h" #include "plugin_automation_line.h"
#include "redirect_automation_time_axis.h" #include "processor_automation_time_axis.h"
#include "midi_controller_time_axis.h" #include "midi_controller_time_axis.h"
#include "region_view.h" #include "region_view.h"
#include "rgb_macros.h" #include "rgb_macros.h"
@ -100,13 +100,13 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, boost::shar
/* map current state of the route */ /* map current state of the route */
inserts_changed (); processors_changed ();
ensure_xml_node (); ensure_xml_node ();
set_state (*xml_node); set_state (*xml_node);
_route->inserts_changed.connect (mem_fun(*this, &MidiTimeAxisView::inserts_changed)); _route->processors_changed.connect (mem_fun(*this, &MidiTimeAxisView::processors_changed));
if (is_track()) { if (is_track()) {

View file

@ -44,8 +44,7 @@ namespace ARDOUR {
class Session; class Session;
class MidiDiskstream; class MidiDiskstream;
class RouteGroup; class RouteGroup;
class Insert; class Processor;
class Insert;
class Location; class Location;
class MidiPlaylist; class MidiPlaylist;
} }
@ -71,7 +70,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
void route_active_changed (); void route_active_changed ();
void add_insert_to_subplugin_menu (ARDOUR::Insert *); void add_insert_to_subplugin_menu (ARDOUR::Processor *);
Gtk::Menu subplugin_menu; Gtk::Menu subplugin_menu;
}; };

View file

@ -40,7 +40,7 @@
#include <ardour/audio_diskstream.h> #include <ardour/audio_diskstream.h>
#include <ardour/panner.h> #include <ardour/panner.h>
#include <ardour/send.h> #include <ardour/send.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/ladspa_plugin.h> #include <ardour/ladspa_plugin.h>
#include <ardour/bundle.h> #include <ardour/bundle.h>
#include <ardour/session_bundle.h> #include <ardour/session_bundle.h>
@ -85,8 +85,8 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
: AxisView(sess), : AxisView(sess),
RouteUI (rt, sess, _("Mute"), _("Solo"), _("Record")), RouteUI (rt, sess, _("Mute"), _("Solo"), _("Record")),
_mixer(mx), _mixer(mx),
pre_redirect_box (PreFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer), pre_processor_box (PreFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer),
post_redirect_box (PostFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer), post_processor_box (PostFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer),
gpm (_route, sess), gpm (_route, sess),
panners (_route, sess), panners (_route, sess),
button_table (3, 2), button_table (3, 2),
@ -251,11 +251,11 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
global_vpacker.pack_start (*whvbox, Gtk::PACK_SHRINK); global_vpacker.pack_start (*whvbox, Gtk::PACK_SHRINK);
global_vpacker.pack_start (button_table,Gtk::PACK_SHRINK); global_vpacker.pack_start (button_table,Gtk::PACK_SHRINK);
global_vpacker.pack_start (pre_redirect_box, true, true); global_vpacker.pack_start (pre_processor_box, true, true);
global_vpacker.pack_start (middle_button_table,Gtk::PACK_SHRINK); global_vpacker.pack_start (middle_button_table,Gtk::PACK_SHRINK);
global_vpacker.pack_start (*gain_meter_alignment,Gtk::PACK_SHRINK); global_vpacker.pack_start (*gain_meter_alignment,Gtk::PACK_SHRINK);
global_vpacker.pack_start (bottom_button_table,Gtk::PACK_SHRINK); global_vpacker.pack_start (bottom_button_table,Gtk::PACK_SHRINK);
global_vpacker.pack_start (post_redirect_box, true, true); global_vpacker.pack_start (post_processor_box, true, true);
if (!is_midi_track()) if (!is_midi_track())
global_vpacker.pack_start (panners, Gtk::PACK_SHRINK); global_vpacker.pack_start (panners, Gtk::PACK_SHRINK);
global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK); global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK);
@ -332,8 +332,8 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
/* now force an update of all the various elements */ /* now force an update of all the various elements */
pre_redirect_box.update(); pre_processor_box.update();
post_redirect_box.update(); post_processor_box.update();
mute_changed (0); mute_changed (0);
solo_changed (0); solo_changed (0);
name_changed (); name_changed ();
@ -400,8 +400,8 @@ MixerStrip::set_width (Width w, void* owner)
gpm.set_width (w); gpm.set_width (w);
panners.set_width (w); panners.set_width (w);
pre_redirect_box.set_width (w); pre_processor_box.set_width (w);
post_redirect_box.set_width (w); post_processor_box.set_width (w);
_width_owner = owner; _width_owner = owner;
@ -1138,24 +1138,24 @@ MixerStrip::map_frozen ()
if (at) { if (at) {
switch (at->freeze_state()) { switch (at->freeze_state()) {
case AudioTrack::Frozen: case AudioTrack::Frozen:
pre_redirect_box.set_sensitive (false); pre_processor_box.set_sensitive (false);
post_redirect_box.set_sensitive (false); post_processor_box.set_sensitive (false);
speed_spinner.set_sensitive (false); speed_spinner.set_sensitive (false);
break; break;
default: default:
pre_redirect_box.set_sensitive (true); pre_processor_box.set_sensitive (true);
post_redirect_box.set_sensitive (true); post_processor_box.set_sensitive (true);
speed_spinner.set_sensitive (true); speed_spinner.set_sensitive (true);
break; break;
} }
} }
_route->foreach_insert (this, &MixerStrip::hide_insert_editor); _route->foreach_processor (this, &MixerStrip::hide_processor_editor);
} }
void void
MixerStrip::hide_insert_editor (boost::shared_ptr<Insert> insert) MixerStrip::hide_processor_editor (boost::shared_ptr<Processor> processor)
{ {
void* gui = insert->get_gui (); void* gui = processor->get_gui ();
if (gui) { if (gui) {
static_cast<Gtk::Widget*>(gui)->hide (); static_cast<Gtk::Widget*>(gui)->hide ();

View file

@ -43,8 +43,8 @@
#include <ardour/types.h> #include <ardour/types.h>
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <ardour/io.h> #include <ardour/io.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include <pbd/fastlog.h> #include <pbd/fastlog.h>
@ -53,7 +53,7 @@
#include "gain_meter.h" #include "gain_meter.h"
#include "panner_ui.h" #include "panner_ui.h"
#include "enums.h" #include "enums.h"
#include "redirect_box.h" #include "processor_box.h"
#include "ardour_dialog.h" #include "ardour_dialog.h"
class MotionController; class MotionController;
@ -66,7 +66,7 @@ namespace Gtkmm2ext {
namespace ARDOUR { namespace ARDOUR {
class Route; class Route;
class Send; class Send;
class Insert; class Processor;
class Session; class Session;
class PortInsert; class PortInsert;
class Bundle; class Bundle;
@ -121,8 +121,8 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
Gtk::Frame global_frame; Gtk::Frame global_frame;
Gtk::VBox global_vpacker; Gtk::VBox global_vpacker;
RedirectBox pre_redirect_box; ProcessorBox pre_processor_box;
RedirectBox post_redirect_box; ProcessorBox post_processor_box;
GainMeter gpm; GainMeter gpm;
PannerUI panners; PannerUI panners;
@ -239,7 +239,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
void name_changed (); void name_changed ();
void update_speed_display (); void update_speed_display ();
void map_frozen (); void map_frozen ();
void hide_insert_editor (boost::shared_ptr<ARDOUR::Insert> insert); void hide_processor_editor (boost::shared_ptr<ARDOUR::Processor> processor);
bool ignore_speed_adjustment; bool ignore_speed_adjustment;

View file

@ -37,7 +37,7 @@
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <ardour/io.h> #include <ardour/io.h>
#include "route_redirect_selection.h" #include "route_processor_selection.h"
#include "enums.h" #include "enums.h"
namespace ARDOUR { namespace ARDOUR {

View file

@ -26,7 +26,7 @@
#include <gtkmm/comboboxtext.h> #include <gtkmm/comboboxtext.h>
namespace ARDOUR { namespace ARDOUR {
class Redirect; class IOProcessor;
} }
class PanAutomationTimeAxisView : public AutomationTimeAxisView class PanAutomationTimeAxisView : public AutomationTimeAxisView

View file

@ -18,11 +18,10 @@
*/ */
#include "public_editor.h" #include "public_editor.h"
#include "redirect_automation_line.h" #include "plugin_automation_line.h"
#include "audio_time_axis.h" #include "audio_time_axis.h"
#include "utils.h" #include "utils.h"
#include <ardour/session.h>
#include <ardour/ladspa_plugin.h> #include <ardour/ladspa_plugin.h>
#include <ardour/plugin_insert.h> #include <ardour/plugin_insert.h>
#include <ardour/curve.h> #include <ardour/curve.h>
@ -33,31 +32,27 @@ using namespace std;
using namespace ARDOUR; using namespace ARDOUR;
using namespace PBD; using namespace PBD;
RedirectAutomationLine::RedirectAutomationLine (const string & name, Insert& i, ParamID param, Session& s, ProcessorAutomationLine::ProcessorAutomationLine (const string & name, Processor& proc, ParamID param,
TimeAxisView& tv, ArdourCanvas::Group& parent, AutomationList& l)
TimeAxisView& tv, ArdourCanvas::Group& parent,
AutomationList& l)
: AutomationLine (name, tv, parent, l), : AutomationLine (name, tv, parent, l),
session (s), _processor(proc),
_insert (i), _param(param)
_param (param)
{ {
set_verbose_cursor_uses_gain_mapping (false); set_verbose_cursor_uses_gain_mapping (false);
PluginInsert *pi; PluginInsert *pi;
Plugin::ParameterDescriptor desc; Plugin::ParameterDescriptor desc;
if ((pi = dynamic_cast<PluginInsert*>(&_insert)) == 0) { if ((pi = dynamic_cast<PluginInsert*>(&_processor)) == 0) {
fatal << _("insert automation created for non-plugin") << endmsg; fatal << _("insert automation created for non-plugin") << endmsg;
/*NOTREACHED*/ /*NOTREACHED*/
} }
pi->plugin()->get_parameter_descriptor (_param, desc); pi->plugin()->get_parameter_descriptor (_param, desc);
upper = desc.upper; _upper = desc.upper;
lower = desc.lower; _lower = desc.lower;
if (desc.toggled) { if (desc.toggled) {
no_draw = true; no_draw = true;
@ -65,30 +60,30 @@ RedirectAutomationLine::RedirectAutomationLine (const string & name, Insert& i,
} }
no_draw = false; no_draw = false;
range = upper - lower; _range = _upper - _lower;
/* XXX set min/max for underlying curve ??? */ /* XXX set min/max for underlying curve ??? */
} }
string string
RedirectAutomationLine::get_verbose_cursor_string (float fraction) ProcessorAutomationLine::get_verbose_cursor_string (float fraction)
{ {
char buf[32]; char buf[32];
snprintf (buf, sizeof (buf), "%.2f", lower + (fraction * range)); snprintf (buf, sizeof (buf), "%.2f", _lower + (fraction * _range));
return buf; return buf;
} }
void void
RedirectAutomationLine::view_to_model_y (double& y) ProcessorAutomationLine::view_to_model_y (double& y)
{ {
y = lower + (y * range); y = _lower + (y * _range);
} }
void void
RedirectAutomationLine::model_to_view_y (double& y) ProcessorAutomationLine::model_to_view_y (double& y)
{ {
y = (y - lower) / range; y = (y - _lower) / _range;
y = max (0.0, y); y = max (0.0, y);
y = min (y, 1.0); y = min (y, 1.0);
} }

View file

@ -17,38 +17,37 @@
*/ */
#ifndef __ardour_gtk_redirect_automation_line_h__ #ifndef __ardour_gtk_processor_automation_line_h__
#define __ardour_gtk_redirect_automation_line_h__ #define __ardour_gtk_processor_automation_line_h__
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include "automation_line.h" #include "automation_line.h"
namespace ARDOUR { namespace ARDOUR {
class Session; class Processor;
class Insert;
} }
class TimeAxisView; class TimeAxisView;
class RedirectAutomationLine : public AutomationLine class ProcessorAutomationLine : public AutomationLine
{ {
public: public:
RedirectAutomationLine (const string & name, ARDOUR::Insert&, ARDOUR::ParamID param, ARDOUR::Session&, TimeAxisView&, ProcessorAutomationLine (const string & name, ARDOUR::Processor&, ARDOUR::ParamID param,
ArdourCanvas::Group& parent, ARDOUR::AutomationList&); TimeAxisView&, ArdourCanvas::Group& parent, ARDOUR::AutomationList&);
ARDOUR::ParamID param() const { return _param; } ARDOUR::ParamID param() const { return _param; }
ARDOUR::Insert& insert() const { return _insert; } ARDOUR::Processor& processor() const { return _processor; }
string get_verbose_cursor_string (float); string get_verbose_cursor_string (float);
private: private:
ARDOUR::Session& session; ARDOUR::Processor& _processor;
ARDOUR::Insert& _insert; ARDOUR::ParamID _param;
ARDOUR::ParamID _param;
float upper; float _upper;
float lower; float _lower;
float range; float _range;
void view_to_model_y (double&); void view_to_model_y (double&);
void model_to_view_y (double&); void model_to_view_y (double&);

View file

@ -47,7 +47,7 @@ namespace ARDOUR {
class PluginInsert; class PluginInsert;
class Plugin; class Plugin;
class VSTPlugin; class VSTPlugin;
class Redirect; class IOProcessor;
class AUPlugin; class AUPlugin;
} }
@ -184,7 +184,7 @@ class LadspaPluginUI : public PlugUIBase, public Gtk::VBox
void control_port_toggled (ControlUI* cui); void control_port_toggled (ControlUI* cui);
void control_combo_changed (ControlUI* cui); void control_combo_changed (ControlUI* cui);
void insert_active_changed (boost::weak_ptr<ARDOUR::Insert>); void processor_active_changed (boost::weak_ptr<ARDOUR::Processor>);
void astate_clicked (ControlUI*, uint32_t parameter); void astate_clicked (ControlUI*, uint32_t parameter);
void automation_state_changed (ControlUI*); void automation_state_changed (ControlUI*);

View file

@ -17,12 +17,12 @@
*/ */
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/session.h> #include <ardour/session.h>
#include <cstdlib> #include <cstdlib>
#include <pbd/memento_command.h> #include <pbd/memento_command.h>
#include "redirect_automation_time_axis.h" #include "processor_automation_time_axis.h"
#include "automation_line.h" #include "automation_line.h"
#include "canvas_impl.h" #include "canvas_impl.h"
@ -32,18 +32,18 @@ using namespace ARDOUR;
using namespace PBD; using namespace PBD;
using namespace Gtk; using namespace Gtk;
RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, boost::shared_ptr<Route> r, ProcessorAutomationTimeAxisView::ProcessorAutomationTimeAxisView (Session& s, boost::shared_ptr<Route> r,
PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n, PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n,
ParamID p, Insert& i, string state_name) ParamID param, Processor& proc, string state_name)
: AxisView (s), : AxisView (s),
AutomationTimeAxisView (s, r, e, parent, canvas, n, state_name, i.name()), AutomationTimeAxisView (s, r, e, parent, canvas, n, state_name, proc.name()),
insert (i), _processor(proc),
param (p) _param (param)
{ {
char buf[32]; char buf[32];
xml_node = 0; _xml_node = 0;
_marked_for_display = false; _marked_for_display = false;
ensure_xml_node (); ensure_xml_node ();
@ -51,7 +51,7 @@ RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, boos
XMLNodeList kids; XMLNodeList kids;
XMLNodeConstIterator iter; XMLNodeConstIterator iter;
kids = xml_node->children (); kids = _xml_node->children ();
snprintf (buf, sizeof(buf), "Port_%" PRIu32, param.id()); snprintf (buf, sizeof(buf), "Port_%" PRIu32, param.id());
@ -68,12 +68,12 @@ RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, boos
} }
} }
RedirectAutomationTimeAxisView::~RedirectAutomationTimeAxisView () ProcessorAutomationTimeAxisView::~ProcessorAutomationTimeAxisView ()
{ {
} }
void void
RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y) ProcessorAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
{ {
double x = 0; double x = 0;
@ -91,9 +91,9 @@ RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item,
/* map to model space */ /* map to model space */
if (!lines.empty()) { if (!lines.empty()) {
AutomationList* alist (insert.automation_list(param, true)); AutomationList* alist (_processor.automation_list(_param, true));
string description = _("add automation event to "); string description = _("add automation event to ");
description += insert.describe_parameter (param); description += _processor.describe_parameter (_param);
lines.front()->view_to_model_y (y); lines.front()->view_to_model_y (y);
@ -108,18 +108,18 @@ RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item,
} }
void void
RedirectAutomationTimeAxisView::ensure_xml_node () ProcessorAutomationTimeAxisView::ensure_xml_node ()
{ {
if (xml_node == 0) { if (_xml_node == 0) {
if ((xml_node = insert.extra_xml ("GUI")) == 0) { if ((_xml_node = _processor.extra_xml ("GUI")) == 0) {
xml_node = new XMLNode ("GUI"); _xml_node = new XMLNode ("GUI");
insert.add_extra_xml (*xml_node); _processor.add_extra_xml (*_xml_node);
} }
} }
} }
guint32 guint32
RedirectAutomationTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent) ProcessorAutomationTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent)
{ {
ensure_xml_node (); ensure_xml_node ();
update_extra_xml_shown (true); update_extra_xml_shown (true);
@ -128,7 +128,7 @@ RedirectAutomationTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent)
} }
void void
RedirectAutomationTimeAxisView::hide () ProcessorAutomationTimeAxisView::hide ()
{ {
ensure_xml_node (); ensure_xml_node ();
update_extra_xml_shown (false); update_extra_xml_shown (false);
@ -138,15 +138,15 @@ RedirectAutomationTimeAxisView::hide ()
void void
RedirectAutomationTimeAxisView::update_extra_xml_shown (bool editor_shown) ProcessorAutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
{ {
char buf[32]; char buf[32];
XMLNodeList nlist = xml_node->children (); XMLNodeList nlist = _xml_node->children ();
XMLNodeConstIterator i; XMLNodeConstIterator i;
XMLNode * port_node = 0; XMLNode * port_node = 0;
snprintf (buf, sizeof(buf), "Port_%" PRIu32, param.id()); snprintf (buf, sizeof(buf), "Port_%" PRIu32, _param.id());
for (i = nlist.begin(); i != nlist.end(); ++i) { for (i = nlist.begin(); i != nlist.end(); ++i) {
if ((*i)->name() == buf) { if ((*i)->name() == buf) {
@ -157,7 +157,7 @@ RedirectAutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
if (!port_node) { if (!port_node) {
port_node = new XMLNode(buf); port_node = new XMLNode(buf);
xml_node->add_child_nocopy(*port_node); _xml_node->add_child_nocopy(*port_node);
} }
port_node->add_property ("shown_editor", editor_shown ? "yes": "no"); port_node->add_property ("shown_editor", editor_shown ? "yes": "no");
@ -165,9 +165,10 @@ RedirectAutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
} }
void void
RedirectAutomationTimeAxisView::set_automation_state (AutoState state) ProcessorAutomationTimeAxisView::set_automation_state (AutoState state)
{ {
if (!ignore_state_request) { if (!ignore_state_request) {
insert.automation_list (param, true)->set_automation_state (state); _processor.automation_list (_param, true)->set_automation_state (state);
} }
} }

View file

@ -17,8 +17,8 @@
*/ */
#ifndef __ardour_gtk_redirect_automation_time_axis_h__ #ifndef __ardour_gtk_processor_automation_time_axis_h__
#define __ardour_gtk_redirect_automation_time_axis_h__ #define __ardour_gtk_processor_automation_time_axis_h__
#include <pbd/xml++.h> #include <pbd/xml++.h>
@ -27,23 +27,23 @@
#include <ardour/param_id.h> #include <ardour/param_id.h>
namespace ARDOUR { namespace ARDOUR {
class Redirect; class Processor;
} }
class RedirectAutomationTimeAxisView : public AutomationTimeAxisView class ProcessorAutomationTimeAxisView : public AutomationTimeAxisView
{ {
public: public:
RedirectAutomationTimeAxisView (ARDOUR::Session&, ProcessorAutomationTimeAxisView (ARDOUR::Session&,
boost::shared_ptr<ARDOUR::Route>, boost::shared_ptr<ARDOUR::Route>,
PublicEditor&, PublicEditor&,
TimeAxisView& parent, TimeAxisView& parent,
ArdourCanvas::Canvas& canvas, ArdourCanvas::Canvas& canvas,
std::string name, std::string name,
ARDOUR::ParamID param, ARDOUR::ParamID param,
ARDOUR::Insert& i, ARDOUR::Processor& i,
std::string state_name); std::string state_name);
~RedirectAutomationTimeAxisView(); ~ProcessorAutomationTimeAxisView();
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double); void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
@ -52,14 +52,14 @@ class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
private: private:
ARDOUR::Insert& insert; ARDOUR::Processor& _processor;
ARDOUR::ParamID param; ARDOUR::ParamID _param;
XMLNode* _xml_node;
XMLNode *xml_node;
void ensure_xml_node(); void ensure_xml_node();
void update_extra_xml_shown (bool editor_shown); void update_extra_xml_shown (bool editor_shown);
void set_automation_state (ARDOUR::AutoState); void set_automation_state (ARDOUR::AutoState);
}; };
#endif /* __ardour_gtk_redirect_automation_time_axis_h__ */ #endif /* __ardour_gtk_processor_automation_time_axis_h__ */

1440
gtk2_ardour/processor_box.cc Normal file

File diff suppressed because it is too large Load diff

229
gtk2_ardour/processor_box.h Normal file
View file

@ -0,0 +1,229 @@
/*
Copyright (C) 2004 Paul Davis
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.
*/
#ifndef __ardour_gtk_processor_box__
#define __ardour_gtk_processor_box__
#include <vector>
#include <cmath>
#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/menu.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm2ext/dndtreeview.h>
#include <gtkmm2ext/auto_spin.h>
#include <gtkmm2ext/click_box.h>
#include <gtkmm2ext/dndtreeview.h>
#include <pbd/stateful.h>
#include <ardour/types.h>
#include <ardour/ardour.h>
#include <ardour/io.h>
#include <ardour/processor.h>
#include <ardour/io_processor.h>
#include <pbd/fastlog.h>
#include "route_ui.h"
#include "io_selector.h"
#include "enums.h"
class MotionController;
class PluginSelector;
class PluginUIWindow;
class RouteRedirectSelection;
namespace ARDOUR {
class Bundle;
class Processor;
class Plugin;
class PluginInsert;
class PortInsert;
class Route;
class Send;
class Session;
}
class ProcessorBox : public Gtk::HBox
{
public:
ProcessorBox (ARDOUR::Placement, ARDOUR::Session&,
boost::shared_ptr<ARDOUR::Route>, PluginSelector &, RouteRedirectSelection &, bool owner_is_mixer = false);
~ProcessorBox ();
void set_width (Width);
void update();
void select_all_processors ();
void deselect_all_processors ();
void select_all_plugins ();
void select_all_sends ();
sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > InsertSelected;
sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > InsertUnselected;
static void register_actions();
protected:
void set_stuff_from_route ();
private:
boost::shared_ptr<ARDOUR::Route> _route;
ARDOUR::Session & _session;
bool _owner_is_mixer;
bool ab_direction;
ARDOUR::Placement _placement;
PluginSelector & _plugin_selector;
RouteRedirectSelection & _rr_selection;
void route_going_away ();
struct ModelColumns : public Gtk::TreeModel::ColumnRecord {
ModelColumns () {
add (text);
add (processor);
add (color);
}
Gtk::TreeModelColumn<std::string> text;
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Processor> > processor;
Gtk::TreeModelColumn<Gdk::Color> color;
};
ModelColumns columns;
Glib::RefPtr<Gtk::ListStore> model;
void selection_changed ();
static bool get_colors;
static Gdk::Color* active_processor_color;
static Gdk::Color* inactive_processor_color;
Gtk::EventBox processor_eventbox;
Gtk::HBox processor_hpacker;
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Processor> > processor_display;
Gtk::ScrolledWindow processor_scroller;
void object_drop (std::string type, uint32_t cnt, const boost::shared_ptr<ARDOUR::Processor>*);
Width _width;
Gtk::Menu *send_action_menu;
void build_send_action_menu ();
void new_send ();
void show_send_controls ();
Gtk::Menu *processor_menu;
gint processor_menu_map_handler (GdkEventAny *ev);
Gtk::Menu * build_processor_menu ();
void build_processor_tooltip (Gtk::EventBox&, string);
void show_processor_menu (gint arg);
void choose_send ();
void send_io_finished (IOSelector::Result, boost::shared_ptr<ARDOUR::Send>, IOSelectorWindow*);
void choose_processor ();
void choose_plugin ();
void processor_plugin_chosen (boost::shared_ptr<ARDOUR::Plugin>);
bool no_processor_redisplay;
bool ignore_delete;
bool processor_button_press_event (GdkEventButton *);
bool processor_button_release_event (GdkEventButton *);
void redisplay_processors ();
void add_processor_to_display (boost::shared_ptr<ARDOUR::Processor>);
void row_deleted (const Gtk::TreeModel::Path& path);
void show_processor_active (boost::weak_ptr<ARDOUR::Processor>);
void show_processor_name (boost::weak_ptr<ARDOUR::Processor>);
string processor_name (boost::weak_ptr<ARDOUR::Processor>);
void remove_processor_gui (boost::shared_ptr<ARDOUR::Processor>);
void processors_reordered (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&, int*);
void compute_processor_sort_keys ();
vector<sigc::connection> processor_active_connections;
vector<sigc::connection> processor_name_connections;
bool processor_drag_in_progress;
void processor_drag_begin (GdkDragContext*);
void processor_drag_end (GdkDragContext*);
void all_processors_active(bool state);
void all_plugins_active(bool state);
void ab_plugins ();
void cut_processors ();
void copy_processors ();
void paste_processors ();
void delete_processors ();
void clear_processors ();
void clone_processors ();
void rename_processors ();
void for_selected_processors (void (ProcessorBox::*pmf)(boost::shared_ptr<ARDOUR::Processor>));
void get_selected_processors (vector<boost::shared_ptr<ARDOUR::Processor> >&);
static Glib::RefPtr<Gtk::Action> paste_action;
void paste_processor_list (std::list<boost::shared_ptr<ARDOUR::Processor> >& processors);
void activate_processor (boost::shared_ptr<ARDOUR::Processor>);
void deactivate_processor (boost::shared_ptr<ARDOUR::Processor>);
void cut_processor (boost::shared_ptr<ARDOUR::Processor>);
void copy_processor (boost::shared_ptr<ARDOUR::Processor>);
void edit_processor (boost::shared_ptr<ARDOUR::Processor>);
void hide_processor_editor (boost::shared_ptr<ARDOUR::Processor>);
void rename_processor (boost::shared_ptr<ARDOUR::Processor>);
gint idle_delete_processor (boost::weak_ptr<ARDOUR::Processor>);
void weird_plugin_dialog (ARDOUR::Plugin& p, ARDOUR::Route::ProcessorStreams streams, boost::shared_ptr<ARDOUR::IO> io);
static ProcessorBox* _current_processor_box;
static bool enter_box (GdkEventCrossing*, ProcessorBox*);
static bool leave_box (GdkEventCrossing*, ProcessorBox*);
static void rb_choose_plugin ();
static void rb_choose_processor ();
static void rb_choose_send ();
static void rb_clear ();
static void rb_cut ();
static void rb_copy ();
static void rb_paste ();
static void rb_delete ();
static void rb_rename ();
static void rb_select_all ();
static void rb_deselect_all ();
static void rb_activate ();
static void rb_deactivate ();
static void rb_activate_all ();
static void rb_deactivate_all ();
static void rb_edit ();
static void rb_ab_plugins ();
static void rb_deactivate_plugins ();
void route_name_changed (PluginUIWindow* plugin_ui, boost::weak_ptr<ARDOUR::PluginInsert> pi);
std::string generate_processor_title (boost::shared_ptr<ARDOUR::PluginInsert> pi);
};
#endif /* __ardour_gtk_processor_box__ */

View file

@ -17,16 +17,16 @@
*/ */
#ifndef __ardour_gtk_redirect_selection_h__ #ifndef __ardour_gtk_processor_selection_h__
#define __ardour_gtk_redirect_selection_h__ #define __ardour_gtk_processor_selection_h__
#include <list> #include <list>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
namespace ARDOUR { namespace ARDOUR {
class Insert; class Processor;
} }
struct InsertSelection : list<boost::shared_ptr<ARDOUR::Insert> > {}; struct ProcessorSelection : list<boost::shared_ptr<ARDOUR::Processor> > {};
#endif /* __ardour_gtk_redirect_selection_h__ */ #endif /* __ardour_gtk_processor_selection_h__ */

File diff suppressed because it is too large Load diff

View file

@ -1,230 +0,0 @@
/*
Copyright (C) 2004 Paul Davis
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.
*/
#ifndef __ardour_gtk_redirect_box__
#define __ardour_gtk_redirect_box__
#include <vector>
#include <cmath>
#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/menu.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm2ext/dndtreeview.h>
#include <gtkmm2ext/auto_spin.h>
#include <gtkmm2ext/click_box.h>
#include <gtkmm2ext/dndtreeview.h>
#include <pbd/stateful.h>
#include <ardour/types.h>
#include <ardour/ardour.h>
#include <ardour/io.h>
#include <ardour/insert.h>
#include <ardour/redirect.h>
#include <pbd/fastlog.h>
#include "route_ui.h"
#include "io_selector.h"
#include "enums.h"
class MotionController;
class PluginSelector;
class PluginUIWindow;
class RouteRedirectSelection;
namespace ARDOUR {
class Bundle;
class Insert;
class Plugin;
class PluginInsert;
class PortInsert;
class Route;
class Send;
class Session;
}
// FIXME: change name to InsertBox
class RedirectBox : public Gtk::HBox
{
public:
RedirectBox (ARDOUR::Placement, ARDOUR::Session&,
boost::shared_ptr<ARDOUR::Route>, PluginSelector &, RouteRedirectSelection &, bool owner_is_mixer = false);
~RedirectBox ();
void set_width (Width);
void update();
void select_all_inserts ();
void deselect_all_inserts ();
void select_all_plugins ();
void select_all_sends ();
sigc::signal<void,boost::shared_ptr<ARDOUR::Insert> > InsertSelected;
sigc::signal<void,boost::shared_ptr<ARDOUR::Insert> > InsertUnselected;
static void register_actions();
protected:
void set_stuff_from_route ();
private:
boost::shared_ptr<ARDOUR::Route> _route;
ARDOUR::Session & _session;
bool _owner_is_mixer;
bool ab_direction;
ARDOUR::Placement _placement;
PluginSelector & _plugin_selector;
RouteRedirectSelection & _rr_selection;
void route_going_away ();
struct ModelColumns : public Gtk::TreeModel::ColumnRecord {
ModelColumns () {
add (text);
add (insert);
add (color);
}
Gtk::TreeModelColumn<std::string> text;
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Insert> > insert;
Gtk::TreeModelColumn<Gdk::Color> color;
};
ModelColumns columns;
Glib::RefPtr<Gtk::ListStore> model;
void selection_changed ();
static bool get_colors;
static Gdk::Color* active_insert_color;
static Gdk::Color* inactive_insert_color;
Gtk::EventBox insert_eventbox;
Gtk::HBox insert_hpacker;
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Insert> > insert_display;
Gtk::ScrolledWindow insert_scroller;
void object_drop (std::string type, uint32_t cnt, const boost::shared_ptr<ARDOUR::Insert>*);
Width _width;
Gtk::Menu *send_action_menu;
void build_send_action_menu ();
void new_send ();
void show_send_controls ();
Gtk::Menu *insert_menu;
gint insert_menu_map_handler (GdkEventAny *ev);
Gtk::Menu * build_insert_menu ();
void build_insert_tooltip (Gtk::EventBox&, string);
void show_insert_menu (gint arg);
void choose_send ();
void send_io_finished (IOSelector::Result, boost::shared_ptr<ARDOUR::Send>, IOSelectorWindow*);
void choose_insert ();
void choose_plugin ();
void insert_plugin_chosen (boost::shared_ptr<ARDOUR::Plugin>);
bool no_insert_redisplay;
bool ignore_delete;
bool insert_button_press_event (GdkEventButton *);
bool insert_button_release_event (GdkEventButton *);
void redisplay_inserts ();
void add_insert_to_display (boost::shared_ptr<ARDOUR::Insert>);
void row_deleted (const Gtk::TreeModel::Path& path);
void show_insert_active (boost::weak_ptr<ARDOUR::Insert>);
void show_insert_name (boost::weak_ptr<ARDOUR::Insert>);
string insert_name (boost::weak_ptr<ARDOUR::Insert>);
void remove_insert_gui (boost::shared_ptr<ARDOUR::Insert>);
void inserts_reordered (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&, int*);
void compute_insert_sort_keys ();
vector<sigc::connection> insert_active_connections;
vector<sigc::connection> insert_name_connections;
bool insert_drag_in_progress;
void insert_drag_begin (GdkDragContext*);
void insert_drag_end (GdkDragContext*);
void all_inserts_active(bool state);
void all_plugins_active(bool state);
void ab_plugins ();
void cut_inserts ();
void copy_inserts ();
void paste_inserts ();
void delete_inserts ();
void clear_inserts ();
void clone_inserts ();
void rename_inserts ();
void for_selected_inserts (void (RedirectBox::*pmf)(boost::shared_ptr<ARDOUR::Insert>));
void get_selected_inserts (vector<boost::shared_ptr<ARDOUR::Insert> >&);
static Glib::RefPtr<Gtk::Action> paste_action;
void paste_insert_list (std::list<boost::shared_ptr<ARDOUR::Insert> >& inserts);
void activate_insert (boost::shared_ptr<ARDOUR::Insert>);
void deactivate_insert (boost::shared_ptr<ARDOUR::Insert>);
void cut_insert (boost::shared_ptr<ARDOUR::Insert>);
void copy_insert (boost::shared_ptr<ARDOUR::Insert>);
void edit_insert (boost::shared_ptr<ARDOUR::Insert>);
void hide_insert_editor (boost::shared_ptr<ARDOUR::Insert>);
void rename_insert (boost::shared_ptr<ARDOUR::Insert>);
gint idle_delete_insert (boost::weak_ptr<ARDOUR::Insert>);
void weird_plugin_dialog (ARDOUR::Plugin& p, ARDOUR::Route::InsertStreams streams, boost::shared_ptr<ARDOUR::IO> io);
static RedirectBox* _current_insert_box;
static bool enter_box (GdkEventCrossing*, RedirectBox*);
static bool leave_box (GdkEventCrossing*, RedirectBox*);
static void rb_choose_plugin ();
static void rb_choose_insert ();
static void rb_choose_send ();
static void rb_clear ();
static void rb_cut ();
static void rb_copy ();
static void rb_paste ();
static void rb_delete ();
static void rb_rename ();
static void rb_select_all ();
static void rb_deselect_all ();
static void rb_activate ();
static void rb_deactivate ();
static void rb_activate_all ();
static void rb_deactivate_all ();
static void rb_edit ();
static void rb_ab_plugins ();
static void rb_deactivate_plugins ();
void route_name_changed (PluginUIWindow* plugin_ui, boost::weak_ptr<ARDOUR::PluginInsert> pi);
std::string generate_insert_title (boost::shared_ptr<ARDOUR::PluginInsert> pi);
};
#endif /* __ardour_gtk_redirect_box__ */

View file

@ -211,16 +211,16 @@ RouteParams_UI::route_name_changed (boost::shared_ptr<Route> route)
} }
void void
RouteParams_UI::setup_redirect_boxes() RouteParams_UI::setup_processor_boxes()
{ {
if (session && _route) { if (session && _route) {
// just in case... shouldn't need this // just in case... shouldn't need this
cleanup_redirect_boxes(); cleanup_processor_boxes();
// construct new redirect boxes // construct new redirect boxes
pre_insert_box = new RedirectBox(PreFader, *session, _route, *_plugin_selector, _rr_selection); pre_insert_box = new ProcessorBox(PreFader, *session, _route, *_plugin_selector, _rr_selection);
post_insert_box = new RedirectBox(PostFader, *session, _route, *_plugin_selector, _rr_selection); post_insert_box = new ProcessorBox(PostFader, *session, _route, *_plugin_selector, _rr_selection);
pre_redir_hpane.pack1 (*pre_insert_box); pre_redir_hpane.pack1 (*pre_insert_box);
post_redir_hpane.pack1 (*post_insert_box); post_redir_hpane.pack1 (*post_insert_box);
@ -237,7 +237,7 @@ RouteParams_UI::setup_redirect_boxes()
} }
void void
RouteParams_UI::cleanup_redirect_boxes() RouteParams_UI::cleanup_processor_boxes()
{ {
if (pre_insert_box) { if (pre_insert_box) {
pre_redir_hpane.remove(*pre_insert_box); pre_redir_hpane.remove(*pre_insert_box);
@ -344,11 +344,11 @@ RouteParams_UI::route_removed (boost::shared_ptr<Route> route)
cleanup_io_frames(); cleanup_io_frames();
cleanup_pre_view(); cleanup_pre_view();
cleanup_post_view(); cleanup_post_view();
cleanup_redirect_boxes(); cleanup_processor_boxes();
_route.reset ((Route*) 0); _route.reset ((Route*) 0);
_pre_insert.reset ((Redirect*) 0); _pre_processor.reset ((Processor*) 0);
_post_insert.reset ((Redirect*) 0); _post_processor.reset ((Processor*) 0);
update_title(); update_title();
} }
} }
@ -386,11 +386,11 @@ RouteParams_UI::session_gone ()
cleanup_io_frames(); cleanup_io_frames();
cleanup_pre_view(); cleanup_pre_view();
cleanup_post_view(); cleanup_post_view();
cleanup_redirect_boxes(); cleanup_processor_boxes();
_route.reset ((Route*) 0); _route.reset ((Route*) 0);
_pre_insert.reset ((Redirect*) 0); _pre_processor.reset ((Processor*) 0);
_post_insert.reset ((Redirect*) 0); _post_processor.reset ((Processor*) 0);
update_title(); update_title();
ArdourDialog::session_gone(); ArdourDialog::session_gone();
@ -415,7 +415,7 @@ RouteParams_UI::route_selected()
if (_route) { if (_route) {
_route_conn.disconnect(); _route_conn.disconnect();
_route_ds_conn.disconnect(); _route_ds_conn.disconnect();
cleanup_redirect_boxes(); cleanup_processor_boxes();
cleanup_pre_view(); cleanup_pre_view();
cleanup_post_view(); cleanup_post_view();
cleanup_io_frames(); cleanup_io_frames();
@ -426,10 +426,10 @@ RouteParams_UI::route_selected()
//update_routeinfo (route); //update_routeinfo (route);
setup_io_frames(); setup_io_frames();
setup_redirect_boxes(); setup_processor_boxes();
// bind to redirects changed event for this route // bind to redirects changed event for this route
_route_conn = route->inserts_changed.connect (mem_fun(*this, &RouteParams_UI::inserts_changed)); _route_conn = route->processors_changed.connect (mem_fun(*this, &RouteParams_UI::processors_changed));
track_input_label.set_text (_route->name()); track_input_label.set_text (_route->name());
@ -443,11 +443,11 @@ RouteParams_UI::route_selected()
cleanup_io_frames(); cleanup_io_frames();
cleanup_pre_view(); cleanup_pre_view();
cleanup_post_view(); cleanup_post_view();
cleanup_redirect_boxes(); cleanup_processor_boxes();
_route.reset ((Route*) 0); _route.reset ((Route*) 0);
_pre_insert.reset ((Redirect*) 0); _pre_processor.reset ((Processor*) 0);
_post_insert.reset ((Redirect *) 0); _post_processor.reset ((Processor *) 0);
track_input_label.set_text(_("NO TRACK")); track_input_label.set_text(_("NO TRACK"));
update_title(); update_title();
} }
@ -464,21 +464,21 @@ RouteParams_UI::route_selected()
// cleanup_io_frames(); // cleanup_io_frames();
// cleanup_pre_view(); // cleanup_pre_view();
// cleanup_post_view(); // cleanup_post_view();
// cleanup_redirect_boxes(); // cleanup_processor_boxes();
// _route.reset ((Route*)0); // _route.reset ((Route*)0);
// _pre_insert = 0; // _pre_processor = 0;
// _post_insert = 0; // _post_processor = 0;
// track_input_label.set_text(_("NO TRACK")); // track_input_label.set_text(_("NO TRACK"));
// update_title(); // update_title();
// } // }
//} //}
void void
RouteParams_UI::inserts_changed () RouteParams_UI::processors_changed ()
{ {
ENSURE_GUI_THREAD(mem_fun(*this, &RouteParams_UI::inserts_changed)); ENSURE_GUI_THREAD(mem_fun(*this, &RouteParams_UI::processors_changed));
// pre_insert_list.freeze (); // pre_insert_list.freeze ();
// pre_insert_list.clear (); // pre_insert_list.clear ();
@ -493,8 +493,8 @@ RouteParams_UI::inserts_changed ()
cleanup_pre_view(); cleanup_pre_view();
cleanup_post_view(); cleanup_post_view();
_pre_insert.reset ((Redirect*) 0); _pre_processor.reset ((Processor*) 0);
_post_insert.reset ((Redirect*) 0); _post_processor.reset ((Processor*) 0);
//update_title(); //update_title();
} }
@ -518,10 +518,10 @@ RouteParams_UI::show_track_menu()
void void
RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Insert> insert, ARDOUR::Placement place) RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> insert, ARDOUR::Placement place)
{ {
if ((place == PreFader && _pre_insert == insert) if ((place == PreFader && _pre_processor == insert)
|| (place == PostFader && _post_insert == insert)){ || (place == PostFader && _post_processor == insert)){
return; return;
} }
@ -593,9 +593,9 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Insert> insert, ARD
} }
if (place == PreFader) { if (place == PreFader) {
_pre_insert = insert; _pre_processor = insert;
} else { } else {
_post_insert = insert; _post_processor = insert;
} }
update_title(); update_title();
@ -611,28 +611,28 @@ RouteParams_UI::plugin_going_away (Placement place)
if (place == PreFader) { if (place == PreFader) {
cleanup_pre_view (false); cleanup_pre_view (false);
_pre_insert.reset ((Redirect*) 0); _pre_processor.reset ((Processor*) 0);
} }
else { else {
cleanup_post_view (false); cleanup_post_view (false);
_post_insert.reset ((Redirect*) 0); _post_processor.reset ((Processor*) 0);
} }
} }
void void
RouteParams_UI::redirect_going_away (boost::shared_ptr<ARDOUR::Insert> insert) RouteParams_UI::redirect_going_away (boost::shared_ptr<ARDOUR::Processor> insert)
{ {
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), insert)); ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), insert));
printf ("redirect going away\n"); printf ("redirect going away\n");
// delete the current view without calling finish // delete the current view without calling finish
if (insert == _pre_insert) { if (insert == _pre_processor) {
cleanup_pre_view (false); cleanup_pre_view (false);
_pre_insert.reset ((Redirect*) 0); _pre_processor.reset ((Processor*) 0);
} else if (insert == _post_insert) { } else if (insert == _post_processor) {
cleanup_post_view (false); cleanup_post_view (false);
_post_insert.reset ((Redirect*) 0); _post_processor.reset ((Processor*) 0);
} }
} }

View file

@ -36,17 +36,17 @@
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <ardour/io.h> #include <ardour/io.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include "io_selector.h" #include "io_selector.h"
#include "ardour_dialog.h" #include "ardour_dialog.h"
#include "redirect_box.h" #include "processor_box.h"
#include "route_redirect_selection.h" #include "route_processor_selection.h"
namespace ARDOUR { namespace ARDOUR {
class Route; class Route;
class Send; class Send;
class Insert; class Processor;
class Session; class Session;
class PortInsert; class PortInsert;
class Connection; class Connection;
@ -89,8 +89,8 @@ class RouteParams_UI : public ArdourDialog
Gtk::HBox route_hpacker; Gtk::HBox route_hpacker;
Gtk::VBox route_vpacker; Gtk::VBox route_vpacker;
RedirectBox * pre_insert_box; ProcessorBox * pre_insert_box;
RedirectBox * post_insert_box; ProcessorBox * post_insert_box;
Gtk::HPaned list_hpane; Gtk::HPaned list_hpane;
@ -121,11 +121,11 @@ class RouteParams_UI : public ArdourDialog
sigc::connection _route_conn; sigc::connection _route_conn;
sigc::connection _route_ds_conn; sigc::connection _route_ds_conn;
boost::shared_ptr<ARDOUR::Insert> _pre_insert; boost::shared_ptr<ARDOUR::Processor> _pre_processor;
sigc::connection _pre_plugin_conn; sigc::connection _pre_plugin_conn;
boost::shared_ptr<ARDOUR::Insert> _post_insert; boost::shared_ptr<ARDOUR::Processor> _post_processor;
sigc::connection _post_plugin_conn; sigc::connection _post_plugin_conn;
enum ConfigView { enum ConfigView {
@ -171,15 +171,15 @@ class RouteParams_UI : public ArdourDialog
void inserts_changed (); void processors_changed ();
void setup_redirect_boxes(); void setup_processor_boxes();
void cleanup_redirect_boxes(); void cleanup_processor_boxes();
void redirect_selected (boost::shared_ptr<ARDOUR::Insert>, ARDOUR::Placement); void redirect_selected (boost::shared_ptr<ARDOUR::Processor>, ARDOUR::Placement);
void plugin_going_away (ARDOUR::Placement); void plugin_going_away (ARDOUR::Placement);
void redirect_going_away (boost::shared_ptr<ARDOUR::Insert>); void redirect_going_away (boost::shared_ptr<ARDOUR::Processor>);
gint edit_input_configuration (GdkEventButton *ev); gint edit_input_configuration (GdkEventButton *ev);
gint edit_output_configuration (GdkEventButton *ev); gint edit_output_configuration (GdkEventButton *ev);

View file

@ -22,10 +22,10 @@
#include <pbd/error.h> #include <pbd/error.h>
#include <ardour/playlist.h> #include <ardour/playlist.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/route.h> #include <ardour/route.h>
#include "route_redirect_selection.h" #include "route_processor_selection.h"
#include "i18n.h" #include "i18n.h"
@ -37,7 +37,7 @@ RouteRedirectSelection&
RouteRedirectSelection::operator= (const RouteRedirectSelection& other) RouteRedirectSelection::operator= (const RouteRedirectSelection& other)
{ {
if (&other != this) { if (&other != this) {
inserts = other.inserts; processors = other.processors;
routes = other.routes; routes = other.routes;
} }
return *this; return *this;
@ -46,22 +46,22 @@ RouteRedirectSelection::operator= (const RouteRedirectSelection& other)
bool bool
operator== (const RouteRedirectSelection& a, const RouteRedirectSelection& b) operator== (const RouteRedirectSelection& a, const RouteRedirectSelection& b)
{ {
return a.inserts == b.inserts && return a.processors == b.processors &&
a.routes == b.routes; a.routes == b.routes;
} }
void void
RouteRedirectSelection::clear () RouteRedirectSelection::clear ()
{ {
clear_inserts (); clear_processors ();
clear_routes (); clear_routes ();
} }
void void
RouteRedirectSelection::clear_inserts () RouteRedirectSelection::clear_processors ()
{ {
inserts.clear (); processors.clear ();
InsertsChanged (); ProcessorsChanged ();
} }
void void
@ -72,27 +72,27 @@ RouteRedirectSelection::clear_routes ()
} }
void void
RouteRedirectSelection::add (boost::shared_ptr<Insert> r) RouteRedirectSelection::add (boost::shared_ptr<Processor> r)
{ {
if (find (inserts.begin(), inserts.end(), r) == inserts.end()) { if (find (processors.begin(), processors.end(), r) == processors.end()) {
inserts.push_back (r); processors.push_back (r);
// XXX SHAREDPTR FIXME // XXX SHAREDPTR FIXME
// void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove; // void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove;
// r->GoingAway.connect (mem_fun(*this, pmf)); // r->GoingAway.connect (mem_fun(*this, pmf));
InsertsChanged(); ProcessorsChanged();
} }
} }
void void
RouteRedirectSelection::add (const vector<boost::shared_ptr<Insert> >& rlist) RouteRedirectSelection::add (const vector<boost::shared_ptr<Processor> >& rlist)
{ {
bool changed = false; bool changed = false;
for (vector<boost::shared_ptr<Insert> >::const_iterator i = rlist.begin(); i != rlist.end(); ++i) { for (vector<boost::shared_ptr<Processor> >::const_iterator i = rlist.begin(); i != rlist.end(); ++i) {
if (find (inserts.begin(), inserts.end(), *i) == inserts.end()) { if (find (processors.begin(), processors.end(), *i) == processors.end()) {
inserts.push_back (*i); processors.push_back (*i);
// XXX SHAREDPTR FIXME // XXX SHAREDPTR FIXME
@ -103,31 +103,31 @@ RouteRedirectSelection::add (const vector<boost::shared_ptr<Insert> >& rlist)
} }
if (changed) { if (changed) {
InsertsChanged(); ProcessorsChanged();
} }
} }
void void
RouteRedirectSelection::remove (boost::shared_ptr<Insert> r) RouteRedirectSelection::remove (boost::shared_ptr<Processor> r)
{ {
list<boost::shared_ptr<Insert> >::iterator i; list<boost::shared_ptr<Processor> >::iterator i;
if ((i = find (inserts.begin(), inserts.end(), r)) != inserts.end()) { if ((i = find (processors.begin(), processors.end(), r)) != processors.end()) {
inserts.erase (i); processors.erase (i);
InsertsChanged (); ProcessorsChanged ();
} }
} }
void void
RouteRedirectSelection::set (boost::shared_ptr<Insert> r) RouteRedirectSelection::set (boost::shared_ptr<Processor> r)
{ {
clear_inserts (); clear_processors ();
add (r); add (r);
} }
void void
RouteRedirectSelection::set (const vector<boost::shared_ptr<Insert> >& rlist) RouteRedirectSelection::set (const vector<boost::shared_ptr<Processor> >& rlist)
{ {
clear_inserts (); clear_processors ();
add (rlist); add (rlist);
} }
@ -171,6 +171,6 @@ RouteRedirectSelection::selected (boost::shared_ptr<Route> r)
bool bool
RouteRedirectSelection::empty () RouteRedirectSelection::empty ()
{ {
return inserts.empty () && routes.empty (); return processors.empty () && routes.empty ();
} }

View file

@ -17,42 +17,42 @@
*/ */
#ifndef __ardour_gtk_route_redirect_selection_h__ #ifndef __ardour_gtk_route_processor_selection_h__
#define __ardour_gtk_route_redirect_selection_h__ #define __ardour_gtk_route_processor_selection_h__
#include <vector> #include <vector>
#include <sigc++/signal.h> #include <sigc++/signal.h>
#include "redirect_selection.h" #include "processor_selection.h"
#include "route_selection.h" #include "route_selection.h"
class RouteRedirectSelection : public sigc::trackable class RouteRedirectSelection : public sigc::trackable
{ {
public: public:
InsertSelection inserts; ProcessorSelection processors;
RouteSelection routes; RouteSelection routes;
RouteRedirectSelection() {} RouteRedirectSelection() {}
RouteRedirectSelection& operator= (const RouteRedirectSelection& other); RouteRedirectSelection& operator= (const RouteRedirectSelection& other);
sigc::signal<void> InsertsChanged; sigc::signal<void> ProcessorsChanged;
sigc::signal<void> RoutesChanged; sigc::signal<void> RoutesChanged;
void clear (); void clear ();
bool empty(); bool empty();
void set (boost::shared_ptr<ARDOUR::Insert>); void set (boost::shared_ptr<ARDOUR::Processor>);
void set (const std::vector<boost::shared_ptr<ARDOUR::Insert> >&); void set (const std::vector<boost::shared_ptr<ARDOUR::Processor> >&);
void add (boost::shared_ptr<ARDOUR::Insert>); void add (boost::shared_ptr<ARDOUR::Processor>);
void add (const std::vector<boost::shared_ptr<ARDOUR::Insert> >&); void add (const std::vector<boost::shared_ptr<ARDOUR::Processor> >&);
void remove (boost::shared_ptr<ARDOUR::Insert>); void remove (boost::shared_ptr<ARDOUR::Processor>);
void set (boost::shared_ptr<ARDOUR::Route>); void set (boost::shared_ptr<ARDOUR::Route>);
void add (boost::shared_ptr<ARDOUR::Route>); void add (boost::shared_ptr<ARDOUR::Route>);
void remove (boost::shared_ptr<ARDOUR::Route>); void remove (boost::shared_ptr<ARDOUR::Route>);
void clear_inserts (); void clear_processors ();
void clear_routes (); void clear_routes ();
bool selected (boost::shared_ptr<ARDOUR::Route>); bool selected (boost::shared_ptr<ARDOUR::Route>);
@ -60,4 +60,4 @@ class RouteRedirectSelection : public sigc::trackable
bool operator==(const RouteRedirectSelection& a, const RouteRedirectSelection& b); bool operator==(const RouteRedirectSelection& a, const RouteRedirectSelection& b);
#endif /* __ardour_gtk_route_redirect_selection_h__ */ #endif /* __ardour_gtk_route_processor_selection_h__ */

View file

@ -43,7 +43,7 @@
#include <ardour/playlist.h> #include <ardour/playlist.h>
#include <ardour/audioplaylist.h> #include <ardour/audioplaylist.h>
#include <ardour/diskstream.h> #include <ardour/diskstream.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/ladspa_plugin.h> #include <ardour/ladspa_plugin.h>
#include <ardour/location.h> #include <ardour/location.h>
#include <ardour/panner.h> #include <ardour/panner.h>
@ -56,8 +56,8 @@
#include "ardour_ui.h" #include "ardour_ui.h"
#include "route_time_axis.h" #include "route_time_axis.h"
#include "automation_time_axis.h" #include "automation_time_axis.h"
#include "redirect_automation_time_axis.h" #include "processor_automation_time_axis.h"
#include "redirect_automation_line.h" #include "plugin_automation_line.h"
#include "canvas_impl.h" #include "canvas_impl.h"
#include "crossfade_view.h" #include "crossfade_view.h"
#include "enums.h" #include "enums.h"
@ -182,7 +182,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
_route->mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed)); _route->mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
_route->solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed)); _route->solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
_route->inserts_changed.connect (mem_fun(*this, &RouteTimeAxisView::inserts_changed)); _route->processors_changed.connect (mem_fun(*this, &RouteTimeAxisView::processors_changed));
_route->NameChanged.connect (mem_fun(*this, &RouteTimeAxisView::route_name_changed)); _route->NameChanged.connect (mem_fun(*this, &RouteTimeAxisView::route_name_changed));
_route->solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed)); _route->solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
@ -207,9 +207,9 @@ RouteTimeAxisView::~RouteTimeAxisView ()
{ {
GoingAway (); /* EMIT_SIGNAL */ GoingAway (); /* EMIT_SIGNAL */
vector_delete (&insert_automation_curves); vector_delete (&processor_automation_curves);
for (list<InsertAutomationInfo*>::iterator i = insert_automation.begin(); i != insert_automation.end(); ++i) { for (list<InsertAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
delete *i; delete *i;
} }
@ -235,9 +235,9 @@ RouteTimeAxisView::post_construct ()
/* map current state of the route */ /* map current state of the route */
update_diskstream_display (); update_diskstream_display ();
_route->foreach_insert (this, &RouteTimeAxisView::add_insert_to_subplugin_menu); _route->foreach_processor (this, &RouteTimeAxisView::add_processor_to_subplugin_menu);
_route->foreach_insert (this, &RouteTimeAxisView::add_existing_insert_automation_curves); _route->foreach_processor (this, &RouteTimeAxisView::add_existing_processor_automation_curves);
reset_insert_automation_curves (); reset_processor_automation_curves ();
} }
void void
@ -285,8 +285,6 @@ RouteTimeAxisView::set_state (const XMLNode& node)
if (param) { if (param) {
cerr << "RTAV::set_state parameter: " << param.to_string() << endl;
XMLProperty* prop = child_node->property ("shown"); XMLProperty* prop = child_node->property ("shown");
if (_automation_tracks.find(param) == _automation_tracks.end()) if (_automation_tracks.find(param) == _automation_tracks.end())
@ -296,7 +294,7 @@ RouteTimeAxisView::set_state (const XMLNode& node)
_show_automation.insert(ParamID(GainAutomation)); _show_automation.insert(ParamID(GainAutomation));
} else { } else {
cerr << "RTAV: no parameter " << child_node->name() << endl; warning << "GUI info exists, but no parameter " << child_node->name() << " found." << endmsg;
} }
} }
} }
@ -1542,12 +1540,12 @@ RouteTimeAxisView::show_all_automation ()
} }
/* Show insert automation */ /* Show processor automation */
for (list<InsertAutomationInfo*>::iterator i = insert_automation.begin(); i != insert_automation.end(); ++i) { for (list<InsertAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
for (vector<InsertAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) { for (vector<InsertAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
if ((*ii)->view == 0) { if ((*ii)->view == 0) {
add_insert_automation_curve ((*i)->insert, (*ii)->what); add_processor_automation_curve ((*i)->processor, (*ii)->what);
} }
(*ii)->menu_item->set_active (true); (*ii)->menu_item->set_active (true);
@ -1581,9 +1579,9 @@ RouteTimeAxisView::show_existing_automation ()
} }
/* Show insert automation */ /* Show processor automation */
for (list<InsertAutomationInfo*>::iterator i = insert_automation.begin(); i != insert_automation.end(); ++i) { for (list<InsertAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
for (vector<InsertAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) { for (vector<InsertAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
if ((*ii)->view != 0) { if ((*ii)->view != 0) {
(*ii)->menu_item->set_active (true); (*ii)->menu_item->set_active (true);
@ -1601,7 +1599,7 @@ RouteTimeAxisView::hide_all_automation ()
{ {
no_redraw = true; no_redraw = true;
for (list<InsertAutomationInfo*>::iterator i = insert_automation.begin(); i != insert_automation.end(); ++i) { for (list<InsertAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
for (vector<InsertAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) { for (vector<InsertAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
(*ii)->menu_item->set_active (false); (*ii)->menu_item->set_active (false);
} }
@ -1625,7 +1623,7 @@ RouteTimeAxisView::region_view_added (RegionView* rv)
} }
void void
RouteTimeAxisView::add_ghost_to_insert (RegionView* rv, AutomationTimeAxisView* atv) RouteTimeAxisView::add_ghost_to_processor (RegionView* rv, AutomationTimeAxisView* atv)
{ {
rv->add_ghost (*atv); rv->add_ghost (*atv);
} }
@ -1656,11 +1654,11 @@ RouteTimeAxisView::remove_ran (InsertAutomationNode* ran)
} }
RouteTimeAxisView::InsertAutomationNode* RouteTimeAxisView::InsertAutomationNode*
RouteTimeAxisView::find_insert_automation_node (boost::shared_ptr<Insert> insert, ParamID what) RouteTimeAxisView::find_processor_automation_node (boost::shared_ptr<Processor> processor, ParamID what)
{ {
for (list<InsertAutomationInfo*>::iterator i = insert_automation.begin(); i != insert_automation.end(); ++i) { for (list<InsertAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
if ((*i)->insert == insert) { if ((*i)->processor == processor) {
for (vector<InsertAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) { for (vector<InsertAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
if ((*ii)->what == what) { if ((*ii)->what == what) {
@ -1693,16 +1691,16 @@ legalize_for_xml_node (string str)
void void
RouteTimeAxisView::add_insert_automation_curve (boost::shared_ptr<Insert> insert, ParamID what) RouteTimeAxisView::add_processor_automation_curve (boost::shared_ptr<Processor> processor, ParamID what)
{ {
RedirectAutomationLine* ral; ProcessorAutomationLine* ral;
string name; string name;
InsertAutomationNode* ran; InsertAutomationNode* ran;
if ((ran = find_insert_automation_node (insert, what)) == 0) { if ((ran = find_processor_automation_node (processor, what)) == 0) {
fatal << _("programming error: ") fatal << _("programming error: ")
<< string_compose (X_("insert automation curve for %1:%2 not registered with audio track!"), << string_compose (X_("processor automation curve for %1:%2 not registered with track!"),
insert->name(), what) processor->name(), what)
<< endmsg; << endmsg;
/*NOTREACHED*/ /*NOTREACHED*/
return; return;
@ -1712,25 +1710,25 @@ RouteTimeAxisView::add_insert_automation_curve (boost::shared_ptr<Insert> insert
return; return;
} }
name = insert->describe_parameter (what); name = processor->describe_parameter (what);
/* create a string that is a legal XML node name that can be used to refer to this redirect+port combination */ /* create a string that is a legal XML node name that can be used to refer to this redirect+port combination */
char state_name[256]; char state_name[256];
snprintf (state_name, sizeof (state_name), "Redirect-%s-%" PRIu32, legalize_for_xml_node (insert->name()).c_str(), what.id()); snprintf (state_name, sizeof (state_name), "Redirect-%s-%" PRIu32, legalize_for_xml_node (processor->name()).c_str(), what.id());
ran->view = new RedirectAutomationTimeAxisView (_session, _route, editor, *this, parent_canvas, name, what, *insert, state_name); ran->view = new ProcessorAutomationTimeAxisView (_session, _route, editor, *this, parent_canvas, name, what, *processor, state_name);
ral = new RedirectAutomationLine (name, ral = new ProcessorAutomationLine (name,
*insert, what, _session, *ran->view, *processor, what, *ran->view,
*ran->view->canvas_display, *insert->automation_list (what, true)); *ran->view->canvas_display, *processor->automation_list (what, true));
ral->set_line_color (Config->canvasvar_RedirectAutomationLine.get()); ral->set_line_color (Config->canvasvar_ProcessorAutomationLine.get());
ral->queue_reset (); ral->queue_reset ();
ran->view->add_line (*ral); ran->view->add_line (*ral);
ran->view->Hiding.connect (bind (mem_fun(*this, &RouteTimeAxisView::insert_automation_track_hidden), ran, insert)); ran->view->Hiding.connect (bind (mem_fun(*this, &RouteTimeAxisView::processor_automation_track_hidden), ran, processor));
if (!ran->view->marked_for_display()) { if (!ran->view->marked_for_display()) {
ran->view->hide (); ran->view->hide ();
@ -1741,14 +1739,14 @@ RouteTimeAxisView::add_insert_automation_curve (boost::shared_ptr<Insert> insert
add_child (ran->view); add_child (ran->view);
if (_view) { if (_view) {
_view->foreach_regionview (bind (mem_fun(*this, &RouteTimeAxisView::add_ghost_to_insert), ran->view)); _view->foreach_regionview (bind (mem_fun(*this, &RouteTimeAxisView::add_ghost_to_processor), ran->view));
} }
insert->mark_automation_visible (what, true); processor->mark_automation_visible (what, true);
} }
void void
RouteTimeAxisView::insert_automation_track_hidden (RouteTimeAxisView::InsertAutomationNode* ran, boost::shared_ptr<Insert> i) RouteTimeAxisView::processor_automation_track_hidden (RouteTimeAxisView::InsertAutomationNode* ran, boost::shared_ptr<Processor> i)
{ {
if (!_hidden) { if (!_hidden) {
ran->menu_item->set_active (false); ran->menu_item->set_active (false);
@ -1760,19 +1758,19 @@ RouteTimeAxisView::insert_automation_track_hidden (RouteTimeAxisView::InsertAuto
} }
void void
RouteTimeAxisView::add_existing_insert_automation_curves (boost::shared_ptr<Insert> insert) RouteTimeAxisView::add_existing_processor_automation_curves (boost::shared_ptr<Processor> processor)
{ {
set<ParamID> s; set<ParamID> s;
RedirectAutomationLine *ral; ProcessorAutomationLine *ral;
insert->what_has_visible_automation (s); processor->what_has_visible_automation (s);
for (set<ParamID>::iterator i = s.begin(); i != s.end(); ++i) { for (set<ParamID>::iterator i = s.begin(); i != s.end(); ++i) {
if ((ral = find_insert_automation_curve (insert, *i)) != 0) { if ((ral = find_processor_automation_curve (processor, *i)) != 0) {
ral->queue_reset (); ral->queue_reset ();
} else { } else {
add_insert_automation_curve (insert, (*i)); add_processor_automation_curve (processor, (*i));
} }
} }
} }
@ -1811,31 +1809,31 @@ RouteTimeAxisView::add_automation_child(ParamID param, AutomationTimeAxisView* t
void void
RouteTimeAxisView::add_insert_to_subplugin_menu (boost::shared_ptr<Insert> insert) RouteTimeAxisView::add_processor_to_subplugin_menu (boost::shared_ptr<Processor> processor)
{ {
using namespace Menu_Helpers; using namespace Menu_Helpers;
InsertAutomationInfo *rai; InsertAutomationInfo *rai;
list<InsertAutomationInfo*>::iterator x; list<InsertAutomationInfo*>::iterator x;
const std::set<ParamID>& automatable = insert->what_can_be_automated (); const std::set<ParamID>& automatable = processor->what_can_be_automated ();
std::set<ParamID> has_visible_automation; std::set<ParamID> has_visible_automation;
insert->what_has_visible_automation(has_visible_automation); processor->what_has_visible_automation(has_visible_automation);
if (automatable.empty()) { if (automatable.empty()) {
return; return;
} }
for (x = insert_automation.begin(); x != insert_automation.end(); ++x) { for (x = processor_automation.begin(); x != processor_automation.end(); ++x) {
if ((*x)->insert == insert) { if ((*x)->processor == processor) {
break; break;
} }
} }
if (x == insert_automation.end()) { if (x == processor_automation.end()) {
rai = new InsertAutomationInfo (insert); rai = new InsertAutomationInfo (processor);
insert_automation.push_back (rai); processor_automation.push_back (rai);
} else { } else {
@ -1843,7 +1841,7 @@ RouteTimeAxisView::add_insert_to_subplugin_menu (boost::shared_ptr<Insert> inser
} }
/* any older menu was deleted at the top of inserts_changed() /* any older menu was deleted at the top of processors_changed()
when we cleared the subplugin menu. when we cleared the subplugin menu.
*/ */
@ -1858,7 +1856,7 @@ RouteTimeAxisView::add_insert_to_subplugin_menu (boost::shared_ptr<Insert> inser
InsertAutomationNode* ran; InsertAutomationNode* ran;
CheckMenuItem* mitem; CheckMenuItem* mitem;
string name = insert->describe_parameter (*i); string name = processor->describe_parameter (*i);
items.push_back (CheckMenuElem (name)); items.push_back (CheckMenuElem (name));
mitem = dynamic_cast<CheckMenuItem*> (&items.back()); mitem = dynamic_cast<CheckMenuItem*> (&items.back());
@ -1867,7 +1865,7 @@ RouteTimeAxisView::add_insert_to_subplugin_menu (boost::shared_ptr<Insert> inser
mitem->set_active(true); mitem->set_active(true);
} }
if ((ran = find_insert_automation_node (insert, *i)) == 0) { if ((ran = find_processor_automation_node (processor, *i)) == 0) {
/* new item */ /* new item */
@ -1881,28 +1879,28 @@ RouteTimeAxisView::add_insert_to_subplugin_menu (boost::shared_ptr<Insert> inser
} }
mitem->signal_toggled().connect (bind (mem_fun(*this, &RouteTimeAxisView::insert_menu_item_toggled), rai, ran)); mitem->signal_toggled().connect (bind (mem_fun(*this, &RouteTimeAxisView::processor_menu_item_toggled), rai, ran));
} }
/* add the menu for this insert, because the subplugin /* add the menu for this processor, because the subplugin
menu is always cleared at the top of inserts_changed(). menu is always cleared at the top of processors_changed().
this is the result of some poor design in gtkmm and/or this is the result of some poor design in gtkmm and/or
GTK+. GTK+.
*/ */
subplugin_menu.items().push_back (MenuElem (insert->name(), *rai->menu)); subplugin_menu.items().push_back (MenuElem (processor->name(), *rai->menu));
rai->valid = true; rai->valid = true;
} }
void void
RouteTimeAxisView::insert_menu_item_toggled (RouteTimeAxisView::InsertAutomationInfo* rai, RouteTimeAxisView::processor_menu_item_toggled (RouteTimeAxisView::InsertAutomationInfo* rai,
RouteTimeAxisView::InsertAutomationNode* ran) RouteTimeAxisView::InsertAutomationNode* ran)
{ {
bool showit = ran->menu_item->get_active(); bool showit = ran->menu_item->get_active();
bool redraw = false; bool redraw = false;
if (ran->view == 0 && showit) { if (ran->view == 0 && showit) {
add_insert_automation_curve (rai->insert, ran->what); add_processor_automation_curve (rai->processor, ran->what);
redraw = true; redraw = true;
} }
@ -1912,7 +1910,7 @@ RouteTimeAxisView::insert_menu_item_toggled (RouteTimeAxisView::InsertAutomation
ran->view->set_marked_for_display (true); ran->view->set_marked_for_display (true);
ran->view->canvas_display->show(); ran->view->canvas_display->show();
} else { } else {
rai->insert->mark_automation_visible (ran->what, true); rai->processor->mark_automation_visible (ran->what, true);
ran->view->set_marked_for_display (false); ran->view->set_marked_for_display (false);
ran->view->hide (); ran->view->hide ();
} }
@ -1931,20 +1929,20 @@ RouteTimeAxisView::insert_menu_item_toggled (RouteTimeAxisView::InsertAutomation
} }
void void
RouteTimeAxisView::inserts_changed () RouteTimeAxisView::processors_changed ()
{ {
using namespace Menu_Helpers; using namespace Menu_Helpers;
for (list<InsertAutomationInfo*>::iterator i = insert_automation.begin(); i != insert_automation.end(); ++i) { for (list<InsertAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
(*i)->valid = false; (*i)->valid = false;
} }
subplugin_menu.items().clear (); subplugin_menu.items().clear ();
_route->foreach_insert (this, &RouteTimeAxisView::add_insert_to_subplugin_menu); _route->foreach_processor (this, &RouteTimeAxisView::add_processor_to_subplugin_menu);
_route->foreach_insert (this, &RouteTimeAxisView::add_existing_insert_automation_curves); _route->foreach_processor (this, &RouteTimeAxisView::add_existing_processor_automation_curves);
for (list<InsertAutomationInfo*>::iterator i = insert_automation.begin(); i != insert_automation.end(); ) { for (list<InsertAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ) {
list<InsertAutomationInfo*>::iterator tmp; list<InsertAutomationInfo*>::iterator tmp;
@ -1954,7 +1952,7 @@ RouteTimeAxisView::inserts_changed ()
if (!(*i)->valid) { if (!(*i)->valid) {
delete *i; delete *i;
insert_automation.erase (i); processor_automation.erase (i);
} }
@ -1966,14 +1964,14 @@ RouteTimeAxisView::inserts_changed ()
_route->gui_changed ("track_height", this); _route->gui_changed ("track_height", this);
} }
RedirectAutomationLine * ProcessorAutomationLine *
RouteTimeAxisView::find_insert_automation_curve (boost::shared_ptr<Insert> insert, ParamID what) RouteTimeAxisView::find_processor_automation_curve (boost::shared_ptr<Processor> processor, ParamID what)
{ {
InsertAutomationNode* ran; InsertAutomationNode* ran;
if ((ran = find_insert_automation_node (insert, what)) != 0) { if ((ran = find_processor_automation_node (processor, what)) != 0) {
if (ran->view) { if (ran->view) {
return dynamic_cast<RedirectAutomationLine*> (ran->view->lines.front()); return dynamic_cast<ProcessorAutomationLine*> (ran->view->lines.front());
} }
} }
@ -1981,9 +1979,9 @@ RouteTimeAxisView::find_insert_automation_curve (boost::shared_ptr<Insert> inser
} }
void void
RouteTimeAxisView::reset_insert_automation_curves () RouteTimeAxisView::reset_processor_automation_curves ()
{ {
for (vector<RedirectAutomationLine*>::iterator i = insert_automation_curves.begin(); i != insert_automation_curves.end(); ++i) { for (vector<ProcessorAutomationLine*>::iterator i = processor_automation_curves.begin(); i != processor_automation_curves.end(); ++i) {
(*i)->reset(); (*i)->reset();
} }
} }

View file

@ -45,8 +45,8 @@ namespace ARDOUR {
class Region; class Region;
class Diskstream; class Diskstream;
class RouteGroup; class RouteGroup;
class Redirect; class IOProcessor;
class Insert; class Processor;
class Location; class Location;
class Playlist; class Playlist;
} }
@ -59,7 +59,7 @@ class RegionSelection;
class Selectable; class Selectable;
class AutomationTimeAxisView; class AutomationTimeAxisView;
class AutomationLine; class AutomationLine;
class RedirectAutomationLine; class ProcessorAutomationLine;
class TimeSelection; class TimeSelection;
class RouteTimeAxisView : public RouteUI, public TimeAxisView class RouteTimeAxisView : public RouteUI, public TimeAxisView
@ -128,13 +128,13 @@ protected:
}; };
struct InsertAutomationInfo { struct InsertAutomationInfo {
boost::shared_ptr<ARDOUR::Insert> insert; boost::shared_ptr<ARDOUR::Processor> processor;
bool valid; bool valid;
Gtk::Menu* menu; Gtk::Menu* menu;
vector<InsertAutomationNode*> lines; vector<InsertAutomationNode*> lines;
InsertAutomationInfo (boost::shared_ptr<ARDOUR::Insert> i) InsertAutomationInfo (boost::shared_ptr<ARDOUR::Processor> i)
: insert (i), valid (true), menu (0) {} : processor (i), valid (true), menu (0) {}
~InsertAutomationInfo (); ~InsertAutomationInfo ();
}; };
@ -145,16 +145,16 @@ protected:
gint edit_click (GdkEventButton *); gint edit_click (GdkEventButton *);
void inserts_changed (); void processors_changed ();
void add_insert_to_subplugin_menu (boost::shared_ptr<ARDOUR::Insert>); void add_processor_to_subplugin_menu (boost::shared_ptr<ARDOUR::Processor>);
void remove_ran (InsertAutomationNode* ran); void remove_ran (InsertAutomationNode* ran);
void insert_menu_item_toggled (RouteTimeAxisView::InsertAutomationInfo*, void processor_menu_item_toggled (RouteTimeAxisView::InsertAutomationInfo*,
RouteTimeAxisView::InsertAutomationNode*); RouteTimeAxisView::InsertAutomationNode*);
void insert_automation_track_hidden (InsertAutomationNode*, void processor_automation_track_hidden (InsertAutomationNode*,
boost::shared_ptr<ARDOUR::Insert>); boost::shared_ptr<ARDOUR::Processor>);
void automation_track_hidden (ARDOUR::ParamID param); void automation_track_hidden (ARDOUR::ParamID param);
@ -162,17 +162,17 @@ protected:
RouteAutomationNode* automation_track(ARDOUR::AutomationType type); RouteAutomationNode* automation_track(ARDOUR::AutomationType type);
InsertAutomationNode* InsertAutomationNode*
find_insert_automation_node (boost::shared_ptr<ARDOUR::Insert> i, ARDOUR::ParamID); find_processor_automation_node (boost::shared_ptr<ARDOUR::Processor> i, ARDOUR::ParamID);
RedirectAutomationLine* ProcessorAutomationLine*
find_insert_automation_curve (boost::shared_ptr<ARDOUR::Insert> i, ARDOUR::ParamID); find_processor_automation_curve (boost::shared_ptr<ARDOUR::Processor> i, ARDOUR::ParamID);
void add_insert_automation_curve (boost::shared_ptr<ARDOUR::Insert> r, ARDOUR::ParamID); void add_processor_automation_curve (boost::shared_ptr<ARDOUR::Processor> r, ARDOUR::ParamID);
void add_existing_insert_automation_curves (boost::shared_ptr<ARDOUR::Insert>); void add_existing_processor_automation_curves (boost::shared_ptr<ARDOUR::Processor>);
void add_automation_child(ARDOUR::ParamID param, AutomationTimeAxisView* track); void add_automation_child(ARDOUR::ParamID param, AutomationTimeAxisView* track);
void reset_insert_automation_curves (); void reset_processor_automation_curves ();
void take_name_changed (void *src); void take_name_changed (void *src);
void route_name_changed (); void route_name_changed ();
@ -222,7 +222,7 @@ protected:
void color_handler (); void color_handler ();
void region_view_added (RegionView*); void region_view_added (RegionView*);
void add_ghost_to_insert (RegionView*, AutomationTimeAxisView*); void add_ghost_to_processor (RegionView*, AutomationTimeAxisView*);
StreamView* _view; StreamView* _view;
ArdourCanvas::Canvas& parent_canvas; ArdourCanvas::Canvas& parent_canvas;
@ -230,7 +230,7 @@ protected:
Gtk::HBox other_button_hbox; Gtk::HBox other_button_hbox;
Gtk::Table button_table; Gtk::Table button_table;
Gtk::Button insert_button; Gtk::Button processor_button;
Gtk::Button edit_group_button; Gtk::Button edit_group_button;
Gtk::Button playlist_button; Gtk::Button playlist_button;
Gtk::Button size_button; Gtk::Button size_button;
@ -257,8 +257,8 @@ protected:
void _set_track_mode (ARDOUR::Track* track, ARDOUR::TrackMode mode, Gtk::RadioMenuItem* reset_item); void _set_track_mode (ARDOUR::Track* track, ARDOUR::TrackMode mode, Gtk::RadioMenuItem* reset_item);
void track_mode_changed (); void track_mode_changed ();
list<InsertAutomationInfo*> insert_automation; list<InsertAutomationInfo*> processor_automation;
vector<RedirectAutomationLine*> insert_automation_curves; vector<ProcessorAutomationLine*> processor_automation_curves;
// Set from XML so context menu automation buttons can be correctly initialized // Set from XML so context menu automation buttons can be correctly initialized
set<ARDOUR::ParamID> _show_automation; set<ARDOUR::ParamID> _show_automation;

View file

@ -98,7 +98,7 @@ class RouteUI : public virtual AxisView
void solo_changed(void*); void solo_changed(void*);
void solo_changed_so_update_mute (); void solo_changed_so_update_mute ();
void mute_changed(void*); void mute_changed(void*);
virtual void inserts_changed () {} virtual void processors_changed () {}
void route_rec_enable_changed(); void route_rec_enable_changed();
void session_rec_enable_changed(); void session_rec_enable_changed();

View file

@ -64,7 +64,7 @@ operator== (const Selection& a, const Selection& b)
a.time == b.time && a.time == b.time &&
a.lines == b.lines && a.lines == b.lines &&
a.playlists == b.playlists && a.playlists == b.playlists &&
a.inserts == b.inserts; a.processors == b.processors;
} }
/** Clear everything from the Selection */ /** Clear everything from the Selection */
@ -77,7 +77,7 @@ Selection::clear ()
clear_lines(); clear_lines();
clear_time (); clear_time ();
clear_playlists (); clear_playlists ();
clear_inserts (); clear_processors ();
} }
void void
@ -91,11 +91,11 @@ Selection::dump_region_layers()
void void
Selection::clear_inserts () Selection::clear_processors ()
{ {
if (!inserts.empty()) { if (!processors.empty()) {
inserts.clear (); processors.clear ();
InsertsChanged (); ProcessorsChanged ();
} }
} }
@ -154,16 +154,16 @@ Selection::clear_lines ()
} }
void void
Selection::toggle (boost::shared_ptr<Insert> r) Selection::toggle (boost::shared_ptr<Processor> r)
{ {
InsertSelection::iterator i; ProcessorSelection::iterator i;
if ((i = find (inserts.begin(), inserts.end(), r)) == inserts.end()) { if ((i = find (processors.begin(), processors.end(), r)) == processors.end()) {
inserts.push_back (r); processors.push_back (r);
} else { } else {
inserts.erase (i); processors.erase (i);
} }
InsertsChanged(); ProcessorsChanged();
} }
@ -254,11 +254,11 @@ Selection::toggle (nframes_t start, nframes_t end)
void void
Selection::add (boost::shared_ptr<Insert> i) Selection::add (boost::shared_ptr<Processor> i)
{ {
if (find (inserts.begin(), inserts.end(), i) == inserts.end()) { if (find (processors.begin(), processors.end(), i) == processors.end()) {
inserts.push_back (i); processors.push_back (i);
InsertsChanged(); ProcessorsChanged();
} }
} }
@ -395,12 +395,12 @@ Selection::add (AutomationList* ac)
} }
void void
Selection::remove (boost::shared_ptr<Insert> r) Selection::remove (boost::shared_ptr<Processor> r)
{ {
InsertSelection::iterator i; ProcessorSelection::iterator i;
if ((i = find (inserts.begin(), inserts.end(), r)) != inserts.end()) { if ((i = find (processors.begin(), processors.end(), r)) != processors.end()) {
inserts.erase (i); processors.erase (i);
InsertsChanged (); ProcessorsChanged ();
} }
} }
@ -510,9 +510,9 @@ Selection::remove (AutomationList *ac)
} }
void void
Selection::set (boost::shared_ptr<Insert> i) Selection::set (boost::shared_ptr<Processor> i)
{ {
clear_inserts (); clear_processors ();
add (i); add (i);
} }
@ -625,7 +625,7 @@ Selection::empty ()
lines.empty () && lines.empty () &&
time.empty () && time.empty () &&
playlists.empty () && playlists.empty () &&
inserts.empty () processors.empty ()
; ;
} }

View file

@ -30,7 +30,7 @@
#include "track_selection.h" #include "track_selection.h"
#include "automation_selection.h" #include "automation_selection.h"
#include "playlist_selection.h" #include "playlist_selection.h"
#include "redirect_selection.h" #include "processor_selection.h"
#include "point_selection.h" #include "point_selection.h"
class TimeAxisView; class TimeAxisView;
@ -41,7 +41,7 @@ namespace ARDOUR {
class Region; class Region;
class AudioRegion; class AudioRegion;
class Playlist; class Playlist;
class Insert; class Processor;
class AutomationList; class AutomationList;
} }
@ -69,7 +69,7 @@ class Selection : public sigc::trackable
TimeSelection time; TimeSelection time;
AutomationSelection lines; AutomationSelection lines;
PlaylistSelection playlists; PlaylistSelection playlists;
InsertSelection inserts; ProcessorSelection processors;
PointSelection points; PointSelection points;
Selection() { Selection() {
@ -84,7 +84,7 @@ class Selection : public sigc::trackable
sigc::signal<void> TimeChanged; sigc::signal<void> TimeChanged;
sigc::signal<void> LinesChanged; sigc::signal<void> LinesChanged;
sigc::signal<void> PlaylistsChanged; sigc::signal<void> PlaylistsChanged;
sigc::signal<void> InsertsChanged; sigc::signal<void> ProcessorsChanged;
sigc::signal<void> PointsChanged; sigc::signal<void> PointsChanged;
void clear (); void clear ();
@ -107,7 +107,7 @@ class Selection : public sigc::trackable
void set (ARDOUR::AutomationList*); void set (ARDOUR::AutomationList*);
void set (boost::shared_ptr<ARDOUR::Playlist>); void set (boost::shared_ptr<ARDOUR::Playlist>);
void set (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&); void set (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
void set (boost::shared_ptr<ARDOUR::Insert>); void set (boost::shared_ptr<ARDOUR::Processor>);
void set (AutomationSelectable*); void set (AutomationSelectable*);
void toggle (TimeAxisView*); void toggle (TimeAxisView*);
@ -118,7 +118,7 @@ class Selection : public sigc::trackable
void toggle (ARDOUR::AutomationList*); void toggle (ARDOUR::AutomationList*);
void toggle (boost::shared_ptr<ARDOUR::Playlist>); void toggle (boost::shared_ptr<ARDOUR::Playlist>);
void toggle (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&); void toggle (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
void toggle (boost::shared_ptr<ARDOUR::Insert>); void toggle (boost::shared_ptr<ARDOUR::Processor>);
void toggle (const std::vector<AutomationSelectable*>&); void toggle (const std::vector<AutomationSelectable*>&);
void add (TimeAxisView*); void add (TimeAxisView*);
@ -129,7 +129,7 @@ class Selection : public sigc::trackable
void add (ARDOUR::AutomationList*); void add (ARDOUR::AutomationList*);
void add (boost::shared_ptr<ARDOUR::Playlist>); void add (boost::shared_ptr<ARDOUR::Playlist>);
void add (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&); void add (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
void add (boost::shared_ptr<ARDOUR::Insert>); void add (boost::shared_ptr<ARDOUR::Processor>);
void remove (TimeAxisView*); void remove (TimeAxisView*);
void remove (const std::list<TimeAxisView*>&); void remove (const std::list<TimeAxisView*>&);
@ -139,7 +139,7 @@ class Selection : public sigc::trackable
void remove (ARDOUR::AutomationList*); void remove (ARDOUR::AutomationList*);
void remove (boost::shared_ptr<ARDOUR::Playlist>); void remove (boost::shared_ptr<ARDOUR::Playlist>);
void remove (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&); void remove (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
void remove (boost::shared_ptr<ARDOUR::Insert>); void remove (boost::shared_ptr<ARDOUR::Processor>);
void remove (const list<Selectable*>&); void remove (const list<Selectable*>&);
void replace (uint32_t time_index, nframes_t start, nframes_t end); void replace (uint32_t time_index, nframes_t start, nframes_t end);
@ -149,7 +149,7 @@ class Selection : public sigc::trackable
void clear_time(); void clear_time();
void clear_lines (); void clear_lines ();
void clear_playlists (); void clear_playlists ();
void clear_inserts (); void clear_processors ();
void clear_points (); void clear_points ();
void foreach_region (void (ARDOUR::Region::*method)(void)); void foreach_region (void (ARDOUR::Region::*method)(void));

View file

@ -26,7 +26,7 @@
namespace ARDOUR { namespace ARDOUR {
class Send; class Send;
class Session; class Session;
class Redirect; class IOProcessor;
} }
class IOSelector; class IOSelector;

View file

@ -36,7 +36,7 @@
#include <ardour/session.h> #include <ardour/session.h>
#include <ardour/utils.h> #include <ardour/utils.h>
#include <ardour/ladspa_plugin.h> #include <ardour/ladspa_plugin.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/location.h> #include <ardour/location.h>
#include "ardour_ui.h" #include "ardour_ui.h"

View file

@ -35,7 +35,7 @@
#include <ardour/session.h> #include <ardour/session.h>
#include <ardour/utils.h> #include <ardour/utils.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/location.h> #include <ardour/location.h>
#include "ardour_ui.h" #include "ardour_ui.h"

View file

@ -19,7 +19,7 @@
#include <fst.h> #include <fst.h>
#include <gtk/gtksocket.h> #include <gtk/gtksocket.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/vst_plugin.h> #include <ardour/vst_plugin.h>
#include "plugin_ui.h" #include "plugin_ui.h"

View file

@ -77,7 +77,8 @@ gdither.cc
globals.cc globals.cc
import.cc import.cc
automatable.cc automatable.cc
insert.cc processor.cc
io_processor.cc
plugin_insert.cc plugin_insert.cc
port_insert.cc port_insert.cc
io.cc io.cc
@ -92,7 +93,6 @@ playlist_factory.cc
plugin.cc plugin.cc
plugin_manager.cc plugin_manager.cc
recent_sessions.cc recent_sessions.cc
redirect.cc
region.cc region.cc
region_factory.cc region_factory.cc
reverse.cc reverse.cc

View file

@ -93,7 +93,7 @@ class AutomationList : public PBD::StatefulDestructible
void reposition_for_rt_add (double when); void reposition_for_rt_add (double when);
void rt_add (double when, double value); void rt_add (double when, double value);
void add (double when, double value); void add (double when, double value);
/* this should be private but old-school automation loading needs it in IO/Redirect */ /* this should be private but old-school automation loading needs it in IO/IOProcessor */
void fast_simple_add (double when, double value); void fast_simple_add (double when, double value);
void reset_range (double start, double end); void reset_range (double start, double end);

View file

@ -9,7 +9,7 @@ CANVAS_VARIABLE(canvasvar_MidiBusBase, "midi bus base")
CANVAS_VARIABLE(canvasvar_TimeStretchFill, "time-stretch-fill") CANVAS_VARIABLE(canvasvar_TimeStretchFill, "time-stretch-fill")
CANVAS_VARIABLE(canvasvar_TimeStretchOutline, "time-stretch-outline") CANVAS_VARIABLE(canvasvar_TimeStretchOutline, "time-stretch-outline")
CANVAS_VARIABLE(canvasvar_AutomationLine, "automation line") CANVAS_VARIABLE(canvasvar_AutomationLine, "automation line")
CANVAS_VARIABLE(canvasvar_RedirectAutomationLine, "redirect automation line") CANVAS_VARIABLE(canvasvar_ProcessorAutomationLine, "processor automation line")
CANVAS_VARIABLE(canvasvar_ControlPointFill, "control point fill") CANVAS_VARIABLE(canvasvar_ControlPointFill, "control point fill")
CANVAS_VARIABLE(canvasvar_ControlPointOutline, "control point outline") CANVAS_VARIABLE(canvasvar_ControlPointOutline, "control point outline")
CANVAS_VARIABLE(canvasvar_EnteredControlPointOutline, "entered control point outline") CANVAS_VARIABLE(canvasvar_EnteredControlPointOutline, "entered control point outline")

View file

@ -32,7 +32,7 @@
#include <pbd/undo.h> #include <pbd/undo.h>
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/io.h> #include <ardour/io.h>
#include <ardour/automation_event.h> #include <ardour/automation_event.h>
@ -47,15 +47,15 @@ namespace ARDOUR {
class Session; class Session;
/** A mixer strip element (Insert) with Jack ports (IO). /** A mixer strip element (Processor) with Jack ports (IO).
*/ */
class Redirect : public Insert class IOProcessor : public Processor
{ {
public: public:
Redirect (Session&, const string& name, Placement, IOProcessor (Session&, const string& name, Placement,
int input_min = -1, int input_max = -1, int output_min = -1, int output_max = -1); int input_min = -1, int input_max = -1, int output_min = -1, int output_max = -1);
Redirect (const Redirect&); IOProcessor (const IOProcessor&);
virtual ~Redirect (); virtual ~IOProcessor ();
virtual ChanCount output_streams() const { return _io->n_outputs(); } virtual ChanCount output_streams() const { return _io->n_outputs(); }
virtual ChanCount input_streams () const { return _io->n_inputs(); } virtual ChanCount input_streams () const { return _io->n_inputs(); }
@ -70,8 +70,8 @@ class Redirect : public Insert
virtual void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) = 0; virtual void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) = 0;
void silence (nframes_t nframes, nframes_t offset); void silence (nframes_t nframes, nframes_t offset);
sigc::signal<void,Redirect*,bool> AutomationPlaybackChanged; sigc::signal<void,IOProcessor*,bool> AutomationPlaybackChanged;
sigc::signal<void,Redirect*,uint32_t> AutomationChanged; sigc::signal<void,IOProcessor*,uint32_t> AutomationChanged;
XMLNode& state (bool full_state); XMLNode& state (bool full_state);
int set_state (const XMLNode&); int set_state (const XMLNode&);

View file

@ -21,7 +21,7 @@
#include <vector> #include <vector>
#include <ardour/types.h> #include <ardour/types.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <pbd/fastlog.h> #include <pbd/fastlog.h>
namespace ARDOUR { namespace ARDOUR {
@ -33,9 +33,9 @@ class Session;
/** Meters peaks on the input and stores them for access. /** Meters peaks on the input and stores them for access.
*/ */
class PeakMeter : public Insert { class PeakMeter : public Processor {
public: public:
PeakMeter(Session& s) : Insert(s, "meter", PreFader) {} PeakMeter(Session& s) : Processor(s, "meter", PreFader) {}
void reset (); void reset ();
void reset_max (); void reset_max ();

View file

@ -27,7 +27,7 @@
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <ardour/plugin_state.h> #include <ardour/plugin_state.h>
#include <ardour/types.h> #include <ardour/types.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/automation_event.h> #include <ardour/automation_event.h>
class XMLNode; class XMLNode;
@ -40,7 +40,7 @@ class Plugin;
/** Plugin inserts: send data through a plugin /** Plugin inserts: send data through a plugin
*/ */
class PluginInsert : public Insert class PluginInsert : public Processor
{ {
public: public:
PluginInsert (Session&, boost::shared_ptr<Plugin>, Placement); PluginInsert (Session&, boost::shared_ptr<Plugin>, Placement);

View file

@ -26,7 +26,7 @@
#include <sigc++/signal.h> #include <sigc++/signal.h>
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include <ardour/plugin_state.h> #include <ardour/plugin_state.h>
#include <ardour/types.h> #include <ardour/types.h>
@ -37,10 +37,8 @@ namespace ARDOUR {
class Session; class Session;
/** Port inserts: send output to a Jack port, pick up input at a Jack port /** Port inserts: send output to a Jack port, pick up input at a Jack port
*
* PortInsert IS-A Redirect IS-A Insert, IO
*/ */
class PortInsert : public Redirect class PortInsert : public IOProcessor
{ {
public: public:
PortInsert (Session&, Placement); PortInsert (Session&, Placement);

View file

@ -17,8 +17,8 @@
*/ */
#ifndef __ardour_insert_h__ #ifndef __ardour_processor_h__
#define __ardour_insert_h__ #define __ardour_processor_h__
#include <vector> #include <vector>
#include <string> #include <string>
@ -43,16 +43,16 @@ class Session;
/* A mixer strip element - plugin, send, meter, etc. /* A mixer strip element - plugin, send, meter, etc.
*/ */
class Insert : public Automatable class Processor : public Automatable
{ {
public: public:
static const string state_node_name; static const string state_node_name;
Insert(Session&, const string& name, Placement p); // TODO: remove placement in favour of sort key Processor(Session&, const string& name, Placement p); // TODO: remove placement in favour of sort key
virtual ~Insert() { } virtual ~Processor() { }
static boost::shared_ptr<Insert> clone (boost::shared_ptr<const Insert>); static boost::shared_ptr<Processor> clone (boost::shared_ptr<const Processor>);
uint32_t sort_key() const { return _sort_key; } uint32_t sort_key() const { return _sort_key; }
void set_sort_key (uint32_t key); void set_sort_key (uint32_t key);
@ -93,7 +93,7 @@ class Insert : public Automatable
void *get_gui () const { return _gui; } void *get_gui () const { return _gui; }
void set_gui (void *p) { _gui = p; } void set_gui (void *p) { _gui = p; }
static sigc::signal<void,Insert*> InsertCreated; static sigc::signal<void,Processor*> ProcessorCreated;
sigc::signal<void> ActiveChanged; sigc::signal<void> ActiveChanged;
sigc::signal<void> PlacementChanged; sigc::signal<void> PlacementChanged;
@ -110,4 +110,4 @@ protected:
} // namespace ARDOUR } // namespace ARDOUR
#endif /* __ardour_insert_h__ */ #endif /* __ardour_processor_h__ */

View file

@ -39,12 +39,12 @@
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <ardour/io.h> #include <ardour/io.h>
#include <ardour/session.h> #include <ardour/session.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include <ardour/types.h> #include <ardour/types.h>
namespace ARDOUR { namespace ARDOUR {
class Insert; class Processor;
class Send; class Send;
class RouteGroup; class RouteGroup;
@ -59,7 +59,7 @@ class Route : public IO
{ {
protected: protected:
typedef list<boost::shared_ptr<Insert> > InsertList; typedef list<boost::shared_ptr<Processor> > ProcessorList;
public: public:
@ -100,7 +100,7 @@ class Route : public IO
virtual bool can_record() { return false; } virtual bool can_record() { return false; }
virtual void set_record_enable (bool yn, void *src) {} virtual void set_record_enable (bool yn, void *src) {}
virtual bool record_enabled() const { return false; } virtual bool record_enabled() const { return false; }
virtual void handle_transport_stopped (bool abort, bool did_locate, bool flush_inserts); virtual void handle_transport_stopped (bool abort, bool did_locate, bool flush_processors);
virtual void set_pending_declick (int); virtual void set_pending_declick (int);
/* end of vfunc-based API */ /* end of vfunc-based API */
@ -137,54 +137,54 @@ class Route : public IO
virtual void set_meter_point (MeterPoint, void *src); virtual void set_meter_point (MeterPoint, void *src);
MeterPoint meter_point() const { return _meter_point; } MeterPoint meter_point() const { return _meter_point; }
/* Inserts */ /* Processors */
void flush_inserts (); void flush_processors ();
template<class T> void foreach_insert (T *obj, void (T::*func)(boost::shared_ptr<Insert>)) { template<class T> void foreach_processor (T *obj, void (T::*func)(boost::shared_ptr<Processor>)) {
Glib::RWLock::ReaderLock lm (insert_lock); Glib::RWLock::ReaderLock lm (_processor_lock);
for (InsertList::iterator i = _inserts.begin(); i != _inserts.end(); ++i) { for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
(obj->*func) (*i); (obj->*func) (*i);
} }
} }
boost::shared_ptr<Insert> nth_insert (uint32_t n) { boost::shared_ptr<Processor> nth_processor (uint32_t n) {
Glib::RWLock::ReaderLock lm (insert_lock); Glib::RWLock::ReaderLock lm (_processor_lock);
InsertList::iterator i; ProcessorList::iterator i;
for (i = _inserts.begin(); i != _inserts.end() && n; ++i, --n); for (i = _processors.begin(); i != _processors.end() && n; ++i, --n);
if (i == _inserts.end()) { if (i == _processors.end()) {
return boost::shared_ptr<Redirect> (); return boost::shared_ptr<IOProcessor> ();
} else { } else {
return *i; return *i;
} }
} }
ChanCount max_insert_outs () const { return insert_max_outs; } ChanCount max_processor_outs () const { return processor_max_outs; }
ChanCount pre_fader_streams() const; ChanCount pre_fader_streams() const;
/** A record of the stream configuration at some point in the insert list. /** A record of the stream configuration at some point in the processor list.
* Used to return where and why an insert list configuration request failed. * Used to return where and why an processor list configuration request failed.
*/ */
struct InsertStreams { struct ProcessorStreams {
InsertStreams(size_t i=0, ChanCount c=ChanCount()) : index(i), count(c) {} ProcessorStreams(size_t i=0, ChanCount c=ChanCount()) : index(i), count(c) {}
size_t index; ///< Index of insert where configuration failed size_t index; ///< Index of processor where configuration failed
ChanCount count; ///< Input requested of insert ChanCount count; ///< Input requested of processor
}; };
int add_insert (boost::shared_ptr<Insert>, InsertStreams* err = 0); int add_processor (boost::shared_ptr<Processor>, ProcessorStreams* err = 0);
int add_inserts (const InsertList&, InsertStreams* err = 0); int add_processors (const ProcessorList&, ProcessorStreams* err = 0);
int remove_insert (boost::shared_ptr<Insert>, InsertStreams* err = 0); int remove_processor (boost::shared_ptr<Processor>, ProcessorStreams* err = 0);
int copy_inserts (const Route&, Placement, InsertStreams* err = 0); int copy_processors (const Route&, Placement, ProcessorStreams* err = 0);
int sort_inserts (InsertStreams* err = 0); int sort_processors (ProcessorStreams* err = 0);
void disable_inserts (Placement); void disable_processors (Placement);
void disable_inserts (); void disable_processors ();
void disable_plugins (Placement); void disable_plugins (Placement);
void disable_plugins (); void disable_plugins ();
void ab_plugins (bool forward); void ab_plugins (bool forward);
void clear_inserts (Placement); void clear_processors (Placement);
void all_inserts_flip(); void all_processors_flip();
void all_inserts_active (Placement, bool state); void all_processors_active (Placement, bool state);
virtual nframes_t update_total_latency(); virtual nframes_t update_total_latency();
nframes_t signal_latency() const { return _own_latency; } nframes_t signal_latency() const { return _own_latency; }
@ -198,7 +198,7 @@ class Route : public IO
sigc::signal<void,void*> post_fader_changed; sigc::signal<void,void*> post_fader_changed;
sigc::signal<void,void*> control_outs_changed; sigc::signal<void,void*> control_outs_changed;
sigc::signal<void,void*> main_outs_changed; sigc::signal<void,void*> main_outs_changed;
sigc::signal<void> inserts_changed; sigc::signal<void> processors_changed;
sigc::signal<void,void*> record_enable_changed; sigc::signal<void,void*> record_enable_changed;
sigc::signal<void,void*> edit_group_changed; sigc::signal<void,void*> edit_group_changed;
sigc::signal<void,void*> mix_group_changed; sigc::signal<void,void*> mix_group_changed;
@ -215,8 +215,8 @@ class Route : public IO
int set_state(const XMLNode& node); int set_state(const XMLNode& node);
virtual XMLNode& get_template(); virtual XMLNode& get_template();
XMLNode& get_insert_state (); XMLNode& get_processor_state ();
int set_insert_state (const XMLNode&); int set_processor_state (const XMLNode&);
sigc::signal<void,void*> SelectedChanged; sigc::signal<void,void*> SelectedChanged;
@ -290,29 +290,31 @@ class Route : public IO
gain_t desired_solo_gain; gain_t desired_solo_gain;
gain_t desired_mute_gain; gain_t desired_mute_gain;
nframes_t check_initial_delay (nframes_t, nframes_t&, nframes_t&);
nframes_t _initial_delay; nframes_t _initial_delay;
nframes_t _roll_delay; nframes_t _roll_delay;
nframes_t _own_latency; nframes_t _own_latency;
InsertList _inserts; ProcessorList _processors;
Glib::RWLock insert_lock; Glib::RWLock _processor_lock;
IO *_control_outs; IO *_control_outs;
Glib::Mutex control_outs_lock; Glib::Mutex _control_outs_lock;
RouteGroup *_edit_group; RouteGroup *_edit_group;
RouteGroup *_mix_group; RouteGroup *_mix_group;
std::string _comment; std::string _comment;
bool _have_internal_generator; bool _have_internal_generator;
ToggleControllable _solo_control; ToggleControllable _solo_control;
ToggleControllable _mute_control; ToggleControllable _mute_control;
nframes_t check_initial_delay (nframes_t, nframes_t&, nframes_t&);
void passthru (nframes_t start_frame, nframes_t end_frame, void passthru (nframes_t start_frame, nframes_t end_frame,
nframes_t nframes, nframes_t offset, int declick, bool meter_inputs); nframes_t nframes, nframes_t offset, int declick, bool meter_inputs);
virtual void process_output_buffers (BufferSet& bufs, virtual void process_output_buffers (BufferSet& bufs,
nframes_t start_frame, nframes_t end_frame, nframes_t start_frame, nframes_t end_frame,
nframes_t nframes, nframes_t offset, bool with_inserts, int declick, nframes_t nframes, nframes_t offset, bool with_processors, int declick,
bool meter); bool meter);
protected: protected:
@ -327,14 +329,14 @@ class Route : public IO
sigc::connection input_signal_connection; sigc::connection input_signal_connection;
ChanCount insert_max_outs; ChanCount processor_max_outs;
uint32_t _remote_control_id; uint32_t _remote_control_id;
uint32_t pans_required() const; uint32_t pans_required() const;
ChanCount n_process_buffers (); ChanCount n_process_buffers ();
virtual int _set_state (const XMLNode&, bool call_base); virtual int _set_state (const XMLNode&, bool call_base);
virtual void _set_insert_states (const XMLNodeList&); virtual void _set_processor_states (const XMLNodeList&);
private: private:
void init (); void init ();
@ -355,24 +357,24 @@ class Route : public IO
void input_change_handler (IOChange, void *src); void input_change_handler (IOChange, void *src);
void output_change_handler (IOChange, void *src); void output_change_handler (IOChange, void *src);
int reset_plugin_counts (InsertStreams*); /* locked */ int reset_plugin_counts (ProcessorStreams*); /* locked */
int _reset_plugin_counts (InsertStreams*); /* unlocked */ int _reset_plugin_counts (ProcessorStreams*); /* unlocked */
/* insert I/O channels and plugin count handling */ /* processor I/O channels and plugin count handling */
struct InsertCount { struct ProcessorCount {
boost::shared_ptr<ARDOUR::Insert> insert; boost::shared_ptr<ARDOUR::Processor> processor;
ChanCount in; ChanCount in;
ChanCount out; ChanCount out;
InsertCount (boost::shared_ptr<ARDOUR::Insert> ins) : insert(ins) {} ProcessorCount (boost::shared_ptr<ARDOUR::Processor> ins) : processor(ins) {}
}; };
int32_t apply_some_plugin_counts (std::list<InsertCount>& iclist); int32_t apply_some_plugin_counts (std::list<ProcessorCount>& iclist);
bool check_some_plugin_counts (std::list<InsertCount>& iclist, ChanCount required_inputs, InsertStreams* err_streams); bool check_some_plugin_counts (std::list<ProcessorCount>& iclist, ChanCount required_inputs, ProcessorStreams* err_streams);
void set_deferred_state (); void set_deferred_state ();
void add_insert_from_xml (const XMLNode&); void add_processor_from_xml (const XMLNode&);
}; };
} // namespace ARDOUR } // namespace ARDOUR

View file

@ -28,11 +28,11 @@
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <ardour/audioengine.h> #include <ardour/audioengine.h>
#include <ardour/io.h> #include <ardour/io.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
namespace ARDOUR { namespace ARDOUR {
class Send : public Redirect class Send : public IOProcessor
{ {
public: public:
Send (Session&, Placement); Send (Session&, Placement);

View file

@ -87,9 +87,9 @@ class MidiDiskstream;
class AudioFileSource; class AudioFileSource;
class MidiSource; class MidiSource;
class Auditioner; class Auditioner;
class Insert; class Processor;
class Send; class Send;
class Redirect; class IOProcessor;
class PortInsert; class PortInsert;
class PluginInsert; class PluginInsert;
class Bundle; class Bundle;
@ -1519,8 +1519,8 @@ class Session : public PBD::StatefulDestructible
uint32_t insert_cnt; uint32_t insert_cnt;
void add_insert (Insert *); void add_processor (Processor *);
void remove_insert (Insert *); void remove_processor (Processor *);
/* S/W RAID */ /* S/W RAID */

View file

@ -103,14 +103,14 @@ class Track : public Route
TrackMode _mode; TrackMode _mode;
//private: (FIXME) //private: (FIXME)
struct FreezeRecordInsertInfo { struct FreezeRecordProcessorInfo {
FreezeRecordInsertInfo(XMLNode& st, boost::shared_ptr<Insert> ins) FreezeRecordProcessorInfo(XMLNode& st, boost::shared_ptr<Processor> proc)
: state (st), insert (ins) {} : state (st), processor (proc) {}
XMLNode state; XMLNode state;
boost::shared_ptr<Insert> insert; boost::shared_ptr<Processor> processor;
PBD::ID id; PBD::ID id;
UndoAction memento; UndoAction memento;
}; };
struct FreezeRecord { struct FreezeRecord {
@ -120,10 +120,10 @@ class Track : public Route
~FreezeRecord(); ~FreezeRecord();
boost::shared_ptr<Playlist> playlist; boost::shared_ptr<Playlist> playlist;
vector<FreezeRecordInsertInfo*> insert_info; vector<FreezeRecordProcessorInfo*> processor_info;
bool have_mementos; bool have_mementos;
FreezeState state; FreezeState state;
}; };
struct RecEnableControllable : public PBD::Controllable { struct RecEnableControllable : public PBD::Controllable {
@ -135,11 +135,6 @@ class Track : public Route
Track& track; Track& track;
}; };
//virtual void diskstream_record_enable_changed (void *src) = 0;
//virtual void diskstream_input_channel_changed (void *src) = 0;
//virtual void input_change_handler (void *src) = 0;
virtual void set_state_part_two () = 0; virtual void set_state_part_two () = 0;
FreezeRecord _freeze_record; FreezeRecord _freeze_record;

View file

@ -27,12 +27,12 @@
#include <ardour/audio_track.h> #include <ardour/audio_track.h>
#include <ardour/audio_diskstream.h> #include <ardour/audio_diskstream.h>
#include <ardour/session.h> #include <ardour/session.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include <ardour/audioregion.h> #include <ardour/audioregion.h>
#include <ardour/audiosource.h> #include <ardour/audiosource.h>
#include <ardour/region_factory.h> #include <ardour/region_factory.h>
#include <ardour/route_group_specialized.h> #include <ardour/route_group_specialized.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/plugin_insert.h> #include <ardour/plugin_insert.h>
#include <ardour/audioplaylist.h> #include <ardour/audioplaylist.h>
#include <ardour/playlist_factory.h> #include <ardour/playlist_factory.h>
@ -304,8 +304,8 @@ AudioTrack::state(bool full_state)
freeze_node->add_property ("playlist", _freeze_record.playlist->name()); freeze_node->add_property ("playlist", _freeze_record.playlist->name());
freeze_node->add_property ("state", enum_2_string (_freeze_record.state)); freeze_node->add_property ("state", enum_2_string (_freeze_record.state));
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) { for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
inode = new XMLNode (X_("insert")); inode = new XMLNode (X_("processor"));
(*i)->id.print (buf, sizeof (buf)); (*i)->id.print (buf, sizeof (buf));
inode->add_property (X_("id"), buf); inode->add_property (X_("id"), buf);
inode->add_child_copy ((*i)->state); inode->add_child_copy ((*i)->state);
@ -360,10 +360,10 @@ AudioTrack::set_state_part_two ()
_freeze_record.have_mementos = false; _freeze_record.have_mementos = false;
_freeze_record.state = Frozen; _freeze_record.state = Frozen;
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) { for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
delete *i; delete *i;
} }
_freeze_record.insert_info.clear (); _freeze_record.processor_info.clear ();
if ((prop = fnode->property (X_("playlist"))) != 0) { if ((prop = fnode->property (X_("playlist"))) != 0) {
boost::shared_ptr<Playlist> pl = _session.playlist_by_name (prop->value()); boost::shared_ptr<Playlist> pl = _session.playlist_by_name (prop->value());
@ -384,7 +384,7 @@ AudioTrack::set_state_part_two ()
XMLNodeList clist = fnode->children(); XMLNodeList clist = fnode->children();
for (citer = clist.begin(); citer != clist.end(); ++citer) { for (citer = clist.begin(); citer != clist.end(); ++citer) {
if ((*citer)->name() != X_("insert")) { if ((*citer)->name() != X_("processor")) {
continue; continue;
} }
@ -392,10 +392,10 @@ AudioTrack::set_state_part_two ()
continue; continue;
} }
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()), FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo (*((*citer)->children().front()),
boost::shared_ptr<Insert>()); boost::shared_ptr<Processor>());
frii->id = prop->value (); frii->id = prop->value ();
_freeze_record.insert_info.push_back (frii); _freeze_record.processor_info.push_back (frii);
} }
} }
@ -515,7 +515,7 @@ AudioTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream(); boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream();
{ {
Glib::RWLock::ReaderLock lm (insert_lock, Glib::TRY_LOCK); Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
if (lm.locked()) { if (lm.locked()) {
// automation snapshot can also be called from the non-rt context // automation snapshot can also be called from the non-rt context
// and it uses the redirect list, so we take the lock out here // and it uses the redirect list, so we take the lock out here
@ -524,7 +524,7 @@ AudioTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
} }
if (n_outputs().n_total() == 0 && _inserts.empty()) { if (n_outputs().n_total() == 0 && _processors.empty()) {
return 0; return 0;
} }
@ -620,7 +620,7 @@ int
AudioTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, AudioTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset,
bool can_record, bool rec_monitors_input) bool can_record, bool rec_monitors_input)
{ {
if (n_outputs().n_total() == 0 && _inserts.empty()) { if (n_outputs().n_total() == 0 && _processors.empty()) {
return 0; return 0;
} }
@ -643,12 +643,12 @@ AudioTrack::export_stuff (BufferSet& buffers, nframes_t start, nframes_t nframes
gain_t gain_automation[nframes]; gain_t gain_automation[nframes];
gain_t gain_buffer[nframes]; gain_t gain_buffer[nframes];
float mix_buffer[nframes]; float mix_buffer[nframes];
InsertList::iterator i; ProcessorList::iterator i;
bool post_fader_work = false; bool post_fader_work = false;
gain_t this_gain = _gain; gain_t this_gain = _gain;
boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream(); boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream();
Glib::RWLock::ReaderLock rlock (insert_lock); Glib::RWLock::ReaderLock rlock (_processor_lock);
boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(diskstream->playlist()); boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(diskstream->playlist());
assert(apl); assert(apl);
@ -677,17 +677,17 @@ AudioTrack::export_stuff (BufferSet& buffers, nframes_t start, nframes_t nframes
} }
/* note: only run inserts during export. other layers in the machinery /* note: only run processors during export. other layers in the machinery
will already have checked that there are no external port inserts. will already have checked that there are no external port processors.
*/ */
for (i = _inserts.begin(); i != _inserts.end(); ++i) { for (i = _processors.begin(); i != _processors.end(); ++i) {
boost::shared_ptr<Insert> insert; boost::shared_ptr<Processor> processor;
if ((insert = boost::dynamic_pointer_cast<Insert>(*i)) != 0) { if ((processor = boost::dynamic_pointer_cast<Processor>(*i)) != 0) {
switch (insert->placement()) { switch (processor->placement()) {
case PreFader: case PreFader:
insert->run (buffers, start, start+nframes, nframes, 0); processor->run (buffers, start, start+nframes, nframes, 0);
break; break;
case PostFader: case PostFader:
post_fader_work = true; post_fader_work = true;
@ -719,15 +719,15 @@ AudioTrack::export_stuff (BufferSet& buffers, nframes_t start, nframes_t nframes
if (post_fader_work) { if (post_fader_work) {
for (i = _inserts.begin(); i != _inserts.end(); ++i) { for (i = _processors.begin(); i != _processors.end(); ++i) {
boost::shared_ptr<PluginInsert> insert; boost::shared_ptr<PluginInsert> processor;
if ((insert = boost::dynamic_pointer_cast<PluginInsert>(*i)) != 0) { if ((processor = boost::dynamic_pointer_cast<PluginInsert>(*i)) != 0) {
switch ((*i)->placement()) { switch ((*i)->placement()) {
case PreFader: case PreFader:
break; break;
case PostFader: case PostFader:
insert->run (buffers, start, start+nframes, nframes, 0); processor->run (buffers, start, start+nframes, nframes, 0);
break; break;
} }
} }
@ -796,27 +796,27 @@ AudioTrack::freeze (InterThreadInfo& itt)
return; return;
} }
_freeze_record.insert_info.clear (); _freeze_record.processor_info.clear ();
_freeze_record.have_mementos = true; _freeze_record.have_mementos = true;
{ {
Glib::RWLock::ReaderLock lm (insert_lock); Glib::RWLock::ReaderLock lm (_processor_lock);
for (InsertList::iterator r = _inserts.begin(); r != _inserts.end(); ++r) { for (ProcessorList::iterator r = _processors.begin(); r != _processors.end(); ++r) {
boost::shared_ptr<Insert> insert; boost::shared_ptr<Processor> processor;
if ((insert = boost::dynamic_pointer_cast<Insert>(*r)) != 0) { if ((processor = boost::dynamic_pointer_cast<Processor>(*r)) != 0) {
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo ((*r)->get_state(), insert); FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo ((*r)->get_state(), processor);
frii->id = insert->id(); frii->id = processor->id();
_freeze_record.insert_info.push_back (frii); _freeze_record.processor_info.push_back (frii);
/* now deactivate the insert */ /* now deactivate the processor */
insert->set_active (false); processor->set_active (false);
_session.set_dirty (); _session.set_dirty ();
} }
} }
@ -852,15 +852,15 @@ AudioTrack::unfreeze ()
if (_freeze_record.have_mementos) { if (_freeze_record.have_mementos) {
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) { for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
(*i)->memento (); (*i)->memento ();
} }
} else { } else {
Glib::RWLock::ReaderLock lm (insert_lock); // should this be a write lock? jlc Glib::RWLock::ReaderLock lm (_processor_lock); // should this be a write lock? jlc
for (InsertList::iterator i = _inserts.begin(); i != _inserts.end(); ++i) { for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
for (vector<FreezeRecordInsertInfo*>::iterator ii = _freeze_record.insert_info.begin(); ii != _freeze_record.insert_info.end(); ++ii) { for (vector<FreezeRecordProcessorInfo*>::iterator ii = _freeze_record.processor_info.begin(); ii != _freeze_record.processor_info.end(); ++ii) {
if ((*ii)->id == (*i)->id()) { if ((*ii)->id == (*i)->id()) {
(*i)->set_state (((*ii)->state)); (*i)->set_state (((*ii)->state));
break; break;

View file

@ -122,8 +122,7 @@ Automatable::add_automation_parameter(AutomationList* al)
/* let derived classes do whatever they need with this */ /* let derived classes do whatever they need with this */
automation_list_creation_callback (al->param_id(), *al); automation_list_creation_callback (al->param_id(), *al);
cerr << _name << ": added (visible, can_automate) parameter " << al->param_id().to_string() << ", # params = " cerr << _name << ": added parameter " << al->param_id().to_string() << endl;
<< _parameter_automation.size() << endl;
// FIXME: sane default behaviour? // FIXME: sane default behaviour?
_visible_parameter_automation.insert(al->param_id()); _visible_parameter_automation.insert(al->param_id());
@ -168,7 +167,7 @@ Automatable::automation_list (ParamID parameter, bool create_if_missing)
return al; return al;
} else { } else {
warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg; //warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg;
return NULL; return NULL;
} }
} }
@ -181,7 +180,7 @@ Automatable::automation_list (ParamID parameter) const
if (i != _parameter_automation.end()) { if (i != _parameter_automation.end()) {
return i->second; return i->second;
} else { } else {
warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg; //warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg;
return NULL; return NULL;
} }
} }

View file

@ -1372,8 +1372,6 @@ AutomationList::set_state (const XMLNode& node)
warning << "Legacy session: automation list has no automation-id property."; warning << "Legacy session: automation list has no automation-id property.";
} }
cerr << "Loaded automation " << _param_id.to_string() << endl;
if ((prop = node.property (X_("default"))) != 0){ if ((prop = node.property (X_("default"))) != 0){
_default_value = atof (prop->value()); _default_value = atof (prop->value());
} else { } else {

View file

@ -29,7 +29,7 @@
#include <pbd/xml++.h> #include <pbd/xml++.h>
#include <pbd/enumwriter.h> #include <pbd/enumwriter.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include <ardour/session.h> #include <ardour/session.h>
#include <ardour/utils.h> #include <ardour/utils.h>
#include <ardour/send.h> #include <ardour/send.h>
@ -42,10 +42,10 @@ using namespace std;
using namespace ARDOUR; using namespace ARDOUR;
using namespace PBD; using namespace PBD;
Redirect::Redirect (Session& s, const string& name, Placement p, IOProcessor::IOProcessor (Session& s, const string& name, Placement p,
int input_min, int input_max, int input_min, int input_max,
int output_min, int output_max) int output_min, int output_max)
: Insert(s, name, p) : Processor(s, name, p)
, _io(new IO(s, name, input_min, input_max, output_min, output_max)) , _io(new IO(s, name, input_min, input_max, output_min, output_max))
{ {
_active = false; _active = false;
@ -54,15 +54,15 @@ Redirect::Redirect (Session& s, const string& name, Placement p,
_extra_xml = 0; _extra_xml = 0;
} }
Redirect::~Redirect () IOProcessor::~IOProcessor ()
{ {
notify_callbacks (); notify_callbacks ();
} }
XMLNode& XMLNode&
Redirect::state (bool full_state) IOProcessor::state (bool full_state)
{ {
XMLNode& node = Insert::state(full_state); XMLNode& node = Processor::state(full_state);
node.add_child_nocopy (_io->state (full_state)); node.add_child_nocopy (_io->state (full_state));
@ -70,11 +70,11 @@ Redirect::state (bool full_state)
} }
int int
Redirect::set_state (const XMLNode& node) IOProcessor::set_state (const XMLNode& node)
{ {
const XMLProperty *prop; const XMLProperty *prop;
Insert::set_state(node); Processor::set_state(node);
XMLNodeList nlist = node.children(); XMLNodeList nlist = node.children();
XMLNodeIterator niter; XMLNodeIterator niter;
@ -101,7 +101,7 @@ Redirect::set_state (const XMLNode& node)
} }
void void
Redirect::silence (nframes_t nframes, nframes_t offset) IOProcessor::silence (nframes_t nframes, nframes_t offset)
{ {
_io->silence(nframes, offset); _io->silence(nframes, offset);
} }

View file

@ -118,7 +118,7 @@ PeakMeter::configure_io (ChanCount in, ChanCount out)
assert(_visible_peak_power.size() == limit); assert(_visible_peak_power.size() == limit);
assert(_max_peak_power.size() == limit); assert(_max_peak_power.size() == limit);
Insert::configure_io(in, out); Processor::configure_io(in, out);
return true; return true;
} }

View file

@ -26,11 +26,11 @@
#include <ardour/midi_track.h> #include <ardour/midi_track.h>
#include <ardour/midi_diskstream.h> #include <ardour/midi_diskstream.h>
#include <ardour/session.h> #include <ardour/session.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include <ardour/midi_region.h> #include <ardour/midi_region.h>
#include <ardour/midi_source.h> #include <ardour/midi_source.h>
#include <ardour/route_group_specialized.h> #include <ardour/route_group_specialized.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/midi_playlist.h> #include <ardour/midi_playlist.h>
#include <ardour/panner.h> #include <ardour/panner.h>
#include <ardour/utils.h> #include <ardour/utils.h>
@ -219,8 +219,8 @@ MidiTrack::state(bool full_state)
freeze_node->add_property ("playlist", _freeze_record.playlist->name()); freeze_node->add_property ("playlist", _freeze_record.playlist->name());
freeze_node->add_property ("state", enum_2_string (_freeze_record.state)); freeze_node->add_property ("state", enum_2_string (_freeze_record.state));
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) { for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
inode = new XMLNode (X_("insert")); inode = new XMLNode (X_("processor"));
(*i)->id.print (buf, sizeof(buf)); (*i)->id.print (buf, sizeof(buf));
inode->add_property (X_("id"), buf); inode->add_property (X_("id"), buf);
inode->add_child_copy ((*i)->state); inode->add_child_copy ((*i)->state);
@ -275,10 +275,10 @@ MidiTrack::set_state_part_two ()
_freeze_record.have_mementos = false; _freeze_record.have_mementos = false;
_freeze_record.state = Frozen; _freeze_record.state = Frozen;
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) { for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
delete *i; delete *i;
} }
_freeze_record.insert_info.clear (); _freeze_record.processor_info.clear ();
if ((prop = fnode->property (X_("playlist"))) != 0) { if ((prop = fnode->property (X_("playlist"))) != 0) {
boost::shared_ptr<Playlist> pl = _session.playlist_by_name (prop->value()); boost::shared_ptr<Playlist> pl = _session.playlist_by_name (prop->value());
@ -299,7 +299,7 @@ MidiTrack::set_state_part_two ()
XMLNodeList clist = fnode->children(); XMLNodeList clist = fnode->children();
for (citer = clist.begin(); citer != clist.end(); ++citer) { for (citer = clist.begin(); citer != clist.end(); ++citer) {
if ((*citer)->name() != X_("insert")) { if ((*citer)->name() != X_("processor")) {
continue; continue;
} }
@ -307,10 +307,10 @@ MidiTrack::set_state_part_two ()
continue; continue;
} }
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()), FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo (*((*citer)->children().front()),
boost::shared_ptr<Insert>()); boost::shared_ptr<Processor>());
frii->id = prop->value (); frii->id = prop->value ();
_freeze_record.insert_info.push_back (frii); _freeze_record.processor_info.push_back (frii);
} }
} }
@ -427,7 +427,7 @@ MidiTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
int dret; int dret;
boost::shared_ptr<MidiDiskstream> diskstream = midi_diskstream(); boost::shared_ptr<MidiDiskstream> diskstream = midi_diskstream();
if (n_outputs().n_total() == 0 && _inserts.empty()) { if (n_outputs().n_total() == 0 && _processors.empty()) {
return 0; return 0;
} }
@ -498,7 +498,7 @@ int
MidiTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, MidiTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset,
bool can_record, bool rec_monitors_input) bool can_record, bool rec_monitors_input)
{ {
if (n_outputs().n_midi() == 0 && _inserts.empty()) { if (n_outputs().n_midi() == 0 && _processors.empty()) {
return 0; return 0;
} }
@ -518,7 +518,7 @@ MidiTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_
void void
MidiTrack::process_output_buffers (BufferSet& bufs, MidiTrack::process_output_buffers (BufferSet& bufs,
nframes_t start_frame, nframes_t end_frame, nframes_t start_frame, nframes_t end_frame,
nframes_t nframes, nframes_t offset, bool with_inserts, int declick, nframes_t nframes, nframes_t offset, bool with_processors, int declick,
bool meter) bool meter)
{ {
/* There's no such thing as a MIDI bus for the time being. /* There's no such thing as a MIDI bus for the time being.
@ -529,11 +529,11 @@ MidiTrack::process_output_buffers (BufferSet& bufs,
_meter->run(bufs, start_frame, end_frame, nframes, offset); _meter->run(bufs, start_frame, end_frame, nframes, offset);
} }
// Run all inserts // Run all processors
if (with_inserts) { if (with_processors) {
Glib::RWLock::ReaderLock rm (insert_lock, Glib::TRY_LOCK); Glib::RWLock::ReaderLock rm (_processor_lock, Glib::TRY_LOCK);
if (rm.locked()) { if (rm.locked()) {
for (InsertList::iterator i = _inserts.begin(); i != _inserts.end(); ++i) { for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
(*i)->run (bufs, start_frame, end_frame, nframes, offset); (*i)->run (bufs, start_frame, end_frame, nframes, offset);
} }
} }

View file

@ -53,7 +53,7 @@ using namespace PBD;
const string PluginInsert::port_automation_node_name = "PortAutomation"; const string PluginInsert::port_automation_node_name = "PortAutomation";
PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug, Placement placement) PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug, Placement placement)
: Insert (s, plug->name(), placement) : Processor (s, plug->name(), placement)
{ {
/* the first is the master */ /* the first is the master */
@ -68,11 +68,11 @@ PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug, Placemen
IO::MoreChannels (max(input_streams(), output_streams())); IO::MoreChannels (max(input_streams(), output_streams()));
} }
InsertCreated (this); /* EMIT SIGNAL */ ProcessorCreated (this); /* EMIT SIGNAL */
} }
PluginInsert::PluginInsert (Session& s, const XMLNode& node) PluginInsert::PluginInsert (Session& s, const XMLNode& node)
: Insert (s, "unnamed plugin insert", PreFader) : Processor (s, "unnamed plugin insert", PreFader)
{ {
if (set_state (node)) { if (set_state (node)) {
throw failed_constructor(); throw failed_constructor();
@ -89,7 +89,7 @@ PluginInsert::PluginInsert (Session& s, const XMLNode& node)
} }
PluginInsert::PluginInsert (const PluginInsert& other) PluginInsert::PluginInsert (const PluginInsert& other)
: Insert (other._session, other._name, other.placement()) : Processor (other._session, other._name, other.placement())
{ {
uint32_t count = other._plugins.size(); uint32_t count = other._plugins.size();
@ -103,7 +103,7 @@ PluginInsert::PluginInsert (const PluginInsert& other)
init (); init ();
InsertCreated (this); /* EMIT SIGNAL */ ProcessorCreated (this); /* EMIT SIGNAL */
} }
bool bool
@ -496,7 +496,7 @@ PluginInsert::configure_io (ChanCount in, ChanCount out)
} else { } else {
bool success = set_count (count_for_configuration(in, out)); bool success = set_count (count_for_configuration(in, out));
if (success) if (success)
Insert::configure_io(in, out); Processor::configure_io(in, out);
return success; return success;
} }
} }
@ -634,7 +634,7 @@ XMLNode&
PluginInsert::state (bool full) PluginInsert::state (bool full)
{ {
char buf[256]; char buf[256];
XMLNode& node = Insert::state (full); XMLNode& node = Processor::state (full);
node.add_property ("type", _plugins[0]->state_node_name()); node.add_property ("type", _plugins[0]->state_node_name());
snprintf(buf, sizeof(buf), "%s", _plugins[0]->name()); snprintf(buf, sizeof(buf), "%s", _plugins[0]->name());
@ -745,15 +745,15 @@ PluginInsert::set_state(const XMLNode& node)
const XMLNode* insert_node = &node; const XMLNode* insert_node = &node;
// legacy sessions: search for child Redirect node // legacy sessions: search for child IOProcessor node
for (niter = nlist.begin(); niter != nlist.end(); ++niter) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == "Redirect") { if ((*niter)->name() == "IOProcessor") {
insert_node = *niter; insert_node = *niter;
break; break;
} }
} }
Insert::set_state (*insert_node); Processor::set_state (*insert_node);
/* look for port automation node */ /* look for port automation node */

View file

@ -41,17 +41,17 @@ using namespace ARDOUR;
using namespace PBD; using namespace PBD;
PortInsert::PortInsert (Session& s, Placement p) PortInsert::PortInsert (Session& s, Placement p)
: Redirect (s, string_compose (_("insert %1"), (bitslot = s.next_insert_id()) + 1), p, 1, -1, 1, -1) : IOProcessor (s, string_compose (_("insert %1"), (bitslot = s.next_insert_id()) + 1), p, 1, -1, 1, -1)
{ {
init (); init ();
InsertCreated (this); /* EMIT SIGNAL */ ProcessorCreated (this); /* EMIT SIGNAL */
} }
PortInsert::PortInsert (const PortInsert& other) PortInsert::PortInsert (const PortInsert& other)
: Redirect (other._session, string_compose (_("insert %1"), (bitslot = other._session.next_insert_id()) + 1), other.placement(), 1, -1, 1, -1) : IOProcessor (other._session, string_compose (_("insert %1"), (bitslot = other._session.next_insert_id()) + 1), other.placement(), 1, -1, 1, -1)
{ {
init (); init ();
InsertCreated (this); /* EMIT SIGNAL */ ProcessorCreated (this); /* EMIT SIGNAL */
} }
void void
@ -69,13 +69,13 @@ PortInsert::init ()
} }
PortInsert::PortInsert (Session& s, const XMLNode& node) PortInsert::PortInsert (Session& s, const XMLNode& node)
: Redirect (s, "unnamed port insert", PreFader) : IOProcessor (s, "unnamed port insert", PreFader)
{ {
if (set_state (node)) { if (set_state (node)) {
throw failed_constructor(); throw failed_constructor();
} }
InsertCreated (this); /* EMIT SIGNAL */ ProcessorCreated (this); /* EMIT SIGNAL */
} }
PortInsert::~PortInsert () PortInsert::~PortInsert ()
@ -110,7 +110,7 @@ PortInsert::get_state(void)
XMLNode& XMLNode&
PortInsert::state (bool full) PortInsert::state (bool full)
{ {
XMLNode& node = Redirect::state(full); XMLNode& node = IOProcessor::state(full);
char buf[32]; char buf[32];
node.add_property ("type", "port"); node.add_property ("type", "port");
snprintf (buf, sizeof (buf), "%" PRIu32, bitslot); snprintf (buf, sizeof (buf), "%" PRIu32, bitslot);
@ -146,15 +146,15 @@ PortInsert::set_state(const XMLNode& node)
const XMLNode* insert_node = &node; const XMLNode* insert_node = &node;
// legacy sessions: search for child Redirect node // legacy sessions: search for child IOProcessor node
for (niter = nlist.begin(); niter != nlist.end(); ++niter) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == "Redirect") { if ((*niter)->name() == "IOProcessor") {
insert_node = *niter; insert_node = *niter;
break; break;
} }
} }
Redirect::set_state (*insert_node); IOProcessor::set_state (*insert_node);
return 0; return 0;
} }
@ -227,7 +227,7 @@ PortInsert::configure_io (ChanCount in, ChanCount out)
bool success = (_io->ensure_io (out, in, false, this) == 0); bool success = (_io->ensure_io (out, in, false, this) == 0);
if (success) if (success)
return Insert::configure_io(in, out); return Processor::configure_io(in, out);
else else
return false; return false;
} }

View file

@ -25,7 +25,7 @@
#include <pbd/enumwriter.h> #include <pbd/enumwriter.h>
#include <pbd/xml++.h> #include <pbd/xml++.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/plugin.h> #include <ardour/plugin.h>
#include <ardour/port.h> #include <ardour/port.h>
#include <ardour/route.h> #include <ardour/route.h>
@ -53,12 +53,12 @@ using namespace std;
using namespace ARDOUR; using namespace ARDOUR;
using namespace PBD; using namespace PBD;
sigc::signal<void,Insert*> Insert::InsertCreated; sigc::signal<void,Processor*> Processor::ProcessorCreated;
// Always saved as Insert, but may be Redirect or Send in legacy sessions // Always saved as Processor, but may be IOProcessor or Send in legacy sessions
const string Insert::state_node_name = "Insert"; const string Processor::state_node_name = "Processor";
Insert::Insert(Session& session, const string& name, Placement p) Processor::Processor(Session& session, const string& name, Placement p)
: Automatable(session, name) : Automatable(session, name)
, _active(false) , _active(false)
, _next_ab_is_active(false) , _next_ab_is_active(false)
@ -68,35 +68,35 @@ Insert::Insert(Session& session, const string& name, Placement p)
{ {
} }
boost::shared_ptr<Insert> boost::shared_ptr<Processor>
Insert::clone (boost::shared_ptr<const Insert> other) Processor::clone (boost::shared_ptr<const Processor> other)
{ {
boost::shared_ptr<const Send> send; boost::shared_ptr<const Send> send;
boost::shared_ptr<const PortInsert> port_insert; boost::shared_ptr<const PortInsert> port_insert;
boost::shared_ptr<const PluginInsert> plugin_insert; boost::shared_ptr<const PluginInsert> plugin_insert;
if ((send = boost::dynamic_pointer_cast<const Send>(other)) != 0) { if ((send = boost::dynamic_pointer_cast<const Send>(other)) != 0) {
return boost::shared_ptr<Insert> (new Send (*send)); return boost::shared_ptr<Processor> (new Send (*send));
} else if ((port_insert = boost::dynamic_pointer_cast<const PortInsert>(other)) != 0) { } else if ((port_insert = boost::dynamic_pointer_cast<const PortInsert>(other)) != 0) {
return boost::shared_ptr<Insert> (new PortInsert (*port_insert)); return boost::shared_ptr<Processor> (new PortInsert (*port_insert));
} else if ((plugin_insert = boost::dynamic_pointer_cast<const PluginInsert>(other)) != 0) { } else if ((plugin_insert = boost::dynamic_pointer_cast<const PluginInsert>(other)) != 0) {
return boost::shared_ptr<Insert> (new PluginInsert (*plugin_insert)); return boost::shared_ptr<Processor> (new PluginInsert (*plugin_insert));
} else { } else {
fatal << _("programming error: unknown Insert type in Insert::Clone!\n") fatal << _("programming error: unknown Processor type in Processor::Clone!\n")
<< endmsg; << endmsg;
/*NOTREACHED*/ /*NOTREACHED*/
} }
return boost::shared_ptr<Insert>(); return boost::shared_ptr<Processor>();
} }
void void
Insert::set_sort_key (uint32_t key) Processor::set_sort_key (uint32_t key)
{ {
_sort_key = key; _sort_key = key;
} }
void void
Insert::set_placement (Placement p) Processor::set_placement (Placement p)
{ {
if (_placement != p) { if (_placement != p) {
_placement = p; _placement = p;
@ -105,14 +105,14 @@ Insert::set_placement (Placement p)
} }
void void
Insert::set_active (bool yn) Processor::set_active (bool yn)
{ {
_active = yn; _active = yn;
ActiveChanged (); ActiveChanged ();
} }
XMLNode& XMLNode&
Insert::get_state (void) Processor::get_state (void)
{ {
return state (true); return state (true);
} }
@ -132,7 +132,7 @@ Insert::get_state (void)
*/ */
XMLNode& XMLNode&
Insert::state (bool full_state) Processor::state (bool full_state)
{ {
XMLNode* node = new XMLNode (state_node_name); XMLNode* node = new XMLNode (state_node_name);
stringstream sstr; stringstream sstr;
@ -173,7 +173,7 @@ Insert::state (bool full_state)
} }
int int
Insert::set_state (const XMLNode& node) Processor::set_state (const XMLNode& node)
{ {
const XMLProperty *prop; const XMLProperty *prop;
@ -184,7 +184,6 @@ Insert::set_state (const XMLNode& node)
XMLNodeList nlist = node.children(); XMLNodeList nlist = node.children();
XMLNodeIterator niter; XMLNodeIterator niter;
bool have_io = false;
for (niter = nlist.begin(); niter != nlist.end(); ++niter) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
@ -221,13 +220,8 @@ Insert::set_state (const XMLNode& node)
} }
} }
if (!have_io && dynamic_cast<IO*>(this)) {
error << _("XML node describing a redirect is missing an IO node") << endmsg;
return -1;
}
if ((prop = node.property ("active")) == 0) { if ((prop = node.property ("active")) == 0) {
error << _("XML node describing an insert is missing the `active' field") << endmsg; error << _("XML node describing a processor is missing the `active' field") << endmsg;
return -1; return -1;
} }
@ -237,7 +231,7 @@ Insert::set_state (const XMLNode& node)
} }
if ((prop = node.property ("placement")) == 0) { if ((prop = node.property ("placement")) == 0) {
error << _("XML node describing an insert is missing the `placement' field") << endmsg; error << _("XML node describing a processor is missing the `placement' field") << endmsg;
return -1; return -1;
} }

File diff suppressed because it is too large Load diff

View file

@ -33,14 +33,14 @@ using namespace ARDOUR;
using namespace PBD; using namespace PBD;
Send::Send (Session& s, Placement p) Send::Send (Session& s, Placement p)
: Redirect (s, string_compose (_("send %1"), (bitslot = s.next_send_id()) + 1), p) : IOProcessor (s, string_compose (_("send %1"), (bitslot = s.next_send_id()) + 1), p)
{ {
_metering = false; _metering = false;
InsertCreated (this); /* EMIT SIGNAL */ ProcessorCreated (this); /* EMIT SIGNAL */
} }
Send::Send (Session& s, const XMLNode& node) Send::Send (Session& s, const XMLNode& node)
: Redirect (s, "send", PreFader) : IOProcessor (s, "send", PreFader)
{ {
_metering = false; _metering = false;
@ -48,14 +48,14 @@ Send::Send (Session& s, const XMLNode& node)
throw failed_constructor(); throw failed_constructor();
} }
InsertCreated (this); /* EMIT SIGNAL */ ProcessorCreated (this); /* EMIT SIGNAL */
} }
Send::Send (const Send& other) Send::Send (const Send& other)
: Redirect (other._session, string_compose (_("send %1"), (bitslot = other._session.next_send_id()) + 1), other.placement()) : IOProcessor (other._session, string_compose (_("send %1"), (bitslot = other._session.next_send_id()) + 1), other.placement())
{ {
_metering = false; _metering = false;
InsertCreated (this); /* EMIT SIGNAL */ ProcessorCreated (this); /* EMIT SIGNAL */
} }
Send::~Send () Send::~Send ()
@ -72,7 +72,7 @@ Send::get_state(void)
XMLNode& XMLNode&
Send::state(bool full) Send::state(bool full)
{ {
XMLNode& node = Redirect::state(full); XMLNode& node = IOProcessor::state(full);
char buf[32]; char buf[32];
node.add_property ("type", "send"); node.add_property ("type", "send");
snprintf (buf, sizeof (buf), "%" PRIu32, bitslot); snprintf (buf, sizeof (buf), "%" PRIu32, bitslot);
@ -100,14 +100,14 @@ Send::set_state(const XMLNode& node)
/* Send has regular IO automation (gain, pan) */ /* Send has regular IO automation (gain, pan) */
for (niter = nlist.begin(); niter != nlist.end(); ++niter) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == "Redirect") { if ((*niter)->name() == "IOProcessor") {
insert_node = *niter; insert_node = *niter;
} else if ((*niter)->name() == X_("Automation")) { } else if ((*niter)->name() == X_("Automation")) {
_io->set_automation_state (*(*niter), ParamID(GainAutomation)); _io->set_automation_state (*(*niter), ParamID(GainAutomation));
} }
} }
Redirect::set_state (*insert_node); IOProcessor::set_state (*insert_node);
return 0; return 0;
} }
@ -201,7 +201,7 @@ Send::configure_io (ChanCount in, ChanCount out)
bool success = _io->ensure_io (ChanCount::ZERO, in, false, this) == 0; bool success = _io->ensure_io (ChanCount::ZERO, in, false, this) == 0;
if (success) { if (success) {
Insert::configure_io(in, out); Processor::configure_io(in, out);
_io->reset_panner(); _io->reset_panner();
return true; return true;
} else { } else {

View file

@ -56,9 +56,9 @@
#include <ardour/smf_source.h> #include <ardour/smf_source.h>
#include <ardour/auditioner.h> #include <ardour/auditioner.h>
#include <ardour/recent_sessions.h> #include <ardour/recent_sessions.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include <ardour/send.h> #include <ardour/send.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/plugin_insert.h> #include <ardour/plugin_insert.h>
#include <ardour/port_insert.h> #include <ardour/port_insert.h>
#include <ardour/bundle.h> #include <ardour/bundle.h>
@ -1890,7 +1890,7 @@ Session::add_routes (RouteList& new_routes, bool save)
(*x)->solo_changed.connect (sigc::bind (mem_fun (*this, &Session::route_solo_changed), wpr)); (*x)->solo_changed.connect (sigc::bind (mem_fun (*this, &Session::route_solo_changed), wpr));
(*x)->mute_changed.connect (mem_fun (*this, &Session::route_mute_changed)); (*x)->mute_changed.connect (mem_fun (*this, &Session::route_mute_changed));
(*x)->output_changed.connect (mem_fun (*this, &Session::set_worst_io_latencies_x)); (*x)->output_changed.connect (mem_fun (*this, &Session::set_worst_io_latencies_x));
(*x)->inserts_changed.connect (bind (mem_fun (*this, &Session::update_latency_compensation), false, false)); (*x)->processors_changed.connect (bind (mem_fun (*this, &Session::update_latency_compensation), false, false));
if ((*x)->master()) { if ((*x)->master()) {
_master_out = (*x); _master_out = (*x);
@ -3532,44 +3532,44 @@ Session::record_enable_change_all (bool yn)
} }
void void
Session::add_insert (Insert* insert) Session::add_processor (Processor* processor)
{ {
Send* send; Send* send;
PortInsert* port_insert; PortInsert* port_insert;
PluginInsert* plugin_insert; PluginInsert* plugin_insert;
if ((port_insert = dynamic_cast<PortInsert *> (insert)) != 0) { if ((port_insert = dynamic_cast<PortInsert *> (processor)) != 0) {
_port_inserts.insert (_port_inserts.begin(), port_insert); _port_inserts.insert (_port_inserts.begin(), port_insert);
} else if ((plugin_insert = dynamic_cast<PluginInsert *> (insert)) != 0) { } else if ((plugin_insert = dynamic_cast<PluginInsert *> (processor)) != 0) {
_plugin_inserts.insert (_plugin_inserts.begin(), plugin_insert); _plugin_inserts.insert (_plugin_inserts.begin(), plugin_insert);
} else if ((send = dynamic_cast<Send *> (insert)) != 0) { } else if ((send = dynamic_cast<Send *> (processor)) != 0) {
_sends.insert (_sends.begin(), send); _sends.insert (_sends.begin(), send);
} else { } else {
fatal << _("programming error: unknown type of Insert created!") << endmsg; fatal << _("programming error: unknown type of Insert created!") << endmsg;
/*NOTREACHED*/ /*NOTREACHED*/
} }
insert->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_insert), insert)); processor->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_processor), processor));
set_dirty(); set_dirty();
} }
void void
Session::remove_insert (Insert* insert) Session::remove_processor (Processor* processor)
{ {
Send* send; Send* send;
PortInsert* port_insert; PortInsert* port_insert;
PluginInsert* plugin_insert; PluginInsert* plugin_insert;
if ((port_insert = dynamic_cast<PortInsert *> (insert)) != 0) { if ((port_insert = dynamic_cast<PortInsert *> (processor)) != 0) {
list<PortInsert*>::iterator x = find (_port_inserts.begin(), _port_inserts.end(), port_insert); list<PortInsert*>::iterator x = find (_port_inserts.begin(), _port_inserts.end(), port_insert);
if (x != _port_inserts.end()) { if (x != _port_inserts.end()) {
insert_bitset[port_insert->bit_slot()] = false; insert_bitset[port_insert->bit_slot()] = false;
_port_inserts.erase (x); _port_inserts.erase (x);
} }
} else if ((plugin_insert = dynamic_cast<PluginInsert *> (insert)) != 0) { } else if ((plugin_insert = dynamic_cast<PluginInsert *> (processor)) != 0) {
_plugin_inserts.remove (plugin_insert); _plugin_inserts.remove (plugin_insert);
} else if ((send = dynamic_cast<Send *> (insert)) != 0) { } else if ((send = dynamic_cast<Send *> (processor)) != 0) {
list<Send*>::iterator x = find (_sends.begin(), _sends.end(), send); list<Send*>::iterator x = find (_sends.begin(), _sends.end(), send);
if (x != _sends.end()) { if (x != _sends.end()) {
send_bitset[send->bit_slot()] = false; send_bitset[send->bit_slot()] = false;

View file

@ -78,9 +78,9 @@
#include <ardour/sndfile_helpers.h> #include <ardour/sndfile_helpers.h>
#include <ardour/auditioner.h> #include <ardour/auditioner.h>
#include <ardour/export.h> #include <ardour/export.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include <ardour/send.h> #include <ardour/send.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/bundle.h> #include <ardour/bundle.h>
#include <ardour/slave.h> #include <ardour/slave.h>
#include <ardour/tempo.h> #include <ardour/tempo.h>
@ -260,7 +260,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
RegionFactory::CheckNewRegion.connect (mem_fun (*this, &Session::add_region)); RegionFactory::CheckNewRegion.connect (mem_fun (*this, &Session::add_region));
SourceFactory::SourceCreated.connect (mem_fun (*this, &Session::add_source)); SourceFactory::SourceCreated.connect (mem_fun (*this, &Session::add_source));
PlaylistFactory::PlaylistCreated.connect (mem_fun (*this, &Session::add_playlist)); PlaylistFactory::PlaylistCreated.connect (mem_fun (*this, &Session::add_playlist));
Insert::InsertCreated.connect (mem_fun (*this, &Session::add_insert)); Processor::ProcessorCreated.connect (mem_fun (*this, &Session::add_processor));
NamedSelection::NamedSelectionCreated.connect (mem_fun (*this, &Session::add_named_selection)); NamedSelection::NamedSelectionCreated.connect (mem_fun (*this, &Session::add_named_selection));
AutomationList::AutomationListCreated.connect (mem_fun (*this, &Session::add_automation_list)); AutomationList::AutomationListCreated.connect (mem_fun (*this, &Session::add_automation_list));

View file

@ -581,7 +581,7 @@ Session::flush_all_inserts ()
boost::shared_ptr<RouteList> r = routes.reader (); boost::shared_ptr<RouteList> r = routes.reader ();
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
(*i)->flush_inserts (); (*i)->flush_processors ();
} }
} }

View file

@ -23,11 +23,11 @@
#include <ardour/track.h> #include <ardour/track.h>
#include <ardour/diskstream.h> #include <ardour/diskstream.h>
#include <ardour/session.h> #include <ardour/session.h>
#include <ardour/redirect.h> #include <ardour/io_processor.h>
#include <ardour/audioregion.h> #include <ardour/audioregion.h>
#include <ardour/audiosource.h> #include <ardour/audiosource.h>
#include <ardour/route_group_specialized.h> #include <ardour/route_group_specialized.h>
#include <ardour/insert.h> #include <ardour/processor.h>
#include <ardour/audioplaylist.h> #include <ardour/audioplaylist.h>
#include <ardour/panner.h> #include <ardour/panner.h>
#include <ardour/utils.h> #include <ardour/utils.h>
@ -92,7 +92,7 @@ Track::update_total_latency ()
{ {
_own_latency = 0; _own_latency = 0;
for (InsertList::iterator i = _inserts.begin(); i != _inserts.end(); ++i) { for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
if ((*i)->active ()) { if ((*i)->active ()) {
_own_latency += (*i)->latency (); _own_latency += (*i)->latency ();
} }
@ -106,7 +106,7 @@ Track::update_total_latency ()
Track::FreezeRecord::~FreezeRecord () Track::FreezeRecord::~FreezeRecord ()
{ {
for (vector<FreezeRecordInsertInfo*>::iterator i = insert_info.begin(); i != insert_info.end(); ++i) { for (vector<FreezeRecordProcessorInfo*>::iterator i = processor_info.begin(); i != processor_info.end(); ++i) {
delete *i; delete *i;
} }
} }