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:
parent
09264537c4
commit
05bcdd1d4c
|
@ -51,7 +51,7 @@
|
|||
<Option name="time-stretch-fill" value="e2b5b596"/>
|
||||
<Option name="time-stretch-outline" value="63636396"/>
|
||||
<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 outline" value="000000ff"/>
|
||||
<Option name="entered control point outline" value="ff0000ee"/>
|
||||
|
|
|
@ -168,9 +168,9 @@ plugin_selector.cc
|
|||
plugin_ui.cc
|
||||
prompter.cc
|
||||
public_editor.cc
|
||||
redirect_automation_line.cc
|
||||
redirect_automation_time_axis.cc
|
||||
redirect_box.cc
|
||||
plugin_automation_line.cc
|
||||
processor_automation_time_axis.cc
|
||||
processor_box.cc
|
||||
region_gain_line.cc
|
||||
region_selection.cc
|
||||
region_view.cc
|
||||
|
@ -178,7 +178,7 @@ audio_region_view.cc
|
|||
midi_region_view.cc
|
||||
tape_region_view.cc
|
||||
route_params_ui.cc
|
||||
route_redirect_selection.cc
|
||||
route_processor_selection.cc
|
||||
route_ui.cc
|
||||
selection.cc
|
||||
sfdb_ui.cc
|
||||
|
|
|
@ -74,7 +74,7 @@ void
|
|||
ARDOUR_UI::setup_keybindings ()
|
||||
{
|
||||
install_actions ();
|
||||
RedirectBox::register_actions ();
|
||||
ProcessorBox::register_actions ();
|
||||
|
||||
cerr << "loading bindings from " << keybindings_path << endl;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <ardour/audio_unit.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
|
||||
#include <gtkmm2ext/doi.h>
|
||||
|
||||
|
@ -123,7 +123,7 @@ AUPluginUI::~AUPluginUI ()
|
|||
}
|
||||
|
||||
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));
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
namespace ARDOUR {
|
||||
class AUPlugin;
|
||||
class PluginInsert;
|
||||
class Redirect;
|
||||
class IOProcessor;
|
||||
}
|
||||
|
||||
class AUPluginUI
|
||||
|
@ -41,7 +41,7 @@ class AUPluginUI
|
|||
WindowRef wr;
|
||||
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);
|
||||
};
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include <ardour/audioplaylist.h>
|
||||
#include <ardour/audio_diskstream.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/location.h>
|
||||
#include <ardour/panner.h>
|
||||
#include <ardour/playlist.h>
|
||||
|
@ -102,8 +102,8 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
|||
|
||||
/* map current state of the route */
|
||||
|
||||
inserts_changed ();
|
||||
reset_insert_automation_curves ();
|
||||
processors_changed ();
|
||||
reset_processor_automation_curves ();
|
||||
|
||||
ensure_xml_node ();
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@ namespace ARDOUR {
|
|||
class Session;
|
||||
class AudioDiskstream;
|
||||
class RouteGroup;
|
||||
class Redirect;
|
||||
class Insert;
|
||||
class IOProcessor;
|
||||
class Processor;
|
||||
class Location;
|
||||
class AudioPlaylist;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "automation_pan_line.h"
|
||||
#include "automation_midi_cc_line.h"
|
||||
#include "automation_time_axis.h"
|
||||
#include "redirect_automation_line.h"
|
||||
#include "plugin_automation_line.h"
|
||||
#include "canvas_impl.h"
|
||||
#include "simplerect.h"
|
||||
|
||||
|
@ -591,7 +591,7 @@ Editor::canvas_control_point_event (GdkEvent *event, ArdourCanvas::Item* item, C
|
|||
type = GainAutomationControlPointItem;
|
||||
} else if (dynamic_cast<AutomationPanLine*> (&cp->line) != 0) {
|
||||
type = PanAutomationControlPointItem;
|
||||
} else if (dynamic_cast<RedirectAutomationLine*> (&cp->line) != 0) {
|
||||
} else if (dynamic_cast<ProcessorAutomationLine*> (&cp->line) != 0) {
|
||||
type = RedirectAutomationControlPointItem;
|
||||
} else if (dynamic_cast<AutomationMidiCCLine*> (&cp->line) != 0) {
|
||||
type = MidiCCAutomationControlPointItem;
|
||||
|
@ -613,8 +613,8 @@ Editor::canvas_line_event (GdkEvent *event, ArdourCanvas::Item* item, Automation
|
|||
type = GainAutomationLineItem;
|
||||
} else if (dynamic_cast<AutomationPanLine*> (al) != 0) {
|
||||
type = PanAutomationLineItem;
|
||||
} else if (dynamic_cast<RedirectAutomationLine*> (al) != 0) {
|
||||
type = RedirectAutomationLineItem;
|
||||
} else if (dynamic_cast<ProcessorAutomationLine*> (al) != 0) {
|
||||
type = ProcessorAutomationLineItem;
|
||||
} else if (dynamic_cast<AutomationMidiCCLine*> (al) != 0) {
|
||||
type = MidiCCAutomationLineItem;
|
||||
} else {
|
||||
|
|
|
@ -37,7 +37,7 @@ enum ItemType {
|
|||
PanAutomationControlPointItem,
|
||||
PanAutomationLineItem,
|
||||
RedirectAutomationControlPointItem,
|
||||
RedirectAutomationLineItem,
|
||||
ProcessorAutomationLineItem,
|
||||
MidiCCAutomationControlPointItem,
|
||||
MidiCCAutomationLineItem,
|
||||
MeterMarkerItem,
|
||||
|
|
|
@ -547,7 +547,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
|
||||
case GainAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case ProcessorAutomationLineItem:
|
||||
case MidiCCAutomationLineItem:
|
||||
start_line_grab_from_line (item, event);
|
||||
return true;
|
||||
|
@ -632,7 +632,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
|
||||
case GainAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case ProcessorAutomationLineItem:
|
||||
case MidiCCAutomationLineItem:
|
||||
start_line_grab_from_line (item, event);
|
||||
break;
|
||||
|
@ -924,7 +924,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
case GainLineItem:
|
||||
case GainAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case ProcessorAutomationLineItem:
|
||||
case MidiCCAutomationLineItem:
|
||||
case StartSelectionTrimItem:
|
||||
case EndSelectionTrimItem:
|
||||
|
@ -1105,7 +1105,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
break;
|
||||
|
||||
case GainAutomationLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case ProcessorAutomationLineItem:
|
||||
case MidiCCAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
if (mouse_mode == MouseGain || mouse_mode == MouseObject) {
|
||||
|
@ -1228,7 +1228,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
switch (item_type) {
|
||||
case GainLineItem:
|
||||
case GainAutomationLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case ProcessorAutomationLineItem:
|
||||
case MidiCCAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
case GainControlPointItem:
|
||||
|
@ -1302,7 +1302,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
|
||||
case GainLineItem:
|
||||
case GainAutomationLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case ProcessorAutomationLineItem:
|
||||
case MidiCCAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
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 SelectionItem:
|
||||
case GainLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case ProcessorAutomationLineItem:
|
||||
case MidiCCAutomationLineItem:
|
||||
case GainAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace ARDOUR {
|
|||
class Session;
|
||||
class PortInsert;
|
||||
class Port;
|
||||
class Redirect;
|
||||
class IOProcessor;
|
||||
}
|
||||
|
||||
class IOSelector : public Gtk::VBox {
|
||||
|
|
|
@ -103,9 +103,9 @@ LadspaPluginUI::LadspaPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrolla
|
|||
pack_start (hpacker, false, false);
|
||||
}
|
||||
|
||||
insert->ActiveChanged.connect (bind(mem_fun(*this, &LadspaPluginUI::insert_active_changed),
|
||||
boost::weak_ptr<Insert>(insert)));
|
||||
bypass_button.set_active (!insert->active());
|
||||
pi->ActiveChanged.connect (bind(mem_fun(*this, &LadspaPluginUI::processor_active_changed),
|
||||
boost::weak_ptr<Processor>(pi)));
|
||||
bypass_button.set_active (!pi->active());
|
||||
|
||||
build ();
|
||||
}
|
||||
|
@ -673,13 +673,13 @@ LadspaPluginUI::control_combo_changed (ControlUI* cui)
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include <ardour/midi_playlist.h>
|
||||
#include <ardour/midi_diskstream.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/ladspa_plugin.h>
|
||||
#include <ardour/location.h>
|
||||
#include <ardour/playlist.h>
|
||||
|
@ -60,8 +60,8 @@
|
|||
#include "point_selection.h"
|
||||
#include "prompter.h"
|
||||
#include "public_editor.h"
|
||||
#include "redirect_automation_line.h"
|
||||
#include "redirect_automation_time_axis.h"
|
||||
#include "plugin_automation_line.h"
|
||||
#include "processor_automation_time_axis.h"
|
||||
#include "midi_controller_time_axis.h"
|
||||
#include "region_view.h"
|
||||
#include "rgb_macros.h"
|
||||
|
@ -100,13 +100,13 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, boost::shar
|
|||
|
||||
/* map current state of the route */
|
||||
|
||||
inserts_changed ();
|
||||
processors_changed ();
|
||||
|
||||
ensure_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()) {
|
||||
|
||||
|
|
|
@ -44,8 +44,7 @@ namespace ARDOUR {
|
|||
class Session;
|
||||
class MidiDiskstream;
|
||||
class RouteGroup;
|
||||
class Insert;
|
||||
class Insert;
|
||||
class Processor;
|
||||
class Location;
|
||||
class MidiPlaylist;
|
||||
}
|
||||
|
@ -71,7 +70,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
|||
|
||||
void route_active_changed ();
|
||||
|
||||
void add_insert_to_subplugin_menu (ARDOUR::Insert *);
|
||||
void add_insert_to_subplugin_menu (ARDOUR::Processor *);
|
||||
|
||||
Gtk::Menu subplugin_menu;
|
||||
};
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include <ardour/audio_diskstream.h>
|
||||
#include <ardour/panner.h>
|
||||
#include <ardour/send.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/ladspa_plugin.h>
|
||||
#include <ardour/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),
|
||||
RouteUI (rt, sess, _("Mute"), _("Solo"), _("Record")),
|
||||
_mixer(mx),
|
||||
pre_redirect_box (PreFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer),
|
||||
post_redirect_box (PostFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer),
|
||||
pre_processor_box (PreFader, 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),
|
||||
panners (_route, sess),
|
||||
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 (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 (*gain_meter_alignment,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())
|
||||
global_vpacker.pack_start (panners, 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 */
|
||||
|
||||
pre_redirect_box.update();
|
||||
post_redirect_box.update();
|
||||
pre_processor_box.update();
|
||||
post_processor_box.update();
|
||||
mute_changed (0);
|
||||
solo_changed (0);
|
||||
name_changed ();
|
||||
|
@ -400,8 +400,8 @@ MixerStrip::set_width (Width w, void* owner)
|
|||
|
||||
gpm.set_width (w);
|
||||
panners.set_width (w);
|
||||
pre_redirect_box.set_width (w);
|
||||
post_redirect_box.set_width (w);
|
||||
pre_processor_box.set_width (w);
|
||||
post_processor_box.set_width (w);
|
||||
|
||||
_width_owner = owner;
|
||||
|
||||
|
@ -1138,24 +1138,24 @@ MixerStrip::map_frozen ()
|
|||
if (at) {
|
||||
switch (at->freeze_state()) {
|
||||
case AudioTrack::Frozen:
|
||||
pre_redirect_box.set_sensitive (false);
|
||||
post_redirect_box.set_sensitive (false);
|
||||
pre_processor_box.set_sensitive (false);
|
||||
post_processor_box.set_sensitive (false);
|
||||
speed_spinner.set_sensitive (false);
|
||||
break;
|
||||
default:
|
||||
pre_redirect_box.set_sensitive (true);
|
||||
post_redirect_box.set_sensitive (true);
|
||||
pre_processor_box.set_sensitive (true);
|
||||
post_processor_box.set_sensitive (true);
|
||||
speed_spinner.set_sensitive (true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
_route->foreach_insert (this, &MixerStrip::hide_insert_editor);
|
||||
_route->foreach_processor (this, &MixerStrip::hide_processor_editor);
|
||||
}
|
||||
|
||||
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) {
|
||||
static_cast<Gtk::Widget*>(gui)->hide ();
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
#include <ardour/types.h>
|
||||
#include <ardour/ardour.h>
|
||||
#include <ardour/io.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/io_processor.h>
|
||||
|
||||
#include <pbd/fastlog.h>
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
|||
#include "gain_meter.h"
|
||||
#include "panner_ui.h"
|
||||
#include "enums.h"
|
||||
#include "redirect_box.h"
|
||||
#include "processor_box.h"
|
||||
#include "ardour_dialog.h"
|
||||
|
||||
class MotionController;
|
||||
|
@ -66,7 +66,7 @@ namespace Gtkmm2ext {
|
|||
namespace ARDOUR {
|
||||
class Route;
|
||||
class Send;
|
||||
class Insert;
|
||||
class Processor;
|
||||
class Session;
|
||||
class PortInsert;
|
||||
class Bundle;
|
||||
|
@ -121,8 +121,8 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
Gtk::Frame global_frame;
|
||||
Gtk::VBox global_vpacker;
|
||||
|
||||
RedirectBox pre_redirect_box;
|
||||
RedirectBox post_redirect_box;
|
||||
ProcessorBox pre_processor_box;
|
||||
ProcessorBox post_processor_box;
|
||||
GainMeter gpm;
|
||||
PannerUI panners;
|
||||
|
||||
|
@ -239,7 +239,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
void name_changed ();
|
||||
void update_speed_display ();
|
||||
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;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <ardour/ardour.h>
|
||||
#include <ardour/io.h>
|
||||
|
||||
#include "route_redirect_selection.h"
|
||||
#include "route_processor_selection.h"
|
||||
#include "enums.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <gtkmm/comboboxtext.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
class Redirect;
|
||||
class IOProcessor;
|
||||
}
|
||||
|
||||
class PanAutomationTimeAxisView : public AutomationTimeAxisView
|
||||
|
|
|
@ -18,11 +18,10 @@
|
|||
*/
|
||||
|
||||
#include "public_editor.h"
|
||||
#include "redirect_automation_line.h"
|
||||
#include "plugin_automation_line.h"
|
||||
#include "audio_time_axis.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/ladspa_plugin.h>
|
||||
#include <ardour/plugin_insert.h>
|
||||
#include <ardour/curve.h>
|
||||
|
@ -33,31 +32,27 @@ using namespace std;
|
|||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
RedirectAutomationLine::RedirectAutomationLine (const string & name, Insert& i, ParamID param, Session& s,
|
||||
|
||||
TimeAxisView& tv, ArdourCanvas::Group& parent,
|
||||
|
||||
AutomationList& l)
|
||||
ProcessorAutomationLine::ProcessorAutomationLine (const string & name, Processor& proc, ParamID param,
|
||||
TimeAxisView& tv, ArdourCanvas::Group& parent, AutomationList& l)
|
||||
|
||||
: AutomationLine (name, tv, parent, l),
|
||||
session (s),
|
||||
_insert (i),
|
||||
_param (param)
|
||||
: AutomationLine (name, tv, parent, l),
|
||||
_processor(proc),
|
||||
_param(param)
|
||||
{
|
||||
set_verbose_cursor_uses_gain_mapping (false);
|
||||
|
||||
PluginInsert *pi;
|
||||
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;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
pi->plugin()->get_parameter_descriptor (_param, desc);
|
||||
|
||||
upper = desc.upper;
|
||||
lower = desc.lower;
|
||||
_upper = desc.upper;
|
||||
_lower = desc.lower;
|
||||
|
||||
if (desc.toggled) {
|
||||
no_draw = true;
|
||||
|
@ -65,30 +60,30 @@ RedirectAutomationLine::RedirectAutomationLine (const string & name, Insert& i,
|
|||
}
|
||||
|
||||
no_draw = false;
|
||||
range = upper - lower;
|
||||
_range = _upper - _lower;
|
||||
|
||||
/* XXX set min/max for underlying curve ??? */
|
||||
}
|
||||
|
||||
string
|
||||
RedirectAutomationLine::get_verbose_cursor_string (float fraction)
|
||||
ProcessorAutomationLine::get_verbose_cursor_string (float fraction)
|
||||
{
|
||||
char buf[32];
|
||||
|
||||
snprintf (buf, sizeof (buf), "%.2f", lower + (fraction * range));
|
||||
snprintf (buf, sizeof (buf), "%.2f", _lower + (fraction * _range));
|
||||
return buf;
|
||||
}
|
||||
|
||||
void
|
||||
RedirectAutomationLine::view_to_model_y (double& y)
|
||||
ProcessorAutomationLine::view_to_model_y (double& y)
|
||||
{
|
||||
y = lower + (y * range);
|
||||
y = _lower + (y * _range);
|
||||
}
|
||||
|
||||
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 = min (y, 1.0);
|
||||
}
|
|
@ -17,38 +17,37 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __ardour_gtk_redirect_automation_line_h__
|
||||
#define __ardour_gtk_redirect_automation_line_h__
|
||||
#ifndef __ardour_gtk_processor_automation_line_h__
|
||||
#define __ardour_gtk_processor_automation_line_h__
|
||||
|
||||
#include <ardour/ardour.h>
|
||||
|
||||
#include "automation_line.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
class Session;
|
||||
class Insert;
|
||||
class Processor;
|
||||
}
|
||||
|
||||
class TimeAxisView;
|
||||
|
||||
class RedirectAutomationLine : public AutomationLine
|
||||
class ProcessorAutomationLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
RedirectAutomationLine (const string & name, ARDOUR::Insert&, ARDOUR::ParamID param, ARDOUR::Session&, TimeAxisView&,
|
||||
ArdourCanvas::Group& parent, ARDOUR::AutomationList&);
|
||||
ProcessorAutomationLine (const string & name, ARDOUR::Processor&, ARDOUR::ParamID param,
|
||||
TimeAxisView&, ArdourCanvas::Group& parent, ARDOUR::AutomationList&);
|
||||
|
||||
ARDOUR::ParamID param() const { return _param; }
|
||||
ARDOUR::Insert& insert() const { return _insert; }
|
||||
ARDOUR::ParamID param() const { return _param; }
|
||||
ARDOUR::Processor& processor() const { return _processor; }
|
||||
|
||||
string get_verbose_cursor_string (float);
|
||||
|
||||
private:
|
||||
ARDOUR::Session& session;
|
||||
ARDOUR::Insert& _insert;
|
||||
ARDOUR::ParamID _param;
|
||||
float upper;
|
||||
float lower;
|
||||
float range;
|
||||
ARDOUR::Processor& _processor;
|
||||
ARDOUR::ParamID _param;
|
||||
|
||||
float _upper;
|
||||
float _lower;
|
||||
float _range;
|
||||
|
||||
void view_to_model_y (double&);
|
||||
void model_to_view_y (double&);
|
|
@ -47,7 +47,7 @@ namespace ARDOUR {
|
|||
class PluginInsert;
|
||||
class Plugin;
|
||||
class VSTPlugin;
|
||||
class Redirect;
|
||||
class IOProcessor;
|
||||
class AUPlugin;
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ class LadspaPluginUI : public PlugUIBase, public Gtk::VBox
|
|||
void control_port_toggled (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 automation_state_changed (ControlUI*);
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
|
||||
*/
|
||||
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/session.h>
|
||||
#include <cstdlib>
|
||||
#include <pbd/memento_command.h>
|
||||
|
||||
#include "redirect_automation_time_axis.h"
|
||||
#include "processor_automation_time_axis.h"
|
||||
#include "automation_line.h"
|
||||
#include "canvas_impl.h"
|
||||
|
||||
|
@ -32,18 +32,18 @@ using namespace ARDOUR;
|
|||
using namespace PBD;
|
||||
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,
|
||||
ParamID p, Insert& i, string state_name)
|
||||
ParamID param, Processor& proc, string state_name)
|
||||
|
||||
: AxisView (s),
|
||||
AutomationTimeAxisView (s, r, e, parent, canvas, n, state_name, i.name()),
|
||||
insert (i),
|
||||
param (p)
|
||||
AutomationTimeAxisView (s, r, e, parent, canvas, n, state_name, proc.name()),
|
||||
_processor(proc),
|
||||
_param (param)
|
||||
|
||||
{
|
||||
char buf[32];
|
||||
xml_node = 0;
|
||||
_xml_node = 0;
|
||||
_marked_for_display = false;
|
||||
|
||||
ensure_xml_node ();
|
||||
|
@ -51,7 +51,7 @@ RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, boos
|
|||
XMLNodeList kids;
|
||||
XMLNodeConstIterator iter;
|
||||
|
||||
kids = xml_node->children ();
|
||||
kids = _xml_node->children ();
|
||||
|
||||
snprintf (buf, sizeof(buf), "Port_%" PRIu32, param.id());
|
||||
|
||||
|
@ -68,12 +68,12 @@ RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, boos
|
|||
}
|
||||
}
|
||||
|
||||
RedirectAutomationTimeAxisView::~RedirectAutomationTimeAxisView ()
|
||||
ProcessorAutomationTimeAxisView::~ProcessorAutomationTimeAxisView ()
|
||||
{
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -91,9 +91,9 @@ RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item,
|
|||
/* map to model space */
|
||||
|
||||
if (!lines.empty()) {
|
||||
AutomationList* alist (insert.automation_list(param, true));
|
||||
AutomationList* alist (_processor.automation_list(_param, true));
|
||||
string description = _("add automation event to ");
|
||||
description += insert.describe_parameter (param);
|
||||
description += _processor.describe_parameter (_param);
|
||||
|
||||
lines.front()->view_to_model_y (y);
|
||||
|
||||
|
@ -108,18 +108,18 @@ RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item,
|
|||
}
|
||||
|
||||
void
|
||||
RedirectAutomationTimeAxisView::ensure_xml_node ()
|
||||
ProcessorAutomationTimeAxisView::ensure_xml_node ()
|
||||
{
|
||||
if (xml_node == 0) {
|
||||
if ((xml_node = insert.extra_xml ("GUI")) == 0) {
|
||||
xml_node = new XMLNode ("GUI");
|
||||
insert.add_extra_xml (*xml_node);
|
||||
if (_xml_node == 0) {
|
||||
if ((_xml_node = _processor.extra_xml ("GUI")) == 0) {
|
||||
_xml_node = new XMLNode ("GUI");
|
||||
_processor.add_extra_xml (*_xml_node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
guint32
|
||||
RedirectAutomationTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent)
|
||||
ProcessorAutomationTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent)
|
||||
{
|
||||
ensure_xml_node ();
|
||||
update_extra_xml_shown (true);
|
||||
|
@ -128,7 +128,7 @@ RedirectAutomationTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent)
|
|||
}
|
||||
|
||||
void
|
||||
RedirectAutomationTimeAxisView::hide ()
|
||||
ProcessorAutomationTimeAxisView::hide ()
|
||||
{
|
||||
ensure_xml_node ();
|
||||
update_extra_xml_shown (false);
|
||||
|
@ -138,15 +138,15 @@ RedirectAutomationTimeAxisView::hide ()
|
|||
|
||||
|
||||
void
|
||||
RedirectAutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
|
||||
ProcessorAutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
|
||||
{
|
||||
char buf[32];
|
||||
|
||||
XMLNodeList nlist = xml_node->children ();
|
||||
XMLNodeList nlist = _xml_node->children ();
|
||||
XMLNodeConstIterator i;
|
||||
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) {
|
||||
if ((*i)->name() == buf) {
|
||||
|
@ -157,7 +157,7 @@ RedirectAutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
|
|||
|
||||
if (!port_node) {
|
||||
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");
|
||||
|
@ -165,9 +165,10 @@ RedirectAutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
|
|||
}
|
||||
|
||||
void
|
||||
RedirectAutomationTimeAxisView::set_automation_state (AutoState state)
|
||||
ProcessorAutomationTimeAxisView::set_automation_state (AutoState state)
|
||||
{
|
||||
if (!ignore_state_request) {
|
||||
insert.automation_list (param, true)->set_automation_state (state);
|
||||
_processor.automation_list (_param, true)->set_automation_state (state);
|
||||
}
|
||||
}
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __ardour_gtk_redirect_automation_time_axis_h__
|
||||
#define __ardour_gtk_redirect_automation_time_axis_h__
|
||||
#ifndef __ardour_gtk_processor_automation_time_axis_h__
|
||||
#define __ardour_gtk_processor_automation_time_axis_h__
|
||||
|
||||
#include <pbd/xml++.h>
|
||||
|
||||
|
@ -27,23 +27,23 @@
|
|||
#include <ardour/param_id.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
class Redirect;
|
||||
class Processor;
|
||||
}
|
||||
|
||||
class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
|
||||
class ProcessorAutomationTimeAxisView : public AutomationTimeAxisView
|
||||
{
|
||||
public:
|
||||
RedirectAutomationTimeAxisView (ARDOUR::Session&,
|
||||
ProcessorAutomationTimeAxisView (ARDOUR::Session&,
|
||||
boost::shared_ptr<ARDOUR::Route>,
|
||||
PublicEditor&,
|
||||
TimeAxisView& parent,
|
||||
ArdourCanvas::Canvas& canvas,
|
||||
std::string name,
|
||||
ARDOUR::ParamID param,
|
||||
ARDOUR::Insert& i,
|
||||
ARDOUR::Processor& i,
|
||||
std::string state_name);
|
||||
|
||||
~RedirectAutomationTimeAxisView();
|
||||
~ProcessorAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
|
||||
|
||||
|
@ -52,14 +52,14 @@ class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
|
|||
|
||||
|
||||
private:
|
||||
ARDOUR::Insert& insert;
|
||||
ARDOUR::ParamID param;
|
||||
ARDOUR::Processor& _processor;
|
||||
ARDOUR::ParamID _param;
|
||||
XMLNode* _xml_node;
|
||||
|
||||
XMLNode *xml_node;
|
||||
void ensure_xml_node();
|
||||
void update_extra_xml_shown (bool editor_shown);
|
||||
|
||||
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
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
229
gtk2_ardour/processor_box.h
Normal 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__ */
|
|
@ -17,16 +17,16 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __ardour_gtk_redirect_selection_h__
|
||||
#define __ardour_gtk_redirect_selection_h__
|
||||
#ifndef __ardour_gtk_processor_selection_h__
|
||||
#define __ardour_gtk_processor_selection_h__
|
||||
|
||||
#include <list>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
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
|
@ -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__ */
|
|
@ -211,16 +211,16 @@ RouteParams_UI::route_name_changed (boost::shared_ptr<Route> route)
|
|||
}
|
||||
|
||||
void
|
||||
RouteParams_UI::setup_redirect_boxes()
|
||||
RouteParams_UI::setup_processor_boxes()
|
||||
{
|
||||
if (session && _route) {
|
||||
|
||||
// just in case... shouldn't need this
|
||||
cleanup_redirect_boxes();
|
||||
cleanup_processor_boxes();
|
||||
|
||||
// construct new redirect boxes
|
||||
pre_insert_box = new RedirectBox(PreFader, *session, _route, *_plugin_selector, _rr_selection);
|
||||
post_insert_box = new RedirectBox(PostFader, *session, _route, *_plugin_selector, _rr_selection);
|
||||
pre_insert_box = new ProcessorBox(PreFader, *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);
|
||||
post_redir_hpane.pack1 (*post_insert_box);
|
||||
|
@ -237,7 +237,7 @@ RouteParams_UI::setup_redirect_boxes()
|
|||
}
|
||||
|
||||
void
|
||||
RouteParams_UI::cleanup_redirect_boxes()
|
||||
RouteParams_UI::cleanup_processor_boxes()
|
||||
{
|
||||
if (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_pre_view();
|
||||
cleanup_post_view();
|
||||
cleanup_redirect_boxes();
|
||||
cleanup_processor_boxes();
|
||||
|
||||
_route.reset ((Route*) 0);
|
||||
_pre_insert.reset ((Redirect*) 0);
|
||||
_post_insert.reset ((Redirect*) 0);
|
||||
_pre_processor.reset ((Processor*) 0);
|
||||
_post_processor.reset ((Processor*) 0);
|
||||
update_title();
|
||||
}
|
||||
}
|
||||
|
@ -386,11 +386,11 @@ RouteParams_UI::session_gone ()
|
|||
cleanup_io_frames();
|
||||
cleanup_pre_view();
|
||||
cleanup_post_view();
|
||||
cleanup_redirect_boxes();
|
||||
cleanup_processor_boxes();
|
||||
|
||||
_route.reset ((Route*) 0);
|
||||
_pre_insert.reset ((Redirect*) 0);
|
||||
_post_insert.reset ((Redirect*) 0);
|
||||
_pre_processor.reset ((Processor*) 0);
|
||||
_post_processor.reset ((Processor*) 0);
|
||||
update_title();
|
||||
|
||||
ArdourDialog::session_gone();
|
||||
|
@ -415,7 +415,7 @@ RouteParams_UI::route_selected()
|
|||
if (_route) {
|
||||
_route_conn.disconnect();
|
||||
_route_ds_conn.disconnect();
|
||||
cleanup_redirect_boxes();
|
||||
cleanup_processor_boxes();
|
||||
cleanup_pre_view();
|
||||
cleanup_post_view();
|
||||
cleanup_io_frames();
|
||||
|
@ -426,10 +426,10 @@ RouteParams_UI::route_selected()
|
|||
//update_routeinfo (route);
|
||||
|
||||
setup_io_frames();
|
||||
setup_redirect_boxes();
|
||||
setup_processor_boxes();
|
||||
|
||||
// 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());
|
||||
|
||||
|
@ -443,11 +443,11 @@ RouteParams_UI::route_selected()
|
|||
cleanup_io_frames();
|
||||
cleanup_pre_view();
|
||||
cleanup_post_view();
|
||||
cleanup_redirect_boxes();
|
||||
cleanup_processor_boxes();
|
||||
|
||||
_route.reset ((Route*) 0);
|
||||
_pre_insert.reset ((Redirect*) 0);
|
||||
_post_insert.reset ((Redirect *) 0);
|
||||
_pre_processor.reset ((Processor*) 0);
|
||||
_post_processor.reset ((Processor *) 0);
|
||||
track_input_label.set_text(_("NO TRACK"));
|
||||
update_title();
|
||||
}
|
||||
|
@ -464,21 +464,21 @@ RouteParams_UI::route_selected()
|
|||
// cleanup_io_frames();
|
||||
// cleanup_pre_view();
|
||||
// cleanup_post_view();
|
||||
// cleanup_redirect_boxes();
|
||||
// cleanup_processor_boxes();
|
||||
|
||||
// _route.reset ((Route*)0);
|
||||
// _pre_insert = 0;
|
||||
// _post_insert = 0;
|
||||
// _pre_processor = 0;
|
||||
// _post_processor = 0;
|
||||
// track_input_label.set_text(_("NO TRACK"));
|
||||
// update_title();
|
||||
// }
|
||||
//}
|
||||
|
||||
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.clear ();
|
||||
|
@ -493,8 +493,8 @@ RouteParams_UI::inserts_changed ()
|
|||
cleanup_pre_view();
|
||||
cleanup_post_view();
|
||||
|
||||
_pre_insert.reset ((Redirect*) 0);
|
||||
_post_insert.reset ((Redirect*) 0);
|
||||
_pre_processor.reset ((Processor*) 0);
|
||||
_post_processor.reset ((Processor*) 0);
|
||||
//update_title();
|
||||
}
|
||||
|
||||
|
@ -518,10 +518,10 @@ RouteParams_UI::show_track_menu()
|
|||
|
||||
|
||||
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)
|
||||
|| (place == PostFader && _post_insert == insert)){
|
||||
if ((place == PreFader && _pre_processor == insert)
|
||||
|| (place == PostFader && _post_processor == insert)){
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -593,9 +593,9 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Insert> insert, ARD
|
|||
}
|
||||
|
||||
if (place == PreFader) {
|
||||
_pre_insert = insert;
|
||||
_pre_processor = insert;
|
||||
} else {
|
||||
_post_insert = insert;
|
||||
_post_processor = insert;
|
||||
}
|
||||
|
||||
update_title();
|
||||
|
@ -611,28 +611,28 @@ RouteParams_UI::plugin_going_away (Placement place)
|
|||
|
||||
if (place == PreFader) {
|
||||
cleanup_pre_view (false);
|
||||
_pre_insert.reset ((Redirect*) 0);
|
||||
_pre_processor.reset ((Processor*) 0);
|
||||
}
|
||||
else {
|
||||
cleanup_post_view (false);
|
||||
_post_insert.reset ((Redirect*) 0);
|
||||
_post_processor.reset ((Processor*) 0);
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
printf ("redirect going away\n");
|
||||
// delete the current view without calling finish
|
||||
if (insert == _pre_insert) {
|
||||
if (insert == _pre_processor) {
|
||||
cleanup_pre_view (false);
|
||||
_pre_insert.reset ((Redirect*) 0);
|
||||
} else if (insert == _post_insert) {
|
||||
_pre_processor.reset ((Processor*) 0);
|
||||
} else if (insert == _post_processor) {
|
||||
cleanup_post_view (false);
|
||||
_post_insert.reset ((Redirect*) 0);
|
||||
_post_processor.reset ((Processor*) 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,17 +36,17 @@
|
|||
|
||||
#include <ardour/ardour.h>
|
||||
#include <ardour/io.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
|
||||
#include "io_selector.h"
|
||||
#include "ardour_dialog.h"
|
||||
#include "redirect_box.h"
|
||||
#include "route_redirect_selection.h"
|
||||
#include "processor_box.h"
|
||||
#include "route_processor_selection.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
class Route;
|
||||
class Send;
|
||||
class Insert;
|
||||
class Processor;
|
||||
class Session;
|
||||
class PortInsert;
|
||||
class Connection;
|
||||
|
@ -89,8 +89,8 @@ class RouteParams_UI : public ArdourDialog
|
|||
Gtk::HBox route_hpacker;
|
||||
Gtk::VBox route_vpacker;
|
||||
|
||||
RedirectBox * pre_insert_box;
|
||||
RedirectBox * post_insert_box;
|
||||
ProcessorBox * pre_insert_box;
|
||||
ProcessorBox * post_insert_box;
|
||||
|
||||
Gtk::HPaned list_hpane;
|
||||
|
||||
|
@ -121,11 +121,11 @@ class RouteParams_UI : public ArdourDialog
|
|||
sigc::connection _route_conn;
|
||||
sigc::connection _route_ds_conn;
|
||||
|
||||
boost::shared_ptr<ARDOUR::Insert> _pre_insert;
|
||||
sigc::connection _pre_plugin_conn;
|
||||
boost::shared_ptr<ARDOUR::Processor> _pre_processor;
|
||||
sigc::connection _pre_plugin_conn;
|
||||
|
||||
boost::shared_ptr<ARDOUR::Insert> _post_insert;
|
||||
sigc::connection _post_plugin_conn;
|
||||
boost::shared_ptr<ARDOUR::Processor> _post_processor;
|
||||
sigc::connection _post_plugin_conn;
|
||||
|
||||
|
||||
enum ConfigView {
|
||||
|
@ -171,15 +171,15 @@ class RouteParams_UI : public ArdourDialog
|
|||
|
||||
|
||||
|
||||
void inserts_changed ();
|
||||
void processors_changed ();
|
||||
|
||||
void setup_redirect_boxes();
|
||||
void cleanup_redirect_boxes();
|
||||
void setup_processor_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 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_output_configuration (GdkEventButton *ev);
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#include <pbd/error.h>
|
||||
|
||||
#include <ardour/playlist.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/route.h>
|
||||
|
||||
#include "route_redirect_selection.h"
|
||||
#include "route_processor_selection.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
@ -37,7 +37,7 @@ RouteRedirectSelection&
|
|||
RouteRedirectSelection::operator= (const RouteRedirectSelection& other)
|
||||
{
|
||||
if (&other != this) {
|
||||
inserts = other.inserts;
|
||||
processors = other.processors;
|
||||
routes = other.routes;
|
||||
}
|
||||
return *this;
|
||||
|
@ -46,22 +46,22 @@ RouteRedirectSelection::operator= (const RouteRedirectSelection& other)
|
|||
bool
|
||||
operator== (const RouteRedirectSelection& a, const RouteRedirectSelection& b)
|
||||
{
|
||||
return a.inserts == b.inserts &&
|
||||
return a.processors == b.processors &&
|
||||
a.routes == b.routes;
|
||||
}
|
||||
|
||||
void
|
||||
RouteRedirectSelection::clear ()
|
||||
{
|
||||
clear_inserts ();
|
||||
clear_processors ();
|
||||
clear_routes ();
|
||||
}
|
||||
|
||||
void
|
||||
RouteRedirectSelection::clear_inserts ()
|
||||
RouteRedirectSelection::clear_processors ()
|
||||
{
|
||||
inserts.clear ();
|
||||
InsertsChanged ();
|
||||
processors.clear ();
|
||||
ProcessorsChanged ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -72,27 +72,27 @@ RouteRedirectSelection::clear_routes ()
|
|||
}
|
||||
|
||||
void
|
||||
RouteRedirectSelection::add (boost::shared_ptr<Insert> r)
|
||||
RouteRedirectSelection::add (boost::shared_ptr<Processor> r)
|
||||
{
|
||||
if (find (inserts.begin(), inserts.end(), r) == inserts.end()) {
|
||||
inserts.push_back (r);
|
||||
if (find (processors.begin(), processors.end(), r) == processors.end()) {
|
||||
processors.push_back (r);
|
||||
|
||||
// XXX SHAREDPTR FIXME
|
||||
// void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove;
|
||||
// r->GoingAway.connect (mem_fun(*this, pmf));
|
||||
|
||||
InsertsChanged();
|
||||
ProcessorsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteRedirectSelection::add (const vector<boost::shared_ptr<Insert> >& rlist)
|
||||
RouteRedirectSelection::add (const vector<boost::shared_ptr<Processor> >& rlist)
|
||||
{
|
||||
bool changed = false;
|
||||
|
||||
for (vector<boost::shared_ptr<Insert> >::const_iterator i = rlist.begin(); i != rlist.end(); ++i) {
|
||||
if (find (inserts.begin(), inserts.end(), *i) == inserts.end()) {
|
||||
inserts.push_back (*i);
|
||||
for (vector<boost::shared_ptr<Processor> >::const_iterator i = rlist.begin(); i != rlist.end(); ++i) {
|
||||
if (find (processors.begin(), processors.end(), *i) == processors.end()) {
|
||||
processors.push_back (*i);
|
||||
|
||||
// XXX SHAREDPTR FIXME
|
||||
|
||||
|
@ -103,31 +103,31 @@ RouteRedirectSelection::add (const vector<boost::shared_ptr<Insert> >& rlist)
|
|||
}
|
||||
|
||||
if (changed) {
|
||||
InsertsChanged();
|
||||
ProcessorsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteRedirectSelection::remove (boost::shared_ptr<Insert> r)
|
||||
RouteRedirectSelection::remove (boost::shared_ptr<Processor> r)
|
||||
{
|
||||
list<boost::shared_ptr<Insert> >::iterator i;
|
||||
if ((i = find (inserts.begin(), inserts.end(), r)) != inserts.end()) {
|
||||
inserts.erase (i);
|
||||
InsertsChanged ();
|
||||
list<boost::shared_ptr<Processor> >::iterator i;
|
||||
if ((i = find (processors.begin(), processors.end(), r)) != processors.end()) {
|
||||
processors.erase (i);
|
||||
ProcessorsChanged ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteRedirectSelection::set (boost::shared_ptr<Insert> r)
|
||||
RouteRedirectSelection::set (boost::shared_ptr<Processor> r)
|
||||
{
|
||||
clear_inserts ();
|
||||
clear_processors ();
|
||||
add (r);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -171,6 +171,6 @@ RouteRedirectSelection::selected (boost::shared_ptr<Route> r)
|
|||
bool
|
||||
RouteRedirectSelection::empty ()
|
||||
{
|
||||
return inserts.empty () && routes.empty ();
|
||||
return processors.empty () && routes.empty ();
|
||||
}
|
||||
|
|
@ -17,42 +17,42 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __ardour_gtk_route_redirect_selection_h__
|
||||
#define __ardour_gtk_route_redirect_selection_h__
|
||||
#ifndef __ardour_gtk_route_processor_selection_h__
|
||||
#define __ardour_gtk_route_processor_selection_h__
|
||||
|
||||
#include <vector>
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
#include "redirect_selection.h"
|
||||
#include "processor_selection.h"
|
||||
#include "route_selection.h"
|
||||
|
||||
class RouteRedirectSelection : public sigc::trackable
|
||||
{
|
||||
public:
|
||||
InsertSelection inserts;
|
||||
RouteSelection routes;
|
||||
ProcessorSelection processors;
|
||||
RouteSelection routes;
|
||||
|
||||
RouteRedirectSelection() {}
|
||||
|
||||
RouteRedirectSelection& operator= (const RouteRedirectSelection& other);
|
||||
|
||||
sigc::signal<void> InsertsChanged;
|
||||
sigc::signal<void> ProcessorsChanged;
|
||||
sigc::signal<void> RoutesChanged;
|
||||
|
||||
void clear ();
|
||||
bool empty();
|
||||
|
||||
void set (boost::shared_ptr<ARDOUR::Insert>);
|
||||
void set (const std::vector<boost::shared_ptr<ARDOUR::Insert> >&);
|
||||
void add (boost::shared_ptr<ARDOUR::Insert>);
|
||||
void add (const std::vector<boost::shared_ptr<ARDOUR::Insert> >&);
|
||||
void remove (boost::shared_ptr<ARDOUR::Insert>);
|
||||
void set (boost::shared_ptr<ARDOUR::Processor>);
|
||||
void set (const std::vector<boost::shared_ptr<ARDOUR::Processor> >&);
|
||||
void add (boost::shared_ptr<ARDOUR::Processor>);
|
||||
void add (const std::vector<boost::shared_ptr<ARDOUR::Processor> >&);
|
||||
void remove (boost::shared_ptr<ARDOUR::Processor>);
|
||||
|
||||
void set (boost::shared_ptr<ARDOUR::Route>);
|
||||
void add (boost::shared_ptr<ARDOUR::Route>);
|
||||
void remove (boost::shared_ptr<ARDOUR::Route>);
|
||||
|
||||
void clear_inserts ();
|
||||
void clear_processors ();
|
||||
void clear_routes ();
|
||||
|
||||
bool selected (boost::shared_ptr<ARDOUR::Route>);
|
||||
|
@ -60,4 +60,4 @@ class RouteRedirectSelection : public sigc::trackable
|
|||
|
||||
bool operator==(const RouteRedirectSelection& a, const RouteRedirectSelection& b);
|
||||
|
||||
#endif /* __ardour_gtk_route_redirect_selection_h__ */
|
||||
#endif /* __ardour_gtk_route_processor_selection_h__ */
|
|
@ -43,7 +43,7 @@
|
|||
#include <ardour/playlist.h>
|
||||
#include <ardour/audioplaylist.h>
|
||||
#include <ardour/diskstream.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/ladspa_plugin.h>
|
||||
#include <ardour/location.h>
|
||||
#include <ardour/panner.h>
|
||||
|
@ -56,8 +56,8 @@
|
|||
#include "ardour_ui.h"
|
||||
#include "route_time_axis.h"
|
||||
#include "automation_time_axis.h"
|
||||
#include "redirect_automation_time_axis.h"
|
||||
#include "redirect_automation_line.h"
|
||||
#include "processor_automation_time_axis.h"
|
||||
#include "plugin_automation_line.h"
|
||||
#include "canvas_impl.h"
|
||||
#include "crossfade_view.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->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->solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
||||
|
||||
|
@ -207,9 +207,9 @@ RouteTimeAxisView::~RouteTimeAxisView ()
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -235,9 +235,9 @@ RouteTimeAxisView::post_construct ()
|
|||
/* map current state of the route */
|
||||
|
||||
update_diskstream_display ();
|
||||
_route->foreach_insert (this, &RouteTimeAxisView::add_insert_to_subplugin_menu);
|
||||
_route->foreach_insert (this, &RouteTimeAxisView::add_existing_insert_automation_curves);
|
||||
reset_insert_automation_curves ();
|
||||
_route->foreach_processor (this, &RouteTimeAxisView::add_processor_to_subplugin_menu);
|
||||
_route->foreach_processor (this, &RouteTimeAxisView::add_existing_processor_automation_curves);
|
||||
reset_processor_automation_curves ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -285,8 +285,6 @@ RouteTimeAxisView::set_state (const XMLNode& node)
|
|||
|
||||
if (param) {
|
||||
|
||||
cerr << "RTAV::set_state parameter: " << param.to_string() << endl;
|
||||
|
||||
XMLProperty* prop = child_node->property ("shown");
|
||||
|
||||
if (_automation_tracks.find(param) == _automation_tracks.end())
|
||||
|
@ -296,7 +294,7 @@ RouteTimeAxisView::set_state (const XMLNode& node)
|
|||
_show_automation.insert(ParamID(GainAutomation));
|
||||
|
||||
} 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) {
|
||||
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);
|
||||
|
@ -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) {
|
||||
if ((*ii)->view != 0) {
|
||||
(*ii)->menu_item->set_active (true);
|
||||
|
@ -1601,7 +1599,7 @@ RouteTimeAxisView::hide_all_automation ()
|
|||
{
|
||||
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) {
|
||||
(*ii)->menu_item->set_active (false);
|
||||
}
|
||||
|
@ -1625,7 +1623,7 @@ RouteTimeAxisView::region_view_added (RegionView* rv)
|
|||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::add_ghost_to_insert (RegionView* rv, AutomationTimeAxisView* atv)
|
||||
RouteTimeAxisView::add_ghost_to_processor (RegionView* rv, AutomationTimeAxisView* atv)
|
||||
{
|
||||
rv->add_ghost (*atv);
|
||||
}
|
||||
|
@ -1656,11 +1654,11 @@ RouteTimeAxisView::remove_ran (InsertAutomationNode* ran)
|
|||
}
|
||||
|
||||
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) {
|
||||
if ((*ii)->what == what) {
|
||||
|
@ -1693,16 +1691,16 @@ legalize_for_xml_node (string str)
|
|||
|
||||
|
||||
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;
|
||||
InsertAutomationNode* ran;
|
||||
|
||||
if ((ran = find_insert_automation_node (insert, what)) == 0) {
|
||||
if ((ran = find_processor_automation_node (processor, what)) == 0) {
|
||||
fatal << _("programming error: ")
|
||||
<< string_compose (X_("insert automation curve for %1:%2 not registered with audio track!"),
|
||||
insert->name(), what)
|
||||
<< string_compose (X_("processor automation curve for %1:%2 not registered with track!"),
|
||||
processor->name(), what)
|
||||
<< endmsg;
|
||||
/*NOTREACHED*/
|
||||
return;
|
||||
|
@ -1712,25 +1710,25 @@ RouteTimeAxisView::add_insert_automation_curve (boost::shared_ptr<Insert> insert
|
|||
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 */
|
||||
|
||||
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,
|
||||
*insert, what, _session, *ran->view,
|
||||
*ran->view->canvas_display, *insert->automation_list (what, true));
|
||||
ral = new ProcessorAutomationLine (name,
|
||||
*processor, what, *ran->view,
|
||||
*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 ();
|
||||
|
||||
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()) {
|
||||
ran->view->hide ();
|
||||
|
@ -1741,14 +1739,14 @@ RouteTimeAxisView::add_insert_automation_curve (boost::shared_ptr<Insert> insert
|
|||
add_child (ran->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
|
||||
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) {
|
||||
ran->menu_item->set_active (false);
|
||||
|
@ -1760,19 +1758,19 @@ RouteTimeAxisView::insert_automation_track_hidden (RouteTimeAxisView::InsertAuto
|
|||
}
|
||||
|
||||
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;
|
||||
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) {
|
||||
|
||||
if ((ral = find_insert_automation_curve (insert, *i)) != 0) {
|
||||
if ((ral = find_processor_automation_curve (processor, *i)) != 0) {
|
||||
ral->queue_reset ();
|
||||
} 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
|
||||
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;
|
||||
InsertAutomationInfo *rai;
|
||||
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;
|
||||
|
||||
insert->what_has_visible_automation(has_visible_automation);
|
||||
processor->what_has_visible_automation(has_visible_automation);
|
||||
|
||||
if (automatable.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (x = insert_automation.begin(); x != insert_automation.end(); ++x) {
|
||||
if ((*x)->insert == insert) {
|
||||
for (x = processor_automation.begin(); x != processor_automation.end(); ++x) {
|
||||
if ((*x)->processor == processor) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (x == insert_automation.end()) {
|
||||
if (x == processor_automation.end()) {
|
||||
|
||||
rai = new InsertAutomationInfo (insert);
|
||||
insert_automation.push_back (rai);
|
||||
rai = new InsertAutomationInfo (processor);
|
||||
processor_automation.push_back (rai);
|
||||
|
||||
} 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.
|
||||
*/
|
||||
|
||||
|
@ -1858,7 +1856,7 @@ RouteTimeAxisView::add_insert_to_subplugin_menu (boost::shared_ptr<Insert> inser
|
|||
InsertAutomationNode* ran;
|
||||
CheckMenuItem* mitem;
|
||||
|
||||
string name = insert->describe_parameter (*i);
|
||||
string name = processor->describe_parameter (*i);
|
||||
|
||||
items.push_back (CheckMenuElem (name));
|
||||
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);
|
||||
}
|
||||
|
||||
if ((ran = find_insert_automation_node (insert, *i)) == 0) {
|
||||
if ((ran = find_processor_automation_node (processor, *i)) == 0) {
|
||||
|
||||
/* 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
|
||||
menu is always cleared at the top of inserts_changed().
|
||||
/* add the menu for this processor, because the subplugin
|
||||
menu is always cleared at the top of processors_changed().
|
||||
this is the result of some poor design in gtkmm and/or
|
||||
GTK+.
|
||||
*/
|
||||
|
||||
subplugin_menu.items().push_back (MenuElem (insert->name(), *rai->menu));
|
||||
subplugin_menu.items().push_back (MenuElem (processor->name(), *rai->menu));
|
||||
rai->valid = true;
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::insert_menu_item_toggled (RouteTimeAxisView::InsertAutomationInfo* rai,
|
||||
RouteTimeAxisView::processor_menu_item_toggled (RouteTimeAxisView::InsertAutomationInfo* rai,
|
||||
RouteTimeAxisView::InsertAutomationNode* ran)
|
||||
{
|
||||
bool showit = ran->menu_item->get_active();
|
||||
bool redraw = false;
|
||||
|
||||
if (ran->view == 0 && showit) {
|
||||
add_insert_automation_curve (rai->insert, ran->what);
|
||||
add_processor_automation_curve (rai->processor, ran->what);
|
||||
redraw = true;
|
||||
}
|
||||
|
||||
|
@ -1912,7 +1910,7 @@ RouteTimeAxisView::insert_menu_item_toggled (RouteTimeAxisView::InsertAutomation
|
|||
ran->view->set_marked_for_display (true);
|
||||
ran->view->canvas_display->show();
|
||||
} 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->hide ();
|
||||
}
|
||||
|
@ -1931,20 +1929,20 @@ RouteTimeAxisView::insert_menu_item_toggled (RouteTimeAxisView::InsertAutomation
|
|||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::inserts_changed ()
|
||||
RouteTimeAxisView::processors_changed ()
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
subplugin_menu.items().clear ();
|
||||
|
||||
_route->foreach_insert (this, &RouteTimeAxisView::add_insert_to_subplugin_menu);
|
||||
_route->foreach_insert (this, &RouteTimeAxisView::add_existing_insert_automation_curves);
|
||||
_route->foreach_processor (this, &RouteTimeAxisView::add_processor_to_subplugin_menu);
|
||||
_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;
|
||||
|
||||
|
@ -1954,7 +1952,7 @@ RouteTimeAxisView::inserts_changed ()
|
|||
if (!(*i)->valid) {
|
||||
|
||||
delete *i;
|
||||
insert_automation.erase (i);
|
||||
processor_automation.erase (i);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1966,14 +1964,14 @@ RouteTimeAxisView::inserts_changed ()
|
|||
_route->gui_changed ("track_height", this);
|
||||
}
|
||||
|
||||
RedirectAutomationLine *
|
||||
RouteTimeAxisView::find_insert_automation_curve (boost::shared_ptr<Insert> insert, ParamID what)
|
||||
ProcessorAutomationLine *
|
||||
RouteTimeAxisView::find_processor_automation_curve (boost::shared_ptr<Processor> processor, ParamID what)
|
||||
{
|
||||
InsertAutomationNode* ran;
|
||||
|
||||
if ((ran = find_insert_automation_node (insert, what)) != 0) {
|
||||
if ((ran = find_processor_automation_node (processor, what)) != 0) {
|
||||
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
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace ARDOUR {
|
|||
class Region;
|
||||
class Diskstream;
|
||||
class RouteGroup;
|
||||
class Redirect;
|
||||
class Insert;
|
||||
class IOProcessor;
|
||||
class Processor;
|
||||
class Location;
|
||||
class Playlist;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ class RegionSelection;
|
|||
class Selectable;
|
||||
class AutomationTimeAxisView;
|
||||
class AutomationLine;
|
||||
class RedirectAutomationLine;
|
||||
class ProcessorAutomationLine;
|
||||
class TimeSelection;
|
||||
|
||||
class RouteTimeAxisView : public RouteUI, public TimeAxisView
|
||||
|
@ -128,13 +128,13 @@ protected:
|
|||
};
|
||||
|
||||
struct InsertAutomationInfo {
|
||||
boost::shared_ptr<ARDOUR::Insert> insert;
|
||||
bool valid;
|
||||
Gtk::Menu* menu;
|
||||
vector<InsertAutomationNode*> lines;
|
||||
boost::shared_ptr<ARDOUR::Processor> processor;
|
||||
bool valid;
|
||||
Gtk::Menu* menu;
|
||||
vector<InsertAutomationNode*> lines;
|
||||
|
||||
InsertAutomationInfo (boost::shared_ptr<ARDOUR::Insert> i)
|
||||
: insert (i), valid (true), menu (0) {}
|
||||
InsertAutomationInfo (boost::shared_ptr<ARDOUR::Processor> i)
|
||||
: processor (i), valid (true), menu (0) {}
|
||||
|
||||
~InsertAutomationInfo ();
|
||||
};
|
||||
|
@ -145,16 +145,16 @@ protected:
|
|||
|
||||
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 insert_menu_item_toggled (RouteTimeAxisView::InsertAutomationInfo*,
|
||||
void processor_menu_item_toggled (RouteTimeAxisView::InsertAutomationInfo*,
|
||||
RouteTimeAxisView::InsertAutomationNode*);
|
||||
|
||||
void insert_automation_track_hidden (InsertAutomationNode*,
|
||||
boost::shared_ptr<ARDOUR::Insert>);
|
||||
void processor_automation_track_hidden (InsertAutomationNode*,
|
||||
boost::shared_ptr<ARDOUR::Processor>);
|
||||
|
||||
void automation_track_hidden (ARDOUR::ParamID param);
|
||||
|
||||
|
@ -162,17 +162,17 @@ protected:
|
|||
RouteAutomationNode* automation_track(ARDOUR::AutomationType type);
|
||||
|
||||
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*
|
||||
find_insert_automation_curve (boost::shared_ptr<ARDOUR::Insert> i, ARDOUR::ParamID);
|
||||
ProcessorAutomationLine*
|
||||
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_existing_insert_automation_curves (boost::shared_ptr<ARDOUR::Insert>);
|
||||
void add_processor_automation_curve (boost::shared_ptr<ARDOUR::Processor> r, ARDOUR::ParamID);
|
||||
void add_existing_processor_automation_curves (boost::shared_ptr<ARDOUR::Processor>);
|
||||
|
||||
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 route_name_changed ();
|
||||
|
@ -222,7 +222,7 @@ protected:
|
|||
void color_handler ();
|
||||
|
||||
void region_view_added (RegionView*);
|
||||
void add_ghost_to_insert (RegionView*, AutomationTimeAxisView*);
|
||||
void add_ghost_to_processor (RegionView*, AutomationTimeAxisView*);
|
||||
|
||||
StreamView* _view;
|
||||
ArdourCanvas::Canvas& parent_canvas;
|
||||
|
@ -230,7 +230,7 @@ protected:
|
|||
|
||||
Gtk::HBox other_button_hbox;
|
||||
Gtk::Table button_table;
|
||||
Gtk::Button insert_button;
|
||||
Gtk::Button processor_button;
|
||||
Gtk::Button edit_group_button;
|
||||
Gtk::Button playlist_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 track_mode_changed ();
|
||||
|
||||
list<InsertAutomationInfo*> insert_automation;
|
||||
vector<RedirectAutomationLine*> insert_automation_curves;
|
||||
list<InsertAutomationInfo*> processor_automation;
|
||||
vector<ProcessorAutomationLine*> processor_automation_curves;
|
||||
|
||||
// Set from XML so context menu automation buttons can be correctly initialized
|
||||
set<ARDOUR::ParamID> _show_automation;
|
||||
|
|
|
@ -98,7 +98,7 @@ class RouteUI : public virtual AxisView
|
|||
void solo_changed(void*);
|
||||
void solo_changed_so_update_mute ();
|
||||
void mute_changed(void*);
|
||||
virtual void inserts_changed () {}
|
||||
virtual void processors_changed () {}
|
||||
void route_rec_enable_changed();
|
||||
void session_rec_enable_changed();
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ operator== (const Selection& a, const Selection& b)
|
|||
a.time == b.time &&
|
||||
a.lines == b.lines &&
|
||||
a.playlists == b.playlists &&
|
||||
a.inserts == b.inserts;
|
||||
a.processors == b.processors;
|
||||
}
|
||||
|
||||
/** Clear everything from the Selection */
|
||||
|
@ -77,7 +77,7 @@ Selection::clear ()
|
|||
clear_lines();
|
||||
clear_time ();
|
||||
clear_playlists ();
|
||||
clear_inserts ();
|
||||
clear_processors ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -91,11 +91,11 @@ Selection::dump_region_layers()
|
|||
|
||||
|
||||
void
|
||||
Selection::clear_inserts ()
|
||||
Selection::clear_processors ()
|
||||
{
|
||||
if (!inserts.empty()) {
|
||||
inserts.clear ();
|
||||
InsertsChanged ();
|
||||
if (!processors.empty()) {
|
||||
processors.clear ();
|
||||
ProcessorsChanged ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,16 +154,16 @@ Selection::clear_lines ()
|
|||
}
|
||||
|
||||
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()) {
|
||||
inserts.push_back (r);
|
||||
if ((i = find (processors.begin(), processors.end(), r)) == processors.end()) {
|
||||
processors.push_back (r);
|
||||
} else {
|
||||
inserts.erase (i);
|
||||
processors.erase (i);
|
||||
}
|
||||
InsertsChanged();
|
||||
ProcessorsChanged();
|
||||
|
||||
}
|
||||
|
||||
|
@ -254,11 +254,11 @@ Selection::toggle (nframes_t start, nframes_t end)
|
|||
|
||||
|
||||
void
|
||||
Selection::add (boost::shared_ptr<Insert> i)
|
||||
Selection::add (boost::shared_ptr<Processor> i)
|
||||
{
|
||||
if (find (inserts.begin(), inserts.end(), i) == inserts.end()) {
|
||||
inserts.push_back (i);
|
||||
InsertsChanged();
|
||||
if (find (processors.begin(), processors.end(), i) == processors.end()) {
|
||||
processors.push_back (i);
|
||||
ProcessorsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -395,12 +395,12 @@ Selection::add (AutomationList* ac)
|
|||
}
|
||||
|
||||
void
|
||||
Selection::remove (boost::shared_ptr<Insert> r)
|
||||
Selection::remove (boost::shared_ptr<Processor> r)
|
||||
{
|
||||
InsertSelection::iterator i;
|
||||
if ((i = find (inserts.begin(), inserts.end(), r)) != inserts.end()) {
|
||||
inserts.erase (i);
|
||||
InsertsChanged ();
|
||||
ProcessorSelection::iterator i;
|
||||
if ((i = find (processors.begin(), processors.end(), r)) != processors.end()) {
|
||||
processors.erase (i);
|
||||
ProcessorsChanged ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -510,9 +510,9 @@ Selection::remove (AutomationList *ac)
|
|||
}
|
||||
|
||||
void
|
||||
Selection::set (boost::shared_ptr<Insert> i)
|
||||
Selection::set (boost::shared_ptr<Processor> i)
|
||||
{
|
||||
clear_inserts ();
|
||||
clear_processors ();
|
||||
add (i);
|
||||
}
|
||||
|
||||
|
@ -625,7 +625,7 @@ Selection::empty ()
|
|||
lines.empty () &&
|
||||
time.empty () &&
|
||||
playlists.empty () &&
|
||||
inserts.empty ()
|
||||
processors.empty ()
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "track_selection.h"
|
||||
#include "automation_selection.h"
|
||||
#include "playlist_selection.h"
|
||||
#include "redirect_selection.h"
|
||||
#include "processor_selection.h"
|
||||
#include "point_selection.h"
|
||||
|
||||
class TimeAxisView;
|
||||
|
@ -41,7 +41,7 @@ namespace ARDOUR {
|
|||
class Region;
|
||||
class AudioRegion;
|
||||
class Playlist;
|
||||
class Insert;
|
||||
class Processor;
|
||||
class AutomationList;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ class Selection : public sigc::trackable
|
|||
TimeSelection time;
|
||||
AutomationSelection lines;
|
||||
PlaylistSelection playlists;
|
||||
InsertSelection inserts;
|
||||
ProcessorSelection processors;
|
||||
PointSelection points;
|
||||
|
||||
Selection() {
|
||||
|
@ -84,7 +84,7 @@ class Selection : public sigc::trackable
|
|||
sigc::signal<void> TimeChanged;
|
||||
sigc::signal<void> LinesChanged;
|
||||
sigc::signal<void> PlaylistsChanged;
|
||||
sigc::signal<void> InsertsChanged;
|
||||
sigc::signal<void> ProcessorsChanged;
|
||||
sigc::signal<void> PointsChanged;
|
||||
|
||||
void clear ();
|
||||
|
@ -107,7 +107,7 @@ class Selection : public sigc::trackable
|
|||
void set (ARDOUR::AutomationList*);
|
||||
void set (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 toggle (TimeAxisView*);
|
||||
|
@ -118,7 +118,7 @@ class Selection : public sigc::trackable
|
|||
void toggle (ARDOUR::AutomationList*);
|
||||
void toggle (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 add (TimeAxisView*);
|
||||
|
@ -129,7 +129,7 @@ class Selection : public sigc::trackable
|
|||
void add (ARDOUR::AutomationList*);
|
||||
void add (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 (const std::list<TimeAxisView*>&);
|
||||
|
@ -139,7 +139,7 @@ class Selection : public sigc::trackable
|
|||
void remove (ARDOUR::AutomationList*);
|
||||
void remove (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 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_lines ();
|
||||
void clear_playlists ();
|
||||
void clear_inserts ();
|
||||
void clear_processors ();
|
||||
void clear_points ();
|
||||
|
||||
void foreach_region (void (ARDOUR::Region::*method)(void));
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
namespace ARDOUR {
|
||||
class Send;
|
||||
class Session;
|
||||
class Redirect;
|
||||
class IOProcessor;
|
||||
}
|
||||
|
||||
class IOSelector;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <ardour/session.h>
|
||||
#include <ardour/utils.h>
|
||||
#include <ardour/ladspa_plugin.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/location.h>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/utils.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/location.h>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <fst.h>
|
||||
#include <gtk/gtksocket.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/vst_plugin.h>
|
||||
|
||||
#include "plugin_ui.h"
|
||||
|
|
|
@ -77,7 +77,8 @@ gdither.cc
|
|||
globals.cc
|
||||
import.cc
|
||||
automatable.cc
|
||||
insert.cc
|
||||
processor.cc
|
||||
io_processor.cc
|
||||
plugin_insert.cc
|
||||
port_insert.cc
|
||||
io.cc
|
||||
|
@ -92,7 +93,6 @@ playlist_factory.cc
|
|||
plugin.cc
|
||||
plugin_manager.cc
|
||||
recent_sessions.cc
|
||||
redirect.cc
|
||||
region.cc
|
||||
region_factory.cc
|
||||
reverse.cc
|
||||
|
|
|
@ -93,7 +93,7 @@ class AutomationList : public PBD::StatefulDestructible
|
|||
void reposition_for_rt_add (double when);
|
||||
void rt_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 reset_range (double start, double end);
|
||||
|
|
|
@ -9,7 +9,7 @@ CANVAS_VARIABLE(canvasvar_MidiBusBase, "midi bus base")
|
|||
CANVAS_VARIABLE(canvasvar_TimeStretchFill, "time-stretch-fill")
|
||||
CANVAS_VARIABLE(canvasvar_TimeStretchOutline, "time-stretch-outline")
|
||||
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_ControlPointOutline, "control point outline")
|
||||
CANVAS_VARIABLE(canvasvar_EnteredControlPointOutline, "entered control point outline")
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <pbd/undo.h>
|
||||
|
||||
#include <ardour/ardour.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/io.h>
|
||||
#include <ardour/automation_event.h>
|
||||
|
||||
|
@ -47,15 +47,15 @@ namespace ARDOUR {
|
|||
|
||||
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:
|
||||
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);
|
||||
Redirect (const Redirect&);
|
||||
virtual ~Redirect ();
|
||||
IOProcessor (const IOProcessor&);
|
||||
virtual ~IOProcessor ();
|
||||
|
||||
virtual ChanCount output_streams() const { return _io->n_outputs(); }
|
||||
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;
|
||||
void silence (nframes_t nframes, nframes_t offset);
|
||||
|
||||
sigc::signal<void,Redirect*,bool> AutomationPlaybackChanged;
|
||||
sigc::signal<void,Redirect*,uint32_t> AutomationChanged;
|
||||
sigc::signal<void,IOProcessor*,bool> AutomationPlaybackChanged;
|
||||
sigc::signal<void,IOProcessor*,uint32_t> AutomationChanged;
|
||||
|
||||
XMLNode& state (bool full_state);
|
||||
int set_state (const XMLNode&);
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <ardour/types.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <pbd/fastlog.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
@ -33,9 +33,9 @@ class Session;
|
|||
|
||||
/** Meters peaks on the input and stores them for access.
|
||||
*/
|
||||
class PeakMeter : public Insert {
|
||||
class PeakMeter : public Processor {
|
||||
public:
|
||||
PeakMeter(Session& s) : Insert(s, "meter", PreFader) {}
|
||||
PeakMeter(Session& s) : Processor(s, "meter", PreFader) {}
|
||||
|
||||
void reset ();
|
||||
void reset_max ();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <ardour/ardour.h>
|
||||
#include <ardour/plugin_state.h>
|
||||
#include <ardour/types.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/automation_event.h>
|
||||
|
||||
class XMLNode;
|
||||
|
@ -40,7 +40,7 @@ class Plugin;
|
|||
|
||||
/** Plugin inserts: send data through a plugin
|
||||
*/
|
||||
class PluginInsert : public Insert
|
||||
class PluginInsert : public Processor
|
||||
{
|
||||
public:
|
||||
PluginInsert (Session&, boost::shared_ptr<Plugin>, Placement);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <sigc++/signal.h>
|
||||
#include <ardour/ardour.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
#include <ardour/plugin_state.h>
|
||||
#include <ardour/types.h>
|
||||
|
||||
|
@ -37,10 +37,8 @@ namespace ARDOUR {
|
|||
class Session;
|
||||
|
||||
/** 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:
|
||||
PortInsert (Session&, Placement);
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __ardour_insert_h__
|
||||
#define __ardour_insert_h__
|
||||
#ifndef __ardour_processor_h__
|
||||
#define __ardour_processor_h__
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
@ -43,16 +43,16 @@ class Session;
|
|||
|
||||
/* A mixer strip element - plugin, send, meter, etc.
|
||||
*/
|
||||
class Insert : public Automatable
|
||||
class Processor : public Automatable
|
||||
{
|
||||
public:
|
||||
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; }
|
||||
void set_sort_key (uint32_t key);
|
||||
|
@ -93,7 +93,7 @@ class Insert : public Automatable
|
|||
void *get_gui () const { return _gui; }
|
||||
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> PlacementChanged;
|
||||
|
@ -110,4 +110,4 @@ protected:
|
|||
|
||||
} // namespace ARDOUR
|
||||
|
||||
#endif /* __ardour_insert_h__ */
|
||||
#endif /* __ardour_processor_h__ */
|
|
@ -39,12 +39,12 @@
|
|||
#include <ardour/ardour.h>
|
||||
#include <ardour/io.h>
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
#include <ardour/types.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
class Insert;
|
||||
class Processor;
|
||||
class Send;
|
||||
class RouteGroup;
|
||||
|
||||
|
@ -59,7 +59,7 @@ class Route : public IO
|
|||
{
|
||||
protected:
|
||||
|
||||
typedef list<boost::shared_ptr<Insert> > InsertList;
|
||||
typedef list<boost::shared_ptr<Processor> > ProcessorList;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -100,7 +100,7 @@ class Route : public IO
|
|||
virtual bool can_record() { return false; }
|
||||
virtual void set_record_enable (bool yn, void *src) {}
|
||||
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);
|
||||
|
||||
/* end of vfunc-based API */
|
||||
|
@ -137,54 +137,54 @@ class Route : public IO
|
|||
virtual void set_meter_point (MeterPoint, void *src);
|
||||
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>)) {
|
||||
Glib::RWLock::ReaderLock lm (insert_lock);
|
||||
for (InsertList::iterator i = _inserts.begin(); i != _inserts.end(); ++i) {
|
||||
template<class T> void foreach_processor (T *obj, void (T::*func)(boost::shared_ptr<Processor>)) {
|
||||
Glib::RWLock::ReaderLock lm (_processor_lock);
|
||||
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
(obj->*func) (*i);
|
||||
}
|
||||
}
|
||||
|
||||
boost::shared_ptr<Insert> nth_insert (uint32_t n) {
|
||||
Glib::RWLock::ReaderLock lm (insert_lock);
|
||||
InsertList::iterator i;
|
||||
for (i = _inserts.begin(); i != _inserts.end() && n; ++i, --n);
|
||||
if (i == _inserts.end()) {
|
||||
return boost::shared_ptr<Redirect> ();
|
||||
boost::shared_ptr<Processor> nth_processor (uint32_t n) {
|
||||
Glib::RWLock::ReaderLock lm (_processor_lock);
|
||||
ProcessorList::iterator i;
|
||||
for (i = _processors.begin(); i != _processors.end() && n; ++i, --n);
|
||||
if (i == _processors.end()) {
|
||||
return boost::shared_ptr<IOProcessor> ();
|
||||
} else {
|
||||
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;
|
||||
|
||||
/** A record of the stream configuration at some point in the insert list.
|
||||
* Used to return where and why an insert list configuration request failed.
|
||||
/** A record of the stream configuration at some point in the processor list.
|
||||
* Used to return where and why an processor list configuration request failed.
|
||||
*/
|
||||
struct InsertStreams {
|
||||
InsertStreams(size_t i=0, ChanCount c=ChanCount()) : index(i), count(c) {}
|
||||
struct ProcessorStreams {
|
||||
ProcessorStreams(size_t i=0, ChanCount c=ChanCount()) : index(i), count(c) {}
|
||||
|
||||
size_t index; ///< Index of insert where configuration failed
|
||||
ChanCount count; ///< Input requested of insert
|
||||
size_t index; ///< Index of processor where configuration failed
|
||||
ChanCount count; ///< Input requested of processor
|
||||
};
|
||||
|
||||
int add_insert (boost::shared_ptr<Insert>, InsertStreams* err = 0);
|
||||
int add_inserts (const InsertList&, InsertStreams* err = 0);
|
||||
int remove_insert (boost::shared_ptr<Insert>, InsertStreams* err = 0);
|
||||
int copy_inserts (const Route&, Placement, InsertStreams* err = 0);
|
||||
int sort_inserts (InsertStreams* err = 0);
|
||||
void disable_inserts (Placement);
|
||||
void disable_inserts ();
|
||||
int add_processor (boost::shared_ptr<Processor>, ProcessorStreams* err = 0);
|
||||
int add_processors (const ProcessorList&, ProcessorStreams* err = 0);
|
||||
int remove_processor (boost::shared_ptr<Processor>, ProcessorStreams* err = 0);
|
||||
int copy_processors (const Route&, Placement, ProcessorStreams* err = 0);
|
||||
int sort_processors (ProcessorStreams* err = 0);
|
||||
void disable_processors (Placement);
|
||||
void disable_processors ();
|
||||
void disable_plugins (Placement);
|
||||
void disable_plugins ();
|
||||
void ab_plugins (bool forward);
|
||||
void clear_inserts (Placement);
|
||||
void all_inserts_flip();
|
||||
void all_inserts_active (Placement, bool state);
|
||||
void clear_processors (Placement);
|
||||
void all_processors_flip();
|
||||
void all_processors_active (Placement, bool state);
|
||||
|
||||
virtual nframes_t update_total_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*> control_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*> edit_group_changed;
|
||||
sigc::signal<void,void*> mix_group_changed;
|
||||
|
@ -215,8 +215,8 @@ class Route : public IO
|
|||
int set_state(const XMLNode& node);
|
||||
virtual XMLNode& get_template();
|
||||
|
||||
XMLNode& get_insert_state ();
|
||||
int set_insert_state (const XMLNode&);
|
||||
XMLNode& get_processor_state ();
|
||||
int set_processor_state (const XMLNode&);
|
||||
|
||||
sigc::signal<void,void*> SelectedChanged;
|
||||
|
||||
|
@ -290,29 +290,31 @@ class Route : public IO
|
|||
gain_t desired_solo_gain;
|
||||
gain_t desired_mute_gain;
|
||||
|
||||
nframes_t check_initial_delay (nframes_t, nframes_t&, nframes_t&);
|
||||
|
||||
|
||||
nframes_t _initial_delay;
|
||||
nframes_t _roll_delay;
|
||||
nframes_t _own_latency;
|
||||
InsertList _inserts;
|
||||
Glib::RWLock insert_lock;
|
||||
IO *_control_outs;
|
||||
Glib::Mutex control_outs_lock;
|
||||
RouteGroup *_edit_group;
|
||||
RouteGroup *_mix_group;
|
||||
std::string _comment;
|
||||
bool _have_internal_generator;
|
||||
ProcessorList _processors;
|
||||
Glib::RWLock _processor_lock;
|
||||
IO *_control_outs;
|
||||
Glib::Mutex _control_outs_lock;
|
||||
RouteGroup *_edit_group;
|
||||
RouteGroup *_mix_group;
|
||||
std::string _comment;
|
||||
bool _have_internal_generator;
|
||||
|
||||
ToggleControllable _solo_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,
|
||||
nframes_t nframes, nframes_t offset, int declick, bool meter_inputs);
|
||||
|
||||
virtual void process_output_buffers (BufferSet& bufs,
|
||||
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);
|
||||
|
||||
protected:
|
||||
|
@ -327,14 +329,14 @@ class Route : public IO
|
|||
|
||||
sigc::connection input_signal_connection;
|
||||
|
||||
ChanCount insert_max_outs;
|
||||
ChanCount processor_max_outs;
|
||||
uint32_t _remote_control_id;
|
||||
|
||||
uint32_t pans_required() const;
|
||||
ChanCount n_process_buffers ();
|
||||
|
||||
virtual int _set_state (const XMLNode&, bool call_base);
|
||||
virtual void _set_insert_states (const XMLNodeList&);
|
||||
virtual void _set_processor_states (const XMLNodeList&);
|
||||
|
||||
private:
|
||||
void init ();
|
||||
|
@ -355,24 +357,24 @@ class Route : public IO
|
|||
void input_change_handler (IOChange, void *src);
|
||||
void output_change_handler (IOChange, void *src);
|
||||
|
||||
int reset_plugin_counts (InsertStreams*); /* locked */
|
||||
int _reset_plugin_counts (InsertStreams*); /* unlocked */
|
||||
int reset_plugin_counts (ProcessorStreams*); /* locked */
|
||||
int _reset_plugin_counts (ProcessorStreams*); /* unlocked */
|
||||
|
||||
/* insert I/O channels and plugin count handling */
|
||||
/* processor I/O channels and plugin count handling */
|
||||
|
||||
struct InsertCount {
|
||||
boost::shared_ptr<ARDOUR::Insert> insert;
|
||||
struct ProcessorCount {
|
||||
boost::shared_ptr<ARDOUR::Processor> processor;
|
||||
ChanCount in;
|
||||
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);
|
||||
bool check_some_plugin_counts (std::list<InsertCount>& iclist, ChanCount required_inputs, InsertStreams* err_streams);
|
||||
int32_t apply_some_plugin_counts (std::list<ProcessorCount>& iclist);
|
||||
bool check_some_plugin_counts (std::list<ProcessorCount>& iclist, ChanCount required_inputs, ProcessorStreams* err_streams);
|
||||
|
||||
void set_deferred_state ();
|
||||
void add_insert_from_xml (const XMLNode&);
|
||||
void add_processor_from_xml (const XMLNode&);
|
||||
};
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
#include <ardour/ardour.h>
|
||||
#include <ardour/audioengine.h>
|
||||
#include <ardour/io.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
class Send : public Redirect
|
||||
class Send : public IOProcessor
|
||||
{
|
||||
public:
|
||||
Send (Session&, Placement);
|
||||
|
|
|
@ -87,9 +87,9 @@ class MidiDiskstream;
|
|||
class AudioFileSource;
|
||||
class MidiSource;
|
||||
class Auditioner;
|
||||
class Insert;
|
||||
class Processor;
|
||||
class Send;
|
||||
class Redirect;
|
||||
class IOProcessor;
|
||||
class PortInsert;
|
||||
class PluginInsert;
|
||||
class Bundle;
|
||||
|
@ -1519,8 +1519,8 @@ class Session : public PBD::StatefulDestructible
|
|||
uint32_t insert_cnt;
|
||||
|
||||
|
||||
void add_insert (Insert *);
|
||||
void remove_insert (Insert *);
|
||||
void add_processor (Processor *);
|
||||
void remove_processor (Processor *);
|
||||
|
||||
/* S/W RAID */
|
||||
|
||||
|
|
|
@ -103,14 +103,14 @@ class Track : public Route
|
|||
TrackMode _mode;
|
||||
|
||||
//private: (FIXME)
|
||||
struct FreezeRecordInsertInfo {
|
||||
FreezeRecordInsertInfo(XMLNode& st, boost::shared_ptr<Insert> ins)
|
||||
: state (st), insert (ins) {}
|
||||
struct FreezeRecordProcessorInfo {
|
||||
FreezeRecordProcessorInfo(XMLNode& st, boost::shared_ptr<Processor> proc)
|
||||
: state (st), processor (proc) {}
|
||||
|
||||
XMLNode state;
|
||||
boost::shared_ptr<Insert> insert;
|
||||
PBD::ID id;
|
||||
UndoAction memento;
|
||||
XMLNode state;
|
||||
boost::shared_ptr<Processor> processor;
|
||||
PBD::ID id;
|
||||
UndoAction memento;
|
||||
};
|
||||
|
||||
struct FreezeRecord {
|
||||
|
@ -120,10 +120,10 @@ class Track : public Route
|
|||
|
||||
~FreezeRecord();
|
||||
|
||||
boost::shared_ptr<Playlist> playlist;
|
||||
vector<FreezeRecordInsertInfo*> insert_info;
|
||||
bool have_mementos;
|
||||
FreezeState state;
|
||||
boost::shared_ptr<Playlist> playlist;
|
||||
vector<FreezeRecordProcessorInfo*> processor_info;
|
||||
bool have_mementos;
|
||||
FreezeState state;
|
||||
};
|
||||
|
||||
struct RecEnableControllable : public PBD::Controllable {
|
||||
|
@ -135,11 +135,6 @@ class Track : public Route
|
|||
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;
|
||||
|
||||
FreezeRecord _freeze_record;
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
#include <ardour/audio_track.h>
|
||||
#include <ardour/audio_diskstream.h>
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
#include <ardour/audioregion.h>
|
||||
#include <ardour/audiosource.h>
|
||||
#include <ardour/region_factory.h>
|
||||
#include <ardour/route_group_specialized.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/plugin_insert.h>
|
||||
#include <ardour/audioplaylist.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 ("state", enum_2_string (_freeze_record.state));
|
||||
|
||||
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) {
|
||||
inode = new XMLNode (X_("insert"));
|
||||
for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
|
||||
inode = new XMLNode (X_("processor"));
|
||||
(*i)->id.print (buf, sizeof (buf));
|
||||
inode->add_property (X_("id"), buf);
|
||||
inode->add_child_copy ((*i)->state);
|
||||
|
@ -360,10 +360,10 @@ AudioTrack::set_state_part_two ()
|
|||
_freeze_record.have_mementos = false;
|
||||
_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;
|
||||
}
|
||||
_freeze_record.insert_info.clear ();
|
||||
_freeze_record.processor_info.clear ();
|
||||
|
||||
if ((prop = fnode->property (X_("playlist"))) != 0) {
|
||||
boost::shared_ptr<Playlist> pl = _session.playlist_by_name (prop->value());
|
||||
|
@ -384,7 +384,7 @@ AudioTrack::set_state_part_two ()
|
|||
XMLNodeList clist = fnode->children();
|
||||
|
||||
for (citer = clist.begin(); citer != clist.end(); ++citer) {
|
||||
if ((*citer)->name() != X_("insert")) {
|
||||
if ((*citer)->name() != X_("processor")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -392,10 +392,10 @@ AudioTrack::set_state_part_two ()
|
|||
continue;
|
||||
}
|
||||
|
||||
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()),
|
||||
boost::shared_ptr<Insert>());
|
||||
FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo (*((*citer)->children().front()),
|
||||
boost::shared_ptr<Processor>());
|
||||
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();
|
||||
|
||||
{
|
||||
Glib::RWLock::ReaderLock lm (insert_lock, Glib::TRY_LOCK);
|
||||
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
|
||||
if (lm.locked()) {
|
||||
// automation snapshot can also be called from the non-rt context
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
@ -620,7 +620,7 @@ int
|
|||
AudioTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset,
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -643,12 +643,12 @@ AudioTrack::export_stuff (BufferSet& buffers, nframes_t start, nframes_t nframes
|
|||
gain_t gain_automation[nframes];
|
||||
gain_t gain_buffer[nframes];
|
||||
float mix_buffer[nframes];
|
||||
InsertList::iterator i;
|
||||
ProcessorList::iterator i;
|
||||
bool post_fader_work = false;
|
||||
gain_t this_gain = _gain;
|
||||
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());
|
||||
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
|
||||
will already have checked that there are no external port inserts.
|
||||
/* note: only run processors during export. other layers in the machinery
|
||||
will already have checked that there are no external port processors.
|
||||
*/
|
||||
|
||||
for (i = _inserts.begin(); i != _inserts.end(); ++i) {
|
||||
boost::shared_ptr<Insert> insert;
|
||||
for (i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
boost::shared_ptr<Processor> processor;
|
||||
|
||||
if ((insert = boost::dynamic_pointer_cast<Insert>(*i)) != 0) {
|
||||
switch (insert->placement()) {
|
||||
if ((processor = boost::dynamic_pointer_cast<Processor>(*i)) != 0) {
|
||||
switch (processor->placement()) {
|
||||
case PreFader:
|
||||
insert->run (buffers, start, start+nframes, nframes, 0);
|
||||
processor->run (buffers, start, start+nframes, nframes, 0);
|
||||
break;
|
||||
case PostFader:
|
||||
post_fader_work = true;
|
||||
|
@ -719,15 +719,15 @@ AudioTrack::export_stuff (BufferSet& buffers, nframes_t start, nframes_t nframes
|
|||
|
||||
if (post_fader_work) {
|
||||
|
||||
for (i = _inserts.begin(); i != _inserts.end(); ++i) {
|
||||
boost::shared_ptr<PluginInsert> insert;
|
||||
for (i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
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()) {
|
||||
case PreFader:
|
||||
break;
|
||||
case PostFader:
|
||||
insert->run (buffers, start, start+nframes, nframes, 0);
|
||||
processor->run (buffers, start, start+nframes, nframes, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -796,27 +796,27 @@ AudioTrack::freeze (InterThreadInfo& itt)
|
|||
return;
|
||||
}
|
||||
|
||||
_freeze_record.insert_info.clear ();
|
||||
_freeze_record.processor_info.clear ();
|
||||
_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 ();
|
||||
}
|
||||
}
|
||||
|
@ -852,15 +852,15 @@ AudioTrack::unfreeze ()
|
|||
|
||||
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 ();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Glib::RWLock::ReaderLock lm (insert_lock); // should this be a write lock? jlc
|
||||
for (InsertList::iterator i = _inserts.begin(); i != _inserts.end(); ++i) {
|
||||
for (vector<FreezeRecordInsertInfo*>::iterator ii = _freeze_record.insert_info.begin(); ii != _freeze_record.insert_info.end(); ++ii) {
|
||||
Glib::RWLock::ReaderLock lm (_processor_lock); // should this be a write lock? jlc
|
||||
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
for (vector<FreezeRecordProcessorInfo*>::iterator ii = _freeze_record.processor_info.begin(); ii != _freeze_record.processor_info.end(); ++ii) {
|
||||
if ((*ii)->id == (*i)->id()) {
|
||||
(*i)->set_state (((*ii)->state));
|
||||
break;
|
||||
|
|
|
@ -122,8 +122,7 @@ Automatable::add_automation_parameter(AutomationList* al)
|
|||
/* let derived classes do whatever they need with this */
|
||||
automation_list_creation_callback (al->param_id(), *al);
|
||||
|
||||
cerr << _name << ": added (visible, can_automate) parameter " << al->param_id().to_string() << ", # params = "
|
||||
<< _parameter_automation.size() << endl;
|
||||
cerr << _name << ": added parameter " << al->param_id().to_string() << endl;
|
||||
|
||||
// FIXME: sane default behaviour?
|
||||
_visible_parameter_automation.insert(al->param_id());
|
||||
|
@ -168,7 +167,7 @@ Automatable::automation_list (ParamID parameter, bool create_if_missing)
|
|||
return al;
|
||||
|
||||
} else {
|
||||
warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg;
|
||||
//warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -181,7 +180,7 @@ Automatable::automation_list (ParamID parameter) const
|
|||
if (i != _parameter_automation.end()) {
|
||||
return i->second;
|
||||
} else {
|
||||
warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg;
|
||||
//warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1372,8 +1372,6 @@ AutomationList::set_state (const XMLNode& node)
|
|||
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){
|
||||
_default_value = atof (prop->value());
|
||||
} else {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <pbd/xml++.h>
|
||||
#include <pbd/enumwriter.h>
|
||||
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/utils.h>
|
||||
#include <ardour/send.h>
|
||||
|
@ -42,10 +42,10 @@ using namespace std;
|
|||
using namespace ARDOUR;
|
||||
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 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))
|
||||
{
|
||||
_active = false;
|
||||
|
@ -54,15 +54,15 @@ Redirect::Redirect (Session& s, const string& name, Placement p,
|
|||
_extra_xml = 0;
|
||||
}
|
||||
|
||||
Redirect::~Redirect ()
|
||||
IOProcessor::~IOProcessor ()
|
||||
{
|
||||
notify_callbacks ();
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
|
@ -70,11 +70,11 @@ Redirect::state (bool full_state)
|
|||
}
|
||||
|
||||
int
|
||||
Redirect::set_state (const XMLNode& node)
|
||||
IOProcessor::set_state (const XMLNode& node)
|
||||
{
|
||||
const XMLProperty *prop;
|
||||
|
||||
Insert::set_state(node);
|
||||
Processor::set_state(node);
|
||||
|
||||
XMLNodeList nlist = node.children();
|
||||
XMLNodeIterator niter;
|
||||
|
@ -101,7 +101,7 @@ Redirect::set_state (const XMLNode& node)
|
|||
}
|
||||
|
||||
void
|
||||
Redirect::silence (nframes_t nframes, nframes_t offset)
|
||||
IOProcessor::silence (nframes_t nframes, nframes_t offset)
|
||||
{
|
||||
_io->silence(nframes, offset);
|
||||
}
|
|
@ -118,7 +118,7 @@ PeakMeter::configure_io (ChanCount in, ChanCount out)
|
|||
assert(_visible_peak_power.size() == limit);
|
||||
assert(_max_peak_power.size() == limit);
|
||||
|
||||
Insert::configure_io(in, out);
|
||||
Processor::configure_io(in, out);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
#include <ardour/midi_track.h>
|
||||
#include <ardour/midi_diskstream.h>
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
#include <ardour/midi_region.h>
|
||||
#include <ardour/midi_source.h>
|
||||
#include <ardour/route_group_specialized.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/midi_playlist.h>
|
||||
#include <ardour/panner.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 ("state", enum_2_string (_freeze_record.state));
|
||||
|
||||
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) {
|
||||
inode = new XMLNode (X_("insert"));
|
||||
for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
|
||||
inode = new XMLNode (X_("processor"));
|
||||
(*i)->id.print (buf, sizeof(buf));
|
||||
inode->add_property (X_("id"), buf);
|
||||
inode->add_child_copy ((*i)->state);
|
||||
|
@ -275,10 +275,10 @@ MidiTrack::set_state_part_two ()
|
|||
_freeze_record.have_mementos = false;
|
||||
_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;
|
||||
}
|
||||
_freeze_record.insert_info.clear ();
|
||||
_freeze_record.processor_info.clear ();
|
||||
|
||||
if ((prop = fnode->property (X_("playlist"))) != 0) {
|
||||
boost::shared_ptr<Playlist> pl = _session.playlist_by_name (prop->value());
|
||||
|
@ -299,7 +299,7 @@ MidiTrack::set_state_part_two ()
|
|||
XMLNodeList clist = fnode->children();
|
||||
|
||||
for (citer = clist.begin(); citer != clist.end(); ++citer) {
|
||||
if ((*citer)->name() != X_("insert")) {
|
||||
if ((*citer)->name() != X_("processor")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -307,10 +307,10 @@ MidiTrack::set_state_part_two ()
|
|||
continue;
|
||||
}
|
||||
|
||||
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()),
|
||||
boost::shared_ptr<Insert>());
|
||||
FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo (*((*citer)->children().front()),
|
||||
boost::shared_ptr<Processor>());
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -498,7 +498,7 @@ int
|
|||
MidiTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset,
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -518,7 +518,7 @@ MidiTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_
|
|||
void
|
||||
MidiTrack::process_output_buffers (BufferSet& bufs,
|
||||
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)
|
||||
{
|
||||
/* 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);
|
||||
}
|
||||
|
||||
// Run all inserts
|
||||
if (with_inserts) {
|
||||
Glib::RWLock::ReaderLock rm (insert_lock, Glib::TRY_LOCK);
|
||||
// Run all processors
|
||||
if (with_processors) {
|
||||
Glib::RWLock::ReaderLock rm (_processor_lock, Glib::TRY_LOCK);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ using namespace PBD;
|
|||
const string PluginInsert::port_automation_node_name = "PortAutomation";
|
||||
|
||||
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 */
|
||||
|
||||
|
@ -68,11 +68,11 @@ PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug, Placemen
|
|||
IO::MoreChannels (max(input_streams(), output_streams()));
|
||||
}
|
||||
|
||||
InsertCreated (this); /* EMIT SIGNAL */
|
||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
PluginInsert::PluginInsert (Session& s, const XMLNode& node)
|
||||
: Insert (s, "unnamed plugin insert", PreFader)
|
||||
: Processor (s, "unnamed plugin insert", PreFader)
|
||||
{
|
||||
if (set_state (node)) {
|
||||
throw failed_constructor();
|
||||
|
@ -89,7 +89,7 @@ PluginInsert::PluginInsert (Session& s, const XMLNode& node)
|
|||
}
|
||||
|
||||
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();
|
||||
|
||||
|
@ -103,7 +103,7 @@ PluginInsert::PluginInsert (const PluginInsert& other)
|
|||
|
||||
init ();
|
||||
|
||||
InsertCreated (this); /* EMIT SIGNAL */
|
||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -496,7 +496,7 @@ PluginInsert::configure_io (ChanCount in, ChanCount out)
|
|||
} else {
|
||||
bool success = set_count (count_for_configuration(in, out));
|
||||
if (success)
|
||||
Insert::configure_io(in, out);
|
||||
Processor::configure_io(in, out);
|
||||
return success;
|
||||
}
|
||||
}
|
||||
|
@ -634,7 +634,7 @@ XMLNode&
|
|||
PluginInsert::state (bool full)
|
||||
{
|
||||
char buf[256];
|
||||
XMLNode& node = Insert::state (full);
|
||||
XMLNode& node = Processor::state (full);
|
||||
|
||||
node.add_property ("type", _plugins[0]->state_node_name());
|
||||
snprintf(buf, sizeof(buf), "%s", _plugins[0]->name());
|
||||
|
@ -745,15 +745,15 @@ PluginInsert::set_state(const XMLNode& 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) {
|
||||
if ((*niter)->name() == "Redirect") {
|
||||
if ((*niter)->name() == "IOProcessor") {
|
||||
insert_node = *niter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Insert::set_state (*insert_node);
|
||||
Processor::set_state (*insert_node);
|
||||
|
||||
/* look for port automation node */
|
||||
|
||||
|
|
|
@ -41,17 +41,17 @@ using namespace ARDOUR;
|
|||
using namespace PBD;
|
||||
|
||||
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 ();
|
||||
InsertCreated (this); /* EMIT SIGNAL */
|
||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
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 ();
|
||||
InsertCreated (this); /* EMIT SIGNAL */
|
||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -69,13 +69,13 @@ PortInsert::init ()
|
|||
}
|
||||
|
||||
PortInsert::PortInsert (Session& s, const XMLNode& node)
|
||||
: Redirect (s, "unnamed port insert", PreFader)
|
||||
: IOProcessor (s, "unnamed port insert", PreFader)
|
||||
{
|
||||
if (set_state (node)) {
|
||||
throw failed_constructor();
|
||||
}
|
||||
|
||||
InsertCreated (this); /* EMIT SIGNAL */
|
||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
PortInsert::~PortInsert ()
|
||||
|
@ -110,7 +110,7 @@ PortInsert::get_state(void)
|
|||
XMLNode&
|
||||
PortInsert::state (bool full)
|
||||
{
|
||||
XMLNode& node = Redirect::state(full);
|
||||
XMLNode& node = IOProcessor::state(full);
|
||||
char buf[32];
|
||||
node.add_property ("type", "port");
|
||||
snprintf (buf, sizeof (buf), "%" PRIu32, bitslot);
|
||||
|
@ -146,15 +146,15 @@ PortInsert::set_state(const XMLNode& 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) {
|
||||
if ((*niter)->name() == "Redirect") {
|
||||
if ((*niter)->name() == "IOProcessor") {
|
||||
insert_node = *niter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Redirect::set_state (*insert_node);
|
||||
IOProcessor::set_state (*insert_node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ PortInsert::configure_io (ChanCount in, ChanCount out)
|
|||
bool success = (_io->ensure_io (out, in, false, this) == 0);
|
||||
|
||||
if (success)
|
||||
return Insert::configure_io(in, out);
|
||||
return Processor::configure_io(in, out);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <pbd/enumwriter.h>
|
||||
#include <pbd/xml++.h>
|
||||
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/plugin.h>
|
||||
#include <ardour/port.h>
|
||||
#include <ardour/route.h>
|
||||
|
@ -53,12 +53,12 @@ using namespace std;
|
|||
using namespace ARDOUR;
|
||||
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
|
||||
const string Insert::state_node_name = "Insert";
|
||||
// Always saved as Processor, but may be IOProcessor or Send in legacy sessions
|
||||
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)
|
||||
, _active(false)
|
||||
, _next_ab_is_active(false)
|
||||
|
@ -68,35 +68,35 @@ Insert::Insert(Session& session, const string& name, Placement p)
|
|||
{
|
||||
}
|
||||
|
||||
boost::shared_ptr<Insert>
|
||||
Insert::clone (boost::shared_ptr<const Insert> other)
|
||||
boost::shared_ptr<Processor>
|
||||
Processor::clone (boost::shared_ptr<const Processor> other)
|
||||
{
|
||||
boost::shared_ptr<const Send> send;
|
||||
boost::shared_ptr<const PortInsert> port_insert;
|
||||
boost::shared_ptr<const PluginInsert> plugin_insert;
|
||||
|
||||
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) {
|
||||
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) {
|
||||
return boost::shared_ptr<Insert> (new PluginInsert (*plugin_insert));
|
||||
return boost::shared_ptr<Processor> (new PluginInsert (*plugin_insert));
|
||||
} else {
|
||||
fatal << _("programming error: unknown Insert type in Insert::Clone!\n")
|
||||
fatal << _("programming error: unknown Processor type in Processor::Clone!\n")
|
||||
<< endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
return boost::shared_ptr<Insert>();
|
||||
return boost::shared_ptr<Processor>();
|
||||
}
|
||||
|
||||
void
|
||||
Insert::set_sort_key (uint32_t key)
|
||||
Processor::set_sort_key (uint32_t key)
|
||||
{
|
||||
_sort_key = key;
|
||||
}
|
||||
|
||||
void
|
||||
Insert::set_placement (Placement p)
|
||||
Processor::set_placement (Placement p)
|
||||
{
|
||||
if (_placement != p) {
|
||||
_placement = p;
|
||||
|
@ -105,14 +105,14 @@ Insert::set_placement (Placement p)
|
|||
}
|
||||
|
||||
void
|
||||
Insert::set_active (bool yn)
|
||||
Processor::set_active (bool yn)
|
||||
{
|
||||
_active = yn;
|
||||
ActiveChanged ();
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
Insert::get_state (void)
|
||||
Processor::get_state (void)
|
||||
{
|
||||
return state (true);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ Insert::get_state (void)
|
|||
*/
|
||||
|
||||
XMLNode&
|
||||
Insert::state (bool full_state)
|
||||
Processor::state (bool full_state)
|
||||
{
|
||||
XMLNode* node = new XMLNode (state_node_name);
|
||||
stringstream sstr;
|
||||
|
@ -173,7 +173,7 @@ Insert::state (bool full_state)
|
|||
}
|
||||
|
||||
int
|
||||
Insert::set_state (const XMLNode& node)
|
||||
Processor::set_state (const XMLNode& node)
|
||||
{
|
||||
const XMLProperty *prop;
|
||||
|
||||
|
@ -184,7 +184,6 @@ Insert::set_state (const XMLNode& node)
|
|||
|
||||
XMLNodeList nlist = node.children();
|
||||
XMLNodeIterator niter;
|
||||
bool have_io = false;
|
||||
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -237,7 +231,7 @@ Insert::set_state (const XMLNode& node)
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -33,14 +33,14 @@ using namespace ARDOUR;
|
|||
using namespace PBD;
|
||||
|
||||
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;
|
||||
InsertCreated (this); /* EMIT SIGNAL */
|
||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
Send::Send (Session& s, const XMLNode& node)
|
||||
: Redirect (s, "send", PreFader)
|
||||
: IOProcessor (s, "send", PreFader)
|
||||
{
|
||||
_metering = false;
|
||||
|
||||
|
@ -48,14 +48,14 @@ Send::Send (Session& s, const XMLNode& node)
|
|||
throw failed_constructor();
|
||||
}
|
||||
|
||||
InsertCreated (this); /* EMIT SIGNAL */
|
||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
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;
|
||||
InsertCreated (this); /* EMIT SIGNAL */
|
||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
Send::~Send ()
|
||||
|
@ -72,7 +72,7 @@ Send::get_state(void)
|
|||
XMLNode&
|
||||
Send::state(bool full)
|
||||
{
|
||||
XMLNode& node = Redirect::state(full);
|
||||
XMLNode& node = IOProcessor::state(full);
|
||||
char buf[32];
|
||||
node.add_property ("type", "send");
|
||||
snprintf (buf, sizeof (buf), "%" PRIu32, bitslot);
|
||||
|
@ -100,14 +100,14 @@ Send::set_state(const XMLNode& node)
|
|||
/* Send has regular IO automation (gain, pan) */
|
||||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
if ((*niter)->name() == "Redirect") {
|
||||
if ((*niter)->name() == "IOProcessor") {
|
||||
insert_node = *niter;
|
||||
} else if ((*niter)->name() == X_("Automation")) {
|
||||
_io->set_automation_state (*(*niter), ParamID(GainAutomation));
|
||||
}
|
||||
}
|
||||
|
||||
Redirect::set_state (*insert_node);
|
||||
IOProcessor::set_state (*insert_node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ Send::configure_io (ChanCount in, ChanCount out)
|
|||
bool success = _io->ensure_io (ChanCount::ZERO, in, false, this) == 0;
|
||||
|
||||
if (success) {
|
||||
Insert::configure_io(in, out);
|
||||
Processor::configure_io(in, out);
|
||||
_io->reset_panner();
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
@ -56,9 +56,9 @@
|
|||
#include <ardour/smf_source.h>
|
||||
#include <ardour/auditioner.h>
|
||||
#include <ardour/recent_sessions.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
#include <ardour/send.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/plugin_insert.h>
|
||||
#include <ardour/port_insert.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)->mute_changed.connect (mem_fun (*this, &Session::route_mute_changed));
|
||||
(*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()) {
|
||||
_master_out = (*x);
|
||||
|
@ -3532,44 +3532,44 @@ Session::record_enable_change_all (bool yn)
|
|||
}
|
||||
|
||||
void
|
||||
Session::add_insert (Insert* insert)
|
||||
Session::add_processor (Processor* processor)
|
||||
{
|
||||
Send* send;
|
||||
PortInsert* port_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);
|
||||
} 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);
|
||||
} else if ((send = dynamic_cast<Send *> (insert)) != 0) {
|
||||
} else if ((send = dynamic_cast<Send *> (processor)) != 0) {
|
||||
_sends.insert (_sends.begin(), send);
|
||||
} else {
|
||||
fatal << _("programming error: unknown type of Insert created!") << endmsg;
|
||||
/*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();
|
||||
}
|
||||
|
||||
void
|
||||
Session::remove_insert (Insert* insert)
|
||||
Session::remove_processor (Processor* processor)
|
||||
{
|
||||
Send* send;
|
||||
PortInsert* port_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);
|
||||
if (x != _port_inserts.end()) {
|
||||
insert_bitset[port_insert->bit_slot()] = false;
|
||||
_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);
|
||||
} 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);
|
||||
if (x != _sends.end()) {
|
||||
send_bitset[send->bit_slot()] = false;
|
||||
|
|
|
@ -78,9 +78,9 @@
|
|||
#include <ardour/sndfile_helpers.h>
|
||||
#include <ardour/auditioner.h>
|
||||
#include <ardour/export.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
#include <ardour/send.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/bundle.h>
|
||||
#include <ardour/slave.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));
|
||||
SourceFactory::SourceCreated.connect (mem_fun (*this, &Session::add_source));
|
||||
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));
|
||||
AutomationList::AutomationListCreated.connect (mem_fun (*this, &Session::add_automation_list));
|
||||
|
||||
|
|
|
@ -581,7 +581,7 @@ Session::flush_all_inserts ()
|
|||
boost::shared_ptr<RouteList> r = routes.reader ();
|
||||
|
||||
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
|
||||
(*i)->flush_inserts ();
|
||||
(*i)->flush_processors ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
#include <ardour/track.h>
|
||||
#include <ardour/diskstream.h>
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/redirect.h>
|
||||
#include <ardour/io_processor.h>
|
||||
#include <ardour/audioregion.h>
|
||||
#include <ardour/audiosource.h>
|
||||
#include <ardour/route_group_specialized.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/audioplaylist.h>
|
||||
#include <ardour/panner.h>
|
||||
#include <ardour/utils.h>
|
||||
|
@ -92,7 +92,7 @@ Track::update_total_latency ()
|
|||
{
|
||||
_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 ()) {
|
||||
_own_latency += (*i)->latency ();
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ Track::update_total_latency ()
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user