mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Merged with trunk R708
git-svn-id: svn://localhost/ardour2/branches/midi@712 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
60454cc8dc
commit
8277d134b9
147 changed files with 3524 additions and 2683 deletions
|
|
@ -1 +0,0 @@
|
||||||
Last merged with trunk revision: 627
|
|
||||||
|
|
@ -31,6 +31,7 @@ opts.AddOptions(
|
||||||
PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/'),
|
PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/'),
|
||||||
EnumOption('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'tiger', 'panther', 'none' ), ignorecase=2),
|
EnumOption('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'tiger', 'panther', 'none' ), ignorecase=2),
|
||||||
BoolOption('DMALLOC', 'Compile and link using the dmalloc library', 0),
|
BoolOption('DMALLOC', 'Compile and link using the dmalloc library', 0),
|
||||||
|
BoolOption('EXTRA_WARN', 'Compile with -Wextra, -ansi, and -pedantic. Might break compilation. For pedants', 0),
|
||||||
BoolOption('FFT_ANALYSIS', 'Include FFT analysis window', 0),
|
BoolOption('FFT_ANALYSIS', 'Include FFT analysis window', 0),
|
||||||
BoolOption('FPU_OPTIMIZATION', 'Build runtime checked assembler code', 1),
|
BoolOption('FPU_OPTIMIZATION', 'Build runtime checked assembler code', 1),
|
||||||
BoolOption('LIBLO', 'Compile with support for liblo library', 1),
|
BoolOption('LIBLO', 'Compile with support for liblo library', 1),
|
||||||
|
|
@ -833,6 +834,10 @@ else:
|
||||||
env.Append(CCFLAGS="-Wall")
|
env.Append(CCFLAGS="-Wall")
|
||||||
env.Append(CXXFLAGS="-Woverloaded-virtual")
|
env.Append(CXXFLAGS="-Woverloaded-virtual")
|
||||||
|
|
||||||
|
if env['EXTRA_WARN']:
|
||||||
|
env.Append(CCFLAGS="-Wextra -pedantic")
|
||||||
|
env.Append(CXXFLAGS="-ansi")
|
||||||
|
|
||||||
if env['LIBLO']:
|
if env['LIBLO']:
|
||||||
env.Append(CCFLAGS="-DHAVE_LIBLO")
|
env.Append(CCFLAGS="-DHAVE_LIBLO")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,8 +144,6 @@ marker.cc
|
||||||
marker_time_axis.cc
|
marker_time_axis.cc
|
||||||
marker_time_axis_view.cc
|
marker_time_axis_view.cc
|
||||||
marker_view.cc
|
marker_view.cc
|
||||||
meter_bridge.cc
|
|
||||||
meter_bridge_strip.cc
|
|
||||||
mixer_strip.cc
|
mixer_strip.cc
|
||||||
mixer_ui.cc
|
mixer_ui.cc
|
||||||
new_session_dialog.cc
|
new_session_dialog.cc
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string.h>
|
#include <string>
|
||||||
|
|
||||||
#include <gtk/gtkaccelmap.h>
|
#include <gtk/gtkaccelmap.h>
|
||||||
#include <gtk/gtkuimanager.h>
|
#include <gtk/gtkuimanager.h>
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,10 @@
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu action='addExistingAudioFiles'>
|
<menu action='addExistingAudioFiles'>
|
||||||
<menuitem action='addExternalAudioAsRegion'/>
|
<menuitem action='addExternalAudioAsRegion'/>
|
||||||
<menuitem action='addExternalAudioAsTrack'/>
|
|
||||||
<menuitem action='addExternalAudioToTrack'/>
|
<menuitem action='addExternalAudioToTrack'/>
|
||||||
|
<separator/>
|
||||||
|
<menuitem action='addExternalAudioAsTrack'/>
|
||||||
|
<menuitem action='addExternalAudioAsTapeTrack'/>
|
||||||
</menu>
|
</menu>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name='Export' action='Export'>
|
<menu name='Export' action='Export'>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
class Session;
|
class Session;
|
||||||
};
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This virtual parent class is so that each dialog box uses the
|
* This virtual parent class is so that each dialog box uses the
|
||||||
|
|
@ -55,3 +55,4 @@ class ArdourDialog : public Gtk::Dialog
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __ardour_dialog_h__
|
#endif // __ardour_dialog_h__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -340,15 +340,15 @@ ARDOUR_UI::save_ardour_state ()
|
||||||
Config->add_extra_xml (*node);
|
Config->add_extra_xml (*node);
|
||||||
Config->save_state();
|
Config->save_state();
|
||||||
|
|
||||||
XMLNode& enode (static_cast<Stateful*>(editor)->get_state());
|
XMLNode enode(static_cast<Stateful*>(editor)->get_state());
|
||||||
XMLNode& mnode (mixer->get_state());
|
XMLNode mnode(mixer->get_state());
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
session->add_instant_xml(enode, session->path());
|
session->add_instant_xml (enode, session->path());
|
||||||
session->add_instant_xml(mnode, session->path());
|
session->add_instant_xml (mnode, session->path());
|
||||||
} else {
|
} else {
|
||||||
Config->add_instant_xml(enode, get_user_ardour_path());
|
Config->add_instant_xml (enode, get_user_ardour_path());
|
||||||
Config->add_instant_xml(mnode, get_user_ardour_path());
|
Config->add_instant_xml (mnode, get_user_ardour_path());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* keybindings */
|
/* keybindings */
|
||||||
|
|
@ -544,9 +544,9 @@ ARDOUR_UI::update_buffer_load ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::count_recenabled_diskstreams (Route* route)
|
ARDOUR_UI::count_recenabled_diskstreams (Route& route)
|
||||||
{
|
{
|
||||||
Track* track = dynamic_cast<Track*>(route);
|
Track* track = dynamic_cast<Track*>(&route);
|
||||||
if (track && track->diskstream().record_enabled()) {
|
if (track && track->diskstream().record_enabled()) {
|
||||||
rec_enabled_diskstreams++;
|
rec_enabled_diskstreams++;
|
||||||
}
|
}
|
||||||
|
|
@ -872,7 +872,7 @@ ARDOUR_UI::open_session ()
|
||||||
void
|
void
|
||||||
ARDOUR_UI::session_add_midi_route (bool disk)
|
ARDOUR_UI::session_add_midi_route (bool disk)
|
||||||
{
|
{
|
||||||
Route* route;
|
boost::shared_ptr<Route> route;
|
||||||
|
|
||||||
if (session == 0) {
|
if (session == 0) {
|
||||||
warning << _("You cannot add a track without a session already loaded.") << endmsg;
|
warning << _("You cannot add a track without a session already loaded.") << endmsg;
|
||||||
|
|
@ -881,27 +881,14 @@ ARDOUR_UI::session_add_midi_route (bool disk)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (disk) {
|
if (disk) {
|
||||||
if ((route = session->new_midi_track ()) == 0) {
|
if ((route = session->new_midi_track (/*mode*/)) == 0) {
|
||||||
error << _("could not create new MIDI track") << endmsg;
|
error << _("could not create new midi track") << endmsg;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((route = session->new_midi_route ()) == 0) {
|
if ((route = session->new_midi_route ()) == 0) {
|
||||||
error << _("could not create new MIDI bus") << endmsg;
|
error << _("could not create new midi bus") << endmsg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
#if CONTROLOUTS
|
|
||||||
if (need_control_room_outs) {
|
|
||||||
pan_t pans[2];
|
|
||||||
|
|
||||||
pans[0] = 0.5;
|
|
||||||
pans[1] = 0.5;
|
|
||||||
|
|
||||||
route->set_stereo_control_outs (control_lr_channels);
|
|
||||||
route->control_outs()->set_stereo_pan (pans, this);
|
|
||||||
}
|
|
||||||
#endif /* CONTROLOUTS */
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (...) {
|
catch (...) {
|
||||||
|
|
@ -918,7 +905,7 @@ restart JACK with more ports."));
|
||||||
void
|
void
|
||||||
ARDOUR_UI::session_add_audio_route (bool disk, int32_t input_channels, int32_t output_channels, ARDOUR::TrackMode mode)
|
ARDOUR_UI::session_add_audio_route (bool disk, int32_t input_channels, int32_t output_channels, ARDOUR::TrackMode mode)
|
||||||
{
|
{
|
||||||
Route* route;
|
boost::shared_ptr<Route> route;
|
||||||
|
|
||||||
if (session == 0) {
|
if (session == 0) {
|
||||||
warning << _("You cannot add a track without a session already loaded.") << endmsg;
|
warning << _("You cannot add a track without a session already loaded.") << endmsg;
|
||||||
|
|
@ -1207,13 +1194,13 @@ ARDOUR_UI::toggle_record_enable (uint32_t dstream)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Route* r;
|
boost::shared_ptr<Route> r;
|
||||||
|
|
||||||
if ((r = session->route_by_remote_id (dstream)) != 0) {
|
if ((r = session->route_by_remote_id (dstream)) != 0) {
|
||||||
|
|
||||||
Track* t;
|
Track* t;
|
||||||
|
|
||||||
if ((t = dynamic_cast<Track*>(r)) != 0) {
|
if ((t = dynamic_cast<Track*>(r.get())) != 0) {
|
||||||
t->diskstream().set_record_enabled (!t->diskstream().record_enabled(), this);
|
t->diskstream().set_record_enabled (!t->diskstream().record_enabled(), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ class ColorManager;
|
||||||
|
|
||||||
namespace Gtkmm2ext {
|
namespace Gtkmm2ext {
|
||||||
class TearOff;
|
class TearOff;
|
||||||
};
|
}
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
class AudioEngine;
|
class AudioEngine;
|
||||||
|
|
@ -87,11 +87,11 @@ namespace ARDOUR {
|
||||||
class Port;
|
class Port;
|
||||||
class IO;
|
class IO;
|
||||||
class ControlProtocolInfo;
|
class ControlProtocolInfo;
|
||||||
};
|
}
|
||||||
|
|
||||||
namespace ALSA {
|
namespace ALSA {
|
||||||
class MultiChannelDevice;
|
class MultiChannelDevice;
|
||||||
};
|
}
|
||||||
|
|
||||||
#define FRAME_NAME "BaseFrame"
|
#define FRAME_NAME "BaseFrame"
|
||||||
|
|
||||||
|
|
@ -628,7 +628,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
void toggle_record_enable (uint32_t);
|
void toggle_record_enable (uint32_t);
|
||||||
|
|
||||||
uint32_t rec_enabled_diskstreams;
|
uint32_t rec_enabled_diskstreams;
|
||||||
void count_recenabled_diskstreams (ARDOUR::Route*);
|
void count_recenabled_diskstreams (ARDOUR::Route&);
|
||||||
|
|
||||||
About* about;
|
About* about;
|
||||||
bool shown_flag;
|
bool shown_flag;
|
||||||
|
|
@ -714,5 +714,5 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
void toggle_control_protocol (ARDOUR::ControlProtocolInfo*);
|
void toggle_control_protocol (ARDOUR::ControlProtocolInfo*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ardour_gui_h__ */
|
#endif /* __ardour_gui_h__ */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
class Session;
|
class Session;
|
||||||
};
|
}
|
||||||
|
|
||||||
class AudioClock : public Gtk::HBox
|
class AudioClock : public Gtk::HBox
|
||||||
{
|
{
|
||||||
|
|
@ -40,7 +40,7 @@ class AudioClock : public Gtk::HBox
|
||||||
BBT,
|
BBT,
|
||||||
MinSec,
|
MinSec,
|
||||||
Frames,
|
Frames,
|
||||||
Off,
|
Off
|
||||||
};
|
};
|
||||||
|
|
||||||
AudioClock (const string& name, bool editable, bool is_duration = false, bool with_tempo_meter = false);
|
AudioClock (const string& name, bool editable, bool is_duration = false, bool with_tempo_meter = false);
|
||||||
|
|
@ -87,7 +87,7 @@ class AudioClock : public Gtk::HBox
|
||||||
Bars,
|
Bars,
|
||||||
Beats,
|
Beats,
|
||||||
Ticks,
|
Ticks,
|
||||||
AudioFrames,
|
AudioFrames
|
||||||
};
|
};
|
||||||
|
|
||||||
Gtk::EventBox audio_frames_ebox;
|
Gtk::EventBox audio_frames_ebox;
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ using namespace Gtk;
|
||||||
using namespace Editing;
|
using namespace Editing;
|
||||||
|
|
||||||
|
|
||||||
AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt, Canvas& canvas)
|
AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::shared_ptr<Route> rt, Canvas& canvas)
|
||||||
: AxisView(sess), // FIXME: won't compile without this, why??
|
: AxisView(sess), // FIXME: won't compile without this, why??
|
||||||
RouteTimeAxisView(ed, sess, rt, canvas)
|
RouteTimeAxisView(ed, sess, rt, canvas)
|
||||||
{
|
{
|
||||||
|
|
@ -121,8 +121,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
|
||||||
|
|
||||||
set_state (*xml_node);
|
set_state (*xml_node);
|
||||||
|
|
||||||
_route.redirects_changed.connect (mem_fun(*this, &AudioTimeAxisView::redirects_changed));
|
_route->panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans));
|
||||||
_route.panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans));
|
|
||||||
|
|
||||||
if (is_audio_track()) {
|
if (is_audio_track()) {
|
||||||
|
|
||||||
|
|
@ -341,7 +340,7 @@ AudioTimeAxisView::build_display_menu ()
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active)));
|
items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active)));
|
||||||
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||||
route_active_menu_item->set_active (_route.active());
|
route_active_menu_item->set_active (_route->active());
|
||||||
|
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
|
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
|
||||||
|
|
@ -390,7 +389,9 @@ AudioTimeAxisView::set_waveform_shape (WaveformShape shape)
|
||||||
if (asv) {
|
if (asv) {
|
||||||
asv->set_waveform_shape (shape);
|
asv->set_waveform_shape (shape);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
map_frozen ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::set_selected_regionviews (RegionSelection& regions)
|
AudioTimeAxisView::set_selected_regionviews (RegionSelection& regions)
|
||||||
|
|
@ -414,13 +415,13 @@ AudioTimeAxisView::add_gain_automation_child ()
|
||||||
*this,
|
*this,
|
||||||
parent_canvas,
|
parent_canvas,
|
||||||
_("gain"),
|
_("gain"),
|
||||||
_route.gain_automation_curve());
|
_route->gain_automation_curve());
|
||||||
|
|
||||||
line = new AutomationGainLine ("automation gain",
|
line = new AutomationGainLine ("automation gain",
|
||||||
_session,
|
_session,
|
||||||
*gain_track,
|
*gain_track,
|
||||||
*gain_track->canvas_display,
|
*gain_track->canvas_display,
|
||||||
_route.gain_automation_curve());
|
_route->gain_automation_curve());
|
||||||
|
|
||||||
line->set_line_color (color_map[cAutomationLine]);
|
line->set_line_color (color_map[cAutomationLine]);
|
||||||
|
|
||||||
|
|
@ -489,11 +490,11 @@ AudioTimeAxisView::update_pans ()
|
||||||
/* we don't draw lines for "greater than stereo" panning.
|
/* we don't draw lines for "greater than stereo" panning.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (_route.n_outputs() > 2) {
|
if (_route->n_outputs() > 2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (p = _route.panner().begin(); p != _route.panner().end(); ++p) {
|
for (p = _route->panner().begin(); p != _route->panner().end(); ++p) {
|
||||||
|
|
||||||
AutomationLine* line;
|
AutomationLine* line;
|
||||||
|
|
||||||
|
|
@ -501,7 +502,7 @@ AudioTimeAxisView::update_pans ()
|
||||||
*pan_track->canvas_display,
|
*pan_track->canvas_display,
|
||||||
(*p)->automation());
|
(*p)->automation());
|
||||||
|
|
||||||
if (p == _route.panner().begin()) {
|
if (p == _route->panner().begin()) {
|
||||||
/* first line is a nice orange */
|
/* first line is a nice orange */
|
||||||
line->set_line_color (color_map[cLeftPanAutomationLine]);
|
line->set_line_color (color_map[cLeftPanAutomationLine]);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -533,7 +534,7 @@ AudioTimeAxisView::toggle_gain_track ()
|
||||||
/* now trigger a redisplay */
|
/* now trigger a redisplay */
|
||||||
|
|
||||||
if (!no_redraw) {
|
if (!no_redraw) {
|
||||||
_route.gui_changed (X_("track_height"), (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed (X_("track_height"), (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -547,7 +548,7 @@ AudioTimeAxisView::gain_hidden ()
|
||||||
gain_automation_item->set_active (false);
|
gain_automation_item->set_active (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
_route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -569,7 +570,7 @@ AudioTimeAxisView::toggle_pan_track ()
|
||||||
/* now trigger a redisplay */
|
/* now trigger a redisplay */
|
||||||
|
|
||||||
if (!no_redraw) {
|
if (!no_redraw) {
|
||||||
_route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -583,7 +584,7 @@ AudioTimeAxisView::pan_hidden ()
|
||||||
pan_automation_item->set_active (false);
|
pan_automation_item->set_active (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
_route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioTimeAxisView::RedirectAutomationInfo::~RedirectAutomationInfo ()
|
AudioTimeAxisView::RedirectAutomationInfo::~RedirectAutomationInfo ()
|
||||||
|
|
@ -612,7 +613,7 @@ AudioTimeAxisView::remove_ran (RedirectAutomationNode* ran)
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioTimeAxisView::RedirectAutomationNode*
|
AudioTimeAxisView::RedirectAutomationNode*
|
||||||
AudioTimeAxisView::find_redirect_automation_node (Redirect *redirect, uint32_t what)
|
AudioTimeAxisView::find_redirect_automation_node (boost::shared_ptr<Redirect> redirect, uint32_t what)
|
||||||
{
|
{
|
||||||
for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ++i) {
|
for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ++i) {
|
||||||
|
|
||||||
|
|
@ -650,7 +651,7 @@ legalize_for_xml_node (string str)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::add_redirect_automation_curve (Redirect *redirect, uint32_t what)
|
AudioTimeAxisView::add_redirect_automation_curve (boost::shared_ptr<Redirect> redirect, uint32_t what)
|
||||||
{
|
{
|
||||||
RedirectAutomationLine* ral;
|
RedirectAutomationLine* ral;
|
||||||
string name;
|
string name;
|
||||||
|
|
@ -703,7 +704,7 @@ AudioTimeAxisView::add_redirect_automation_curve (Redirect *redirect, uint32_t w
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::redirect_automation_track_hidden (AudioTimeAxisView::RedirectAutomationNode* ran, Redirect* r)
|
AudioTimeAxisView::redirect_automation_track_hidden (AudioTimeAxisView::RedirectAutomationNode* ran, boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
if (!_hidden) {
|
if (!_hidden) {
|
||||||
ran->menu_item->set_active (false);
|
ran->menu_item->set_active (false);
|
||||||
|
|
@ -711,11 +712,11 @@ AudioTimeAxisView::redirect_automation_track_hidden (AudioTimeAxisView::Redirect
|
||||||
|
|
||||||
r->mark_automation_visible (ran->what, false);
|
r->mark_automation_visible (ran->what, false);
|
||||||
|
|
||||||
_route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::add_existing_redirect_automation_curves (Redirect *redirect)
|
AudioTimeAxisView::add_existing_redirect_automation_curves (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
set<uint32_t> s;
|
set<uint32_t> s;
|
||||||
RedirectAutomationLine *ral;
|
RedirectAutomationLine *ral;
|
||||||
|
|
@ -733,7 +734,7 @@ AudioTimeAxisView::add_existing_redirect_automation_curves (Redirect *redirect)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::add_redirect_to_subplugin_menu (Redirect* r)
|
AudioTimeAxisView::add_redirect_to_subplugin_menu (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
RedirectAutomationInfo *rai;
|
RedirectAutomationInfo *rai;
|
||||||
|
|
@ -847,7 +848,7 @@ AudioTimeAxisView::redirect_menu_item_toggled (AudioTimeAxisView::RedirectAutoma
|
||||||
|
|
||||||
/* now trigger a redisplay */
|
/* now trigger a redisplay */
|
||||||
|
|
||||||
_route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -863,8 +864,8 @@ AudioTimeAxisView::redirects_changed (void *src)
|
||||||
|
|
||||||
subplugin_menu.items().clear ();
|
subplugin_menu.items().clear ();
|
||||||
|
|
||||||
_route.foreach_redirect (this, &AudioTimeAxisView::add_redirect_to_subplugin_menu);
|
_route->foreach_redirect (this, &AudioTimeAxisView::add_redirect_to_subplugin_menu);
|
||||||
_route.foreach_redirect (this, &AudioTimeAxisView::add_existing_redirect_automation_curves);
|
_route->foreach_redirect (this, &AudioTimeAxisView::add_existing_redirect_automation_curves);
|
||||||
|
|
||||||
for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ) {
|
for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ) {
|
||||||
|
|
||||||
|
|
@ -885,11 +886,11 @@ AudioTimeAxisView::redirects_changed (void *src)
|
||||||
|
|
||||||
/* change in visibility was possible */
|
/* change in visibility was possible */
|
||||||
|
|
||||||
_route.gui_changed ("track_height", this);
|
_route->gui_changed ("track_height", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
RedirectAutomationLine *
|
RedirectAutomationLine *
|
||||||
AudioTimeAxisView::find_redirect_automation_curve (Redirect *redirect, uint32_t what)
|
AudioTimeAxisView::find_redirect_automation_curve (boost::shared_ptr<Redirect> redirect, uint32_t what)
|
||||||
{
|
{
|
||||||
RedirectAutomationNode* ran;
|
RedirectAutomationNode* ran;
|
||||||
|
|
||||||
|
|
@ -922,7 +923,7 @@ AudioTimeAxisView::show_all_automation ()
|
||||||
|
|
||||||
no_redraw = false;
|
no_redraw = false;
|
||||||
|
|
||||||
_route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -943,7 +944,7 @@ AudioTimeAxisView::show_existing_automation ()
|
||||||
|
|
||||||
no_redraw = false;
|
no_redraw = false;
|
||||||
|
|
||||||
_route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -961,7 +962,7 @@ AudioTimeAxisView::hide_all_automation ()
|
||||||
}
|
}
|
||||||
|
|
||||||
no_redraw = false;
|
no_redraw = false;
|
||||||
_route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1032,7 +1033,7 @@ AudioTimeAxisView::route_active_changed ()
|
||||||
RouteUI::route_active_changed ();
|
RouteUI::route_active_changed ();
|
||||||
|
|
||||||
if (is_audio_track()) {
|
if (is_audio_track()) {
|
||||||
if (_route.active()) {
|
if (_route->active()) {
|
||||||
controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
|
controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
|
||||||
controls_base_selected_name = "AudioTrackControlsBaseSelected";
|
controls_base_selected_name = "AudioTrackControlsBaseSelected";
|
||||||
controls_base_unselected_name = "AudioTrackControlsBaseUnselected";
|
controls_base_unselected_name = "AudioTrackControlsBaseUnselected";
|
||||||
|
|
@ -1042,7 +1043,7 @@ AudioTimeAxisView::route_active_changed ()
|
||||||
controls_base_unselected_name = "AudioTrackControlsBaseInactiveUnselected";
|
controls_base_unselected_name = "AudioTrackControlsBaseInactiveUnselected";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (_route.active()) {
|
if (_route->active()) {
|
||||||
controls_ebox.set_name ("BusControlsBaseUnselected");
|
controls_ebox.set_name ("BusControlsBaseUnselected");
|
||||||
controls_base_selected_name = "BusControlsBaseSelected";
|
controls_base_selected_name = "BusControlsBaseSelected";
|
||||||
controls_base_unselected_name = "BusControlsBaseUnselected";
|
controls_base_unselected_name = "BusControlsBaseUnselected";
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ class AutomationTimeAxisView;
|
||||||
class AudioTimeAxisView : public RouteTimeAxisView
|
class AudioTimeAxisView : public RouteTimeAxisView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AudioTimeAxisView (PublicEditor&, ARDOUR::Session&, ARDOUR::Route&, ArdourCanvas::Canvas& canvas);
|
AudioTimeAxisView (PublicEditor&, ARDOUR::Session&, boost::shared_ptr<ARDOUR::Route>, ArdourCanvas::Canvas& canvas);
|
||||||
virtual ~AudioTimeAxisView ();
|
virtual ~AudioTimeAxisView ();
|
||||||
|
|
||||||
AudioStreamView* audio_view();
|
AudioStreamView* audio_view();
|
||||||
|
|
@ -106,6 +106,7 @@ class AudioTimeAxisView : public RouteTimeAxisView
|
||||||
bool show_gain_automation;
|
bool show_gain_automation;
|
||||||
bool show_pan_automation;
|
bool show_pan_automation;
|
||||||
|
|
||||||
|
// FIXME?
|
||||||
void redirects_changed (void *);
|
void redirects_changed (void *);
|
||||||
|
|
||||||
void build_display_menu ();
|
void build_display_menu ();
|
||||||
|
|
@ -144,33 +145,33 @@ class AudioTimeAxisView : public RouteTimeAxisView
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RedirectAutomationInfo {
|
struct RedirectAutomationInfo {
|
||||||
ARDOUR::Redirect* redirect;
|
boost::shared_ptr<ARDOUR::Redirect> redirect;
|
||||||
bool valid;
|
bool valid;
|
||||||
Gtk::Menu* menu;
|
Gtk::Menu* menu;
|
||||||
vector<RedirectAutomationNode*> lines;
|
vector<RedirectAutomationNode*> lines;
|
||||||
|
|
||||||
RedirectAutomationInfo (ARDOUR::Redirect* r)
|
RedirectAutomationInfo (boost::shared_ptr<ARDOUR::Redirect> r)
|
||||||
: redirect (r), valid (true) {}
|
: redirect (r), valid (true) {}
|
||||||
|
|
||||||
~RedirectAutomationInfo ();
|
~RedirectAutomationInfo ();
|
||||||
};
|
};
|
||||||
|
|
||||||
list<RedirectAutomationInfo*> redirect_automation;
|
list<RedirectAutomationInfo*> redirect_automation;
|
||||||
RedirectAutomationNode* find_redirect_automation_node (ARDOUR::Redirect *redirect, uint32_t what);
|
RedirectAutomationNode* find_redirect_automation_node (boost::shared_ptr<ARDOUR::Redirect> redirect, uint32_t what);
|
||||||
|
|
||||||
Gtk::Menu subplugin_menu;
|
Gtk::Menu subplugin_menu;
|
||||||
void add_redirect_to_subplugin_menu (ARDOUR::Redirect *);
|
void add_redirect_to_subplugin_menu (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
void remove_ran (RedirectAutomationNode* ran);
|
void remove_ran (RedirectAutomationNode* ran);
|
||||||
|
|
||||||
void redirect_menu_item_toggled (AudioTimeAxisView::RedirectAutomationInfo*,
|
void redirect_menu_item_toggled (AudioTimeAxisView::RedirectAutomationInfo*,
|
||||||
AudioTimeAxisView::RedirectAutomationNode*);
|
AudioTimeAxisView::RedirectAutomationNode*);
|
||||||
void redirect_automation_track_hidden (RedirectAutomationNode*, ARDOUR::Redirect*);
|
void redirect_automation_track_hidden (RedirectAutomationNode*, boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
vector<RedirectAutomationLine*> redirect_automation_curves;
|
vector<RedirectAutomationLine*> redirect_automation_curves;
|
||||||
RedirectAutomationLine *find_redirect_automation_curve (ARDOUR::Redirect*,uint32_t);
|
RedirectAutomationLine *find_redirect_automation_curve (boost::shared_ptr<ARDOUR::Redirect>,uint32_t);
|
||||||
void add_redirect_automation_curve (ARDOUR::Redirect*, uint32_t);
|
void add_redirect_automation_curve (boost::shared_ptr<ARDOUR::Redirect>, uint32_t);
|
||||||
void add_existing_redirect_automation_curves (ARDOUR::Redirect*);
|
void add_existing_redirect_automation_curves (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
void add_gain_automation_child ();
|
void add_gain_automation_child ();
|
||||||
void add_pan_automation_child ();
|
void add_pan_automation_child ();
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ using namespace PBD;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
using namespace Editing;
|
using namespace Editing;
|
||||||
|
|
||||||
AutomationTimeAxisView::AutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& rent,
|
AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Route> r, PublicEditor& e, TimeAxisView& rent,
|
||||||
ArdourCanvas::Canvas& canvas, const string & nom,
|
ArdourCanvas::Canvas& canvas, const string & nom,
|
||||||
const string & state_name, const string & nomparent)
|
const string & state_name, const string & nomparent)
|
||||||
|
|
||||||
|
|
@ -410,7 +410,7 @@ AutomationTimeAxisView::set_height (TrackHeight ht)
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
/* only emit the signal if the height really changed */
|
/* only emit the signal if the height really changed */
|
||||||
route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <ardour/types.h>
|
#include <ardour/types.h>
|
||||||
|
|
||||||
#include "canvas.h"
|
#include "canvas.h"
|
||||||
|
|
@ -31,7 +34,7 @@ class Selectable;
|
||||||
class AutomationTimeAxisView : public TimeAxisView {
|
class AutomationTimeAxisView : public TimeAxisView {
|
||||||
public:
|
public:
|
||||||
AutomationTimeAxisView (ARDOUR::Session&,
|
AutomationTimeAxisView (ARDOUR::Session&,
|
||||||
ARDOUR::Route&,
|
boost::shared_ptr<ARDOUR::Route>,
|
||||||
PublicEditor&,
|
PublicEditor&,
|
||||||
TimeAxisView& parent,
|
TimeAxisView& parent,
|
||||||
ArdourCanvas::Canvas& canvas,
|
ArdourCanvas::Canvas& canvas,
|
||||||
|
|
@ -75,7 +78,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||||
XMLNode* get_state_node ();
|
XMLNode* get_state_node ();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ARDOUR::Route& route;
|
boost::shared_ptr<ARDOUR::Route> route;
|
||||||
ArdourCanvas::SimpleRect* base_rect;
|
ArdourCanvas::SimpleRect* base_rect;
|
||||||
string _name;
|
string _name;
|
||||||
string _state_name;
|
string _state_name;
|
||||||
|
|
|
||||||
|
|
@ -1077,7 +1077,7 @@ CrossfadeEditor::peaks_ready (AudioRegion* r, WhichFade which)
|
||||||
void
|
void
|
||||||
CrossfadeEditor::audition_both ()
|
CrossfadeEditor::audition_both ()
|
||||||
{
|
{
|
||||||
AudioPlaylist& pl (session.the_auditioner().prepare_playlist());
|
AudioPlaylist& pl (session.the_auditioner()->prepare_playlist());
|
||||||
jack_nframes_t preroll;
|
jack_nframes_t preroll;
|
||||||
jack_nframes_t postroll;
|
jack_nframes_t postroll;
|
||||||
jack_nframes_t length;
|
jack_nframes_t length;
|
||||||
|
|
@ -1140,7 +1140,7 @@ CrossfadeEditor::audition_left_dry ()
|
||||||
void
|
void
|
||||||
CrossfadeEditor::audition_left ()
|
CrossfadeEditor::audition_left ()
|
||||||
{
|
{
|
||||||
AudioPlaylist& pl (session.the_auditioner().prepare_playlist());
|
AudioPlaylist& pl (session.the_auditioner()->prepare_playlist());
|
||||||
|
|
||||||
AudioRegion* left = new AudioRegion (xfade.out(), xfade.out().length() - xfade.length(), xfade.length(), "xfade left",
|
AudioRegion* left = new AudioRegion (xfade.out(), xfade.out().length() - xfade.length(), xfade.length(), "xfade left",
|
||||||
0, Region::DefaultFlags, false);
|
0, Region::DefaultFlags, false);
|
||||||
|
|
@ -1172,7 +1172,7 @@ CrossfadeEditor::audition_right_dry ()
|
||||||
void
|
void
|
||||||
CrossfadeEditor::audition_right ()
|
CrossfadeEditor::audition_right ()
|
||||||
{
|
{
|
||||||
AudioPlaylist& pl (session.the_auditioner().prepare_playlist());
|
AudioPlaylist& pl (session.the_auditioner()->prepare_playlist());
|
||||||
|
|
||||||
AudioRegion* left = new AudioRegion (xfade.out(), xfade.out().length() - xfade.length(), xfade.length(), "xfade out",
|
AudioRegion* left = new AudioRegion (xfade.out(), xfade.out().length() - xfade.length(), xfade.length(), "xfade out",
|
||||||
0, Region::DefaultFlags, false);
|
0, Region::DefaultFlags, false);
|
||||||
|
|
|
||||||
|
|
@ -56,4 +56,5 @@ DISPLAYCONTROL(ShowWaveformsRecording)
|
||||||
|
|
||||||
IMPORTMODE(ImportAsRegion)
|
IMPORTMODE(ImportAsRegion)
|
||||||
IMPORTMODE(ImportAsTrack)
|
IMPORTMODE(ImportAsTrack)
|
||||||
|
IMPORTMODE(ImportAsTapeTrack)
|
||||||
IMPORTMODE(ImportToTrack)
|
IMPORTMODE(ImportToTrack)
|
||||||
|
|
|
||||||
|
|
@ -877,7 +877,7 @@ Editor::set_frames_per_unit (double fpu)
|
||||||
void
|
void
|
||||||
Editor::instant_save ()
|
Editor::instant_save ()
|
||||||
{
|
{
|
||||||
if (!constructed || !ARDOUR_UI::instance()->session_loaded) {
|
if (!constructed || !ARDOUR_UI::instance()->session_loaded) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1338,7 +1338,7 @@ Editor::connect_to_session (Session *t)
|
||||||
AudioTimeAxisView *atv;
|
AudioTimeAxisView *atv;
|
||||||
|
|
||||||
if ((atv = dynamic_cast<AudioTimeAxisView*>(tv)) != 0) {
|
if ((atv = dynamic_cast<AudioTimeAxisView*>(tv)) != 0) {
|
||||||
if (atv->route().master()) {
|
if (atv->route()->master()) {
|
||||||
route_list_display.get_selection()->unselect (i);
|
route_list_display.get_selection()->unselect (i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2258,7 +2258,7 @@ Editor::get_state ()
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
|
||||||
if (is_realized()) {
|
if (is_realized()) {
|
||||||
Glib::RefPtr<Gdk::Window> win = get_window();
|
Glib::RefPtr<Gdk::Window> win = get_window();
|
||||||
|
|
||||||
int x, y, xoff, yoff, width, height;
|
int x, y, xoff, yoff, width, height;
|
||||||
win->get_root_origin(x, y);
|
win->get_root_origin(x, y);
|
||||||
|
|
@ -2973,7 +2973,7 @@ Editor::get_relevant_audio_tracks (AudioTimeAxisView& base, set<AudioTimeAxisVie
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
RouteGroup* group = atv->route().edit_group();
|
RouteGroup* group = atv->route()->edit_group();
|
||||||
|
|
||||||
if (group && group->is_active()) {
|
if (group && group->is_active()) {
|
||||||
|
|
||||||
|
|
@ -2985,7 +2985,7 @@ Editor::get_relevant_audio_tracks (AudioTimeAxisView& base, set<AudioTimeAxisVie
|
||||||
|
|
||||||
if ((tatv = dynamic_cast<AudioTimeAxisView*> (*i)) != 0) {
|
if ((tatv = dynamic_cast<AudioTimeAxisView*> (*i)) != 0) {
|
||||||
|
|
||||||
if (tatv->route().edit_group() == group) {
|
if (tatv->route()->edit_group() == group) {
|
||||||
relevant_tracks.insert (tatv);
|
relevant_tracks.insert (tatv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -461,7 +461,7 @@ class Editor : public PublicEditor
|
||||||
void add_crossfade_context_items (AudioStreamView*, ARDOUR::Crossfade*, Gtk::Menu_Helpers::MenuList&, bool many);
|
void add_crossfade_context_items (AudioStreamView*, ARDOUR::Crossfade*, Gtk::Menu_Helpers::MenuList&, bool many);
|
||||||
void add_selection_context_items (Gtk::Menu_Helpers::MenuList&);
|
void add_selection_context_items (Gtk::Menu_Helpers::MenuList&);
|
||||||
|
|
||||||
void handle_new_route (ARDOUR::Route*);
|
void handle_new_route (boost::shared_ptr<ARDOUR::Route>);
|
||||||
void remove_route (TimeAxisView *);
|
void remove_route (TimeAxisView *);
|
||||||
bool route_removal;
|
bool route_removal;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -357,6 +357,8 @@ Editor::register_actions ()
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_action (editor_actions, X_("addExternalAudioAsTrack"), _("as Tracks"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportAsTrack));
|
act = ActionManager::register_action (editor_actions, X_("addExternalAudioAsTrack"), _("as Tracks"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportAsTrack));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
act = ActionManager::register_action (editor_actions, X_("addExternalAudioAsTapeTrack"), _("as Tape Tracks"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportAsTapeTrack));
|
||||||
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_action (editor_actions, X_("addExternalAudioToTrack"), _("to Tracks"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportToTrack));
|
act = ActionManager::register_action (editor_actions, X_("addExternalAudioToTrack"), _("to Tracks"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportToTrack));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,7 @@ Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool
|
||||||
idspec += string_compose(":%1", n);
|
idspec += string_compose(":%1", n);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
source = AudioFileSource::create (idspec.c_str());
|
source = AudioFileSource::create (idspec.c_str(), (mode == ImportAsTrack ? AudioFileSource::Destructive : AudioFileSource::Flag (0)));
|
||||||
sources.push_back(source);
|
sources.push_back(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -305,12 +305,14 @@ Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Editor::finish_bringing_in_audio (AudioRegion& region, uint32_t in_chans, uint32_t out_chans, AudioTrack* track, jack_nframes_t& pos, ImportMode mode)
|
Editor::finish_bringing_in_audio (AudioRegion& region, uint32_t in_chans, uint32_t out_chans, AudioTrack* track, jack_nframes_t& pos, ImportMode mode)
|
||||||
{
|
{
|
||||||
switch (mode) {
|
AudioRegion* copy;
|
||||||
case ImportAsRegion:
|
|
||||||
/* relax, its been done */
|
switch (mode) {
|
||||||
break;
|
case ImportAsRegion:
|
||||||
|
/* relax, its been done */
|
||||||
|
break;
|
||||||
|
|
||||||
case ImportToTrack:
|
case ImportToTrack:
|
||||||
if (track) {
|
if (track) {
|
||||||
|
|
@ -328,12 +330,22 @@ int
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ImportAsTrack:
|
case ImportAsTrack:
|
||||||
AudioTrack* at = session->new_audio_track (in_chans, out_chans);
|
{
|
||||||
AudioRegion* copy = new AudioRegion (region);
|
boost::shared_ptr<AudioTrack> at (session->new_audio_track (in_chans, out_chans, Normal));
|
||||||
|
copy = new AudioRegion (region);
|
||||||
at->diskstream().playlist()->add_region (*copy, pos);
|
at->diskstream().playlist()->add_region (*copy, pos);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case ImportAsTapeTrack:
|
||||||
|
{
|
||||||
|
boost::shared_ptr<AudioTrack> at (session->new_audio_track (in_chans, out_chans, Destructive));
|
||||||
|
copy = new AudioRegion (region);
|
||||||
|
at->diskstream().playlist()->add_region (*copy, pos);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,8 +142,8 @@ Editor::bounce_region_selection ()
|
||||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||||
|
|
||||||
Region& region ((*i)->region());
|
Region& region ((*i)->region());
|
||||||
RouteTimeAxisView* atv = dynamic_cast<RouteTimeAxisView*>(&(*i)->get_time_axis_view());
|
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&(*i)->get_time_axis_view());
|
||||||
Track* track = dynamic_cast<Track*>(&(atv->route()));
|
Track* track = dynamic_cast<Track*>(rtv->route().get());
|
||||||
|
|
||||||
InterThreadInfo itt;
|
InterThreadInfo itt;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
|
||||||
|
|
||||||
/* might be nothing to do */
|
/* might be nothing to do */
|
||||||
|
|
||||||
if (¤t_mixer_strip->route() == &at->route()) {
|
if (current_mixer_strip->route() == at->route()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,7 +221,7 @@ Editor::current_mixer_strip_hidden ()
|
||||||
AudioTimeAxisView* tmp;
|
AudioTimeAxisView* tmp;
|
||||||
|
|
||||||
if ((tmp = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) {
|
if ((tmp = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) {
|
||||||
if (&(tmp->route()) == &(current_mixer_strip->route())) {
|
if (tmp->route() == current_mixer_strip->route()) {
|
||||||
(*i)->set_selected (false);
|
(*i)->set_selected (false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@
|
||||||
#include "gui_thread.h"
|
#include "gui_thread.h"
|
||||||
|
|
||||||
#include <ardour/route.h>
|
#include <ardour/route.h>
|
||||||
//#include <ardour/audio_track.h>
|
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
|
|
@ -40,11 +39,12 @@ using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::handle_new_route (Route* route)
|
Editor::handle_new_route (boost::shared_ptr<Route> route)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::handle_new_route), route));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::handle_new_route), route));
|
||||||
|
|
||||||
TimeAxisView *tv;
|
TimeAxisView *tv;
|
||||||
TreeModel::Row parent;
|
TreeModel::Row parent;
|
||||||
TreeModel::Row row;
|
TreeModel::Row row;
|
||||||
|
|
@ -58,9 +58,9 @@ Editor::handle_new_route (Route* route)
|
||||||
assert(type == Buffer::AUDIO || type == Buffer::MIDI);
|
assert(type == Buffer::AUDIO || type == Buffer::MIDI);
|
||||||
|
|
||||||
if (type == Buffer::AUDIO)
|
if (type == Buffer::AUDIO)
|
||||||
tv = new AudioTimeAxisView (*this, *session, *route, track_canvas);
|
tv = new AudioTimeAxisView (*this, *session, route, track_canvas);
|
||||||
else
|
else
|
||||||
tv = new MidiTimeAxisView (*this, *session, *route, track_canvas);
|
tv = new MidiTimeAxisView (*this, *session, route, track_canvas);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (route_display_model->children().size() == 0) {
|
if (route_display_model->children().size() == 0) {
|
||||||
|
|
@ -78,7 +78,7 @@ Editor::handle_new_route (Route* route)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dynamic_cast<AudioTrack*>(&route) != 0) {
|
if (dynamic_cast<AudioTrack*>(route.get()) != 0) {
|
||||||
TreeModel::iterator iter = route_display_model->get_iter ("1"); // audio tracks
|
TreeModel::iterator iter = route_display_model->get_iter ("1"); // audio tracks
|
||||||
parent = *iter;
|
parent = *iter;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -103,8 +103,8 @@ Editor::handle_new_route (Route* route)
|
||||||
RouteTimeAxisView* rtv = NULL;
|
RouteTimeAxisView* rtv = NULL;
|
||||||
if ((rtv = dynamic_cast<RouteTimeAxisView*> (tv)) != 0) {
|
if ((rtv = dynamic_cast<RouteTimeAxisView*> (tv)) != 0) {
|
||||||
/* added a new fresh one at the end */
|
/* added a new fresh one at the end */
|
||||||
if (rtv->route().order_key(N_("editor")) == -1) {
|
if (rtv->route()->order_key(N_("editor")) == -1) {
|
||||||
rtv->route().set_order_key (N_("editor"), route_display_model->children().size()-1);
|
rtv->route()->set_order_key (N_("editor"), route_display_model->children().size()-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -192,7 +192,7 @@ Editor::hide_track_in_display (TimeAxisView& tv)
|
||||||
|
|
||||||
AudioTimeAxisView* atv = dynamic_cast<AudioTimeAxisView*> (&tv);
|
AudioTimeAxisView* atv = dynamic_cast<AudioTimeAxisView*> (&tv);
|
||||||
|
|
||||||
if (atv && current_mixer_strip && &(atv->route()) == &(current_mixer_strip->route())) {
|
if (atv && current_mixer_strip && (atv->route() == current_mixer_strip->route())) {
|
||||||
// this will hide the mixer strip
|
// this will hide the mixer strip
|
||||||
set_selected_mixer_strip (tv);
|
set_selected_mixer_strip (tv);
|
||||||
}
|
}
|
||||||
|
|
@ -248,7 +248,7 @@ Editor::redisplay_route_list ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((at = dynamic_cast<AudioTimeAxisView*> (tv)) != 0) {
|
if ((at = dynamic_cast<AudioTimeAxisView*> (tv)) != 0) {
|
||||||
at->route().set_order_key (N_("editor"), order);
|
at->route()->set_order_key (N_("editor"), order);
|
||||||
++order;
|
++order;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -481,7 +481,7 @@ Editor::route_list_selection_filter (const Glib::RefPtr<TreeModel>& model, const
|
||||||
}
|
}
|
||||||
|
|
||||||
struct EditorOrderRouteSorter {
|
struct EditorOrderRouteSorter {
|
||||||
bool operator() (Route* a, Route* b) {
|
bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) {
|
||||||
/* use of ">" forces the correct sort order */
|
/* use of ">" forces the correct sort order */
|
||||||
return a->order_key ("editor") < b->order_key ("editor");
|
return a->order_key ("editor") < b->order_key ("editor");
|
||||||
}
|
}
|
||||||
|
|
@ -490,16 +490,17 @@ struct EditorOrderRouteSorter {
|
||||||
void
|
void
|
||||||
Editor::initial_route_list_display ()
|
Editor::initial_route_list_display ()
|
||||||
{
|
{
|
||||||
Session::RouteList routes = session->get_routes();
|
boost::shared_ptr<Session::RouteList> routes = session->get_routes();
|
||||||
|
Session::RouteList r (*routes);
|
||||||
EditorOrderRouteSorter sorter;
|
EditorOrderRouteSorter sorter;
|
||||||
|
|
||||||
routes.sort (sorter);
|
r.sort (sorter);
|
||||||
|
|
||||||
no_route_list_redisplay = true;
|
no_route_list_redisplay = true;
|
||||||
|
|
||||||
route_display_model->clear ();
|
route_display_model->clear ();
|
||||||
|
|
||||||
for (Session::RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
|
for (Session::RouteList::iterator i = r.begin(); i != r.end(); ++i) {
|
||||||
handle_new_route (*i);
|
handle_new_route (*i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ Editor::do_timestretch (TimeStretchDialog& dialog)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((t = dynamic_cast<Track*> (&rtv->route())) == 0) {
|
if ((t = dynamic_cast<Track*> (rtv->route().get())) == 0) {
|
||||||
i = tmp;
|
i = tmp;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1082,11 +1082,11 @@ ExportDialog::fill_lists ()
|
||||||
track_list->clear();
|
track_list->clear();
|
||||||
master_list->clear();
|
master_list->clear();
|
||||||
|
|
||||||
Session::RouteList routes = session->get_routes ();
|
boost::shared_ptr<Session::RouteList> routes = session->get_routes ();
|
||||||
|
|
||||||
for (Session::RouteList::iterator ri = routes.begin(); ri != routes.end(); ++ri) {
|
for (Session::RouteList::iterator ri = routes->begin(); ri != routes->end(); ++ri) {
|
||||||
|
|
||||||
Route* route = (*ri);
|
boost::shared_ptr<Route> route = (*ri);
|
||||||
|
|
||||||
if (route->hidden()) {
|
if (route->hidden()) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,9 @@ using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
|
||||||
GainAutomationTimeAxisView::GainAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, ArdourCanvas::Canvas& canvas, const string & n, ARDOUR::Curve& c)
|
GainAutomationTimeAxisView::GainAutomationTimeAxisView (Session& s, boost::shared_ptr<Route> r,
|
||||||
|
PublicEditor& e, TimeAxisView& parent,
|
||||||
|
ArdourCanvas::Canvas& canvas, const string & n, ARDOUR::Curve& c)
|
||||||
|
|
||||||
: AxisView (s),
|
: AxisView (s),
|
||||||
AutomationTimeAxisView (s, r, e, parent, canvas, n, X_("gain"), ""),
|
AutomationTimeAxisView (s, r, e, parent, canvas, n, X_("gain"), ""),
|
||||||
|
|
@ -72,6 +74,6 @@ void
|
||||||
GainAutomationTimeAxisView::set_automation_state (AutoState state)
|
GainAutomationTimeAxisView::set_automation_state (AutoState state)
|
||||||
{
|
{
|
||||||
if (!ignore_state_request) {
|
if (!ignore_state_request) {
|
||||||
route.set_gain_automation_state (state);
|
route->set_gain_automation_state (state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class GainAutomationTimeAxisView : public AutomationTimeAxisView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GainAutomationTimeAxisView (ARDOUR::Session&,
|
GainAutomationTimeAxisView (ARDOUR::Session&,
|
||||||
ARDOUR::Route&,
|
boost::shared_ptr<ARDOUR::Route>,
|
||||||
PublicEditor&,
|
PublicEditor&,
|
||||||
TimeAxisView& parent_axis,
|
TimeAxisView& parent_axis,
|
||||||
ArdourCanvas::Canvas& canvas,
|
ArdourCanvas::Canvas& canvas,
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ GainMeter::setup_slider_pix ()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GainMeter::GainMeter (IO& io, Session& s)
|
GainMeter::GainMeter (boost::shared_ptr<IO> io, Session& s)
|
||||||
: _io (io),
|
: _io (io),
|
||||||
_session (s),
|
_session (s),
|
||||||
gain_slider (0),
|
gain_slider (0),
|
||||||
|
|
@ -99,7 +99,7 @@ GainMeter::GainMeter (IO& io, Session& s)
|
||||||
|
|
||||||
gain_slider = manage (new VSliderController (slider, rail,
|
gain_slider = manage (new VSliderController (slider, rail,
|
||||||
&gain_adjustment,
|
&gain_adjustment,
|
||||||
_io.gain_control(),
|
_io->gain_control(),
|
||||||
false));
|
false));
|
||||||
|
|
||||||
gain_slider->signal_button_press_event().connect (mem_fun(*this, &GainMeter::start_gain_touch));
|
gain_slider->signal_button_press_event().connect (mem_fun(*this, &GainMeter::start_gain_touch));
|
||||||
|
|
@ -152,7 +152,7 @@ GainMeter::GainMeter (IO& io, Session& s)
|
||||||
|
|
||||||
Route* r;
|
Route* r;
|
||||||
|
|
||||||
if ((r = dynamic_cast<Route*> (&_io)) != 0) {
|
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||||
/*
|
/*
|
||||||
if we don't have a route (if we're the click),
|
if we don't have a route (if we're the click),
|
||||||
pack some route-dependent stuff.
|
pack some route-dependent stuff.
|
||||||
|
|
@ -165,13 +165,13 @@ GainMeter::GainMeter (IO& io, Session& s)
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
gain_astate_menu.items().push_back (MenuElem (_("Off"),
|
gain_astate_menu.items().push_back (MenuElem (_("Off"),
|
||||||
bind (mem_fun (&_io, &IO::set_gain_automation_state), (AutoState) Off)));
|
bind (mem_fun (*_io, &IO::set_gain_automation_state), (AutoState) Off)));
|
||||||
gain_astate_menu.items().push_back (MenuElem (_("Play"),
|
gain_astate_menu.items().push_back (MenuElem (_("Play"),
|
||||||
bind (mem_fun (&_io, &IO::set_gain_automation_state), (AutoState) Play)));
|
bind (mem_fun (*_io, &IO::set_gain_automation_state), (AutoState) Play)));
|
||||||
gain_astate_menu.items().push_back (MenuElem (_("Write"),
|
gain_astate_menu.items().push_back (MenuElem (_("Write"),
|
||||||
bind (mem_fun (&_io, &IO::set_gain_automation_state), (AutoState) Write)));
|
bind (mem_fun (*_io, &IO::set_gain_automation_state), (AutoState) Write)));
|
||||||
gain_astate_menu.items().push_back (MenuElem (_("Touch"),
|
gain_astate_menu.items().push_back (MenuElem (_("Touch"),
|
||||||
bind (mem_fun (&_io, &IO::set_gain_automation_state), (AutoState) Touch)));
|
bind (mem_fun (*_io, &IO::set_gain_automation_state), (AutoState) Touch)));
|
||||||
|
|
||||||
gain_astyle_menu.items().push_back (MenuElem (_("Trim")));
|
gain_astyle_menu.items().push_back (MenuElem (_("Trim")));
|
||||||
gain_astyle_menu.items().push_back (MenuElem (_("Abs")));
|
gain_astyle_menu.items().push_back (MenuElem (_("Abs")));
|
||||||
|
|
@ -195,7 +195,7 @@ GainMeter::GainMeter (IO& io, Session& s)
|
||||||
pack_start (gain_display_box, Gtk::PACK_SHRINK);
|
pack_start (gain_display_box, Gtk::PACK_SHRINK);
|
||||||
pack_start (hbox, Gtk::PACK_SHRINK);
|
pack_start (hbox, Gtk::PACK_SHRINK);
|
||||||
|
|
||||||
_io.gain_changed.connect (mem_fun(*this, &GainMeter::gain_changed));
|
_io->gain_changed.connect (mem_fun(*this, &GainMeter::gain_changed));
|
||||||
|
|
||||||
meter_metric_area.signal_expose_event().connect (mem_fun(*this, &GainMeter::meter_metrics_expose));
|
meter_metric_area.signal_expose_event().connect (mem_fun(*this, &GainMeter::meter_metrics_expose));
|
||||||
gain_adjustment.signal_value_changed().connect (mem_fun(*this, &GainMeter::gain_adjusted));
|
gain_adjustment.signal_value_changed().connect (mem_fun(*this, &GainMeter::gain_adjusted));
|
||||||
|
|
@ -323,7 +323,7 @@ GainMeter::update_meters ()
|
||||||
|
|
||||||
for (n = 0, i = meters.begin(); i != meters.end(); ++i, ++n) {
|
for (n = 0, i = meters.begin(); i != meters.end(); ++i, ++n) {
|
||||||
if ((*i).packed) {
|
if ((*i).packed) {
|
||||||
peak = _io.peak_input_power (n);
|
peak = _io->peak_input_power (n);
|
||||||
|
|
||||||
(*i).meter->set (log_meter (peak), peak);
|
(*i).meter->set (log_meter (peak), peak);
|
||||||
|
|
||||||
|
|
@ -382,14 +382,14 @@ GainMeter::hide_all_meters ()
|
||||||
void
|
void
|
||||||
GainMeter::setup_meters ()
|
GainMeter::setup_meters ()
|
||||||
{
|
{
|
||||||
uint32_t nmeters = _io.n_outputs();
|
uint32_t nmeters = _io->n_outputs();
|
||||||
guint16 width;
|
guint16 width;
|
||||||
|
|
||||||
hide_all_meters ();
|
hide_all_meters ();
|
||||||
|
|
||||||
Route* r;
|
Route* r;
|
||||||
|
|
||||||
if ((r = dynamic_cast<Route*> (&_io)) != 0) {
|
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||||
|
|
||||||
switch (r->meter_point()) {
|
switch (r->meter_point()) {
|
||||||
case MeterPreFader:
|
case MeterPreFader:
|
||||||
|
|
@ -403,7 +403,7 @@ GainMeter::setup_meters ()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
nmeters = _io.n_outputs();
|
nmeters = _io->n_outputs();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -451,7 +451,7 @@ GainMeter::peak_button_release (GdkEventButton* ev)
|
||||||
ResetAllPeakDisplays ();
|
ResetAllPeakDisplays ();
|
||||||
} else if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
} else if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||||
Route* r;
|
Route* r;
|
||||||
if ((r = dynamic_cast<Route*> (&_io)) != 0) {
|
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||||
ResetGroupPeakDisplays (r->mix_group());
|
ResetGroupPeakDisplays (r->mix_group());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -472,7 +472,7 @@ void
|
||||||
GainMeter::reset_group_peak_display (RouteGroup* group)
|
GainMeter::reset_group_peak_display (RouteGroup* group)
|
||||||
{
|
{
|
||||||
Route* r;
|
Route* r;
|
||||||
if ((r = dynamic_cast<Route*> (&_io)) != 0) {
|
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||||
if (group == r->mix_group()) {
|
if (group == r->mix_group()) {
|
||||||
reset_peak_display ();
|
reset_peak_display ();
|
||||||
}
|
}
|
||||||
|
|
@ -541,14 +541,14 @@ void
|
||||||
GainMeter::gain_adjusted ()
|
GainMeter::gain_adjusted ()
|
||||||
{
|
{
|
||||||
if (!ignore_toggle) {
|
if (!ignore_toggle) {
|
||||||
_io.set_gain (slider_position_to_gain (gain_adjustment.get_value()), this);
|
_io->set_gain (slider_position_to_gain (gain_adjustment.get_value()), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GainMeter::effective_gain_display ()
|
GainMeter::effective_gain_display ()
|
||||||
{
|
{
|
||||||
gfloat value = gain_to_slider_position (_io.effective_gain());
|
gfloat value = gain_to_slider_position (_io->effective_gain());
|
||||||
|
|
||||||
if (gain_adjustment.get_value() != value) {
|
if (gain_adjustment.get_value() != value) {
|
||||||
ignore_toggle = true;
|
ignore_toggle = true;
|
||||||
|
|
@ -578,7 +578,7 @@ GainMeter::set_fader_name (const char * name)
|
||||||
void
|
void
|
||||||
GainMeter::update_gain_sensitive ()
|
GainMeter::update_gain_sensitive ()
|
||||||
{
|
{
|
||||||
static_cast<Gtkmm2ext::SliderController*>(gain_slider)->set_sensitive (!(_io.gain_automation_state() & Play));
|
static_cast<Gtkmm2ext::SliderController*>(gain_slider)->set_sensitive (!(_io->gain_automation_state() & Play));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -609,7 +609,7 @@ GainMeter::meter_press(GdkEventButton* ev)
|
||||||
|
|
||||||
wait_for_release = false;
|
wait_for_release = false;
|
||||||
|
|
||||||
if ((_route = dynamic_cast<Route*>(&_io)) == 0) {
|
if ((_route = dynamic_cast<Route*>(_io.get())) == 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -671,7 +671,7 @@ GainMeter::meter_release(GdkEventButton* ev)
|
||||||
if(!ignore_toggle){
|
if(!ignore_toggle){
|
||||||
if (wait_for_release){
|
if (wait_for_release){
|
||||||
wait_for_release = false;
|
wait_for_release = false;
|
||||||
set_meter_point (*(dynamic_cast<Route*>(&_io)), old_meter_point);
|
set_meter_point (*(dynamic_cast<Route*>(_io.get())), old_meter_point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -700,7 +700,7 @@ GainMeter::meter_point_clicked ()
|
||||||
{
|
{
|
||||||
Route* r;
|
Route* r;
|
||||||
|
|
||||||
if ((r = dynamic_cast<Route*> (&_io)) != 0) {
|
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -708,14 +708,14 @@ GainMeter::meter_point_clicked ()
|
||||||
gint
|
gint
|
||||||
GainMeter::start_gain_touch (GdkEventButton* ev)
|
GainMeter::start_gain_touch (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
_io.start_gain_touch ();
|
_io->start_gain_touch ();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
GainMeter::end_gain_touch (GdkEventButton* ev)
|
GainMeter::end_gain_touch (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
_io.end_gain_touch ();
|
_io->end_gain_touch ();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -819,10 +819,10 @@ GainMeter::gain_automation_style_changed ()
|
||||||
// Route* _route = dynamic_cast<Route*>(&_io);
|
// Route* _route = dynamic_cast<Route*>(&_io);
|
||||||
switch (_width) {
|
switch (_width) {
|
||||||
case Wide:
|
case Wide:
|
||||||
gain_automation_style_button.set_label (astyle_string(_io.gain_automation_curve().automation_style()));
|
gain_automation_style_button.set_label (astyle_string(_io->gain_automation_curve().automation_style()));
|
||||||
break;
|
break;
|
||||||
case Narrow:
|
case Narrow:
|
||||||
gain_automation_style_button.set_label (short_astyle_string(_io.gain_automation_curve().automation_style()));
|
gain_automation_style_button.set_label (short_astyle_string(_io->gain_automation_curve().automation_style()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -837,14 +837,14 @@ GainMeter::gain_automation_state_changed ()
|
||||||
|
|
||||||
switch (_width) {
|
switch (_width) {
|
||||||
case Wide:
|
case Wide:
|
||||||
gain_automation_state_button.set_label (astate_string(_io.gain_automation_curve().automation_state()));
|
gain_automation_state_button.set_label (astate_string(_io->gain_automation_curve().automation_state()));
|
||||||
break;
|
break;
|
||||||
case Narrow:
|
case Narrow:
|
||||||
gain_automation_state_button.set_label (short_astate_string(_io.gain_automation_curve().automation_state()));
|
gain_automation_state_button.set_label (short_astate_string(_io->gain_automation_curve().automation_state()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
x = (_io.gain_automation_state() != Off);
|
x = (_io->gain_automation_state() != Off);
|
||||||
|
|
||||||
if (gain_automation_state_button.get_active() != x) {
|
if (gain_automation_state_button.get_active() != x) {
|
||||||
ignore_toggle = true;
|
ignore_toggle = true;
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ namespace Gtk {
|
||||||
class GainMeter : public Gtk::VBox
|
class GainMeter : public Gtk::VBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GainMeter (ARDOUR::IO&, ARDOUR::Session&);
|
GainMeter (boost::shared_ptr<ARDOUR::IO>, ARDOUR::Session&);
|
||||||
~GainMeter ();
|
~GainMeter ();
|
||||||
|
|
||||||
void update_gain_sensitive ();
|
void update_gain_sensitive ();
|
||||||
|
|
@ -75,7 +75,7 @@ class GainMeter : public Gtk::VBox
|
||||||
private:
|
private:
|
||||||
|
|
||||||
friend class MixerStrip;
|
friend class MixerStrip;
|
||||||
ARDOUR::IO& _io;
|
boost::shared_ptr<ARDOUR::IO> _io;
|
||||||
ARDOUR::Session& _session;
|
ARDOUR::Session& _session;
|
||||||
|
|
||||||
bool ignore_toggle;
|
bool ignore_toggle;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using namespace Gtkmm2ext;
|
using namespace Gtkmm2ext;
|
||||||
|
|
||||||
IOSelectorWindow::IOSelectorWindow (Session& sess, IO& ior, bool input, bool can_cancel)
|
IOSelectorWindow::IOSelectorWindow (Session& sess, boost::shared_ptr<IO> ior, bool input, bool can_cancel)
|
||||||
: ArdourDialog ("i/o selector"),
|
: ArdourDialog ("i/o selector"),
|
||||||
_selector (sess, ior, input),
|
_selector (sess, ior, input),
|
||||||
ok_button (can_cancel ? _("OK"): _("Close")),
|
ok_button (can_cancel ? _("OK"): _("Close")),
|
||||||
|
|
@ -65,9 +65,9 @@ IOSelectorWindow::IOSelectorWindow (Session& sess, IO& ior, bool input, bool can
|
||||||
|
|
||||||
string title;
|
string title;
|
||||||
if (input) {
|
if (input) {
|
||||||
title = string_compose(_("%1 input"), ior.name());
|
title = string_compose(_("%1 input"), ior->name());
|
||||||
} else {
|
} else {
|
||||||
title = string_compose(_("%1 output"), ior.name());
|
title = string_compose(_("%1 output"), ior->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
ok_button.set_name ("IOSelectorButton");
|
ok_button.set_name ("IOSelectorButton");
|
||||||
|
|
@ -135,7 +135,7 @@ IOSelectorWindow::on_map ()
|
||||||
The IO Selector "widget"
|
The IO Selector "widget"
|
||||||
*************************/
|
*************************/
|
||||||
|
|
||||||
IOSelector::IOSelector (Session& sess, IO& ior, bool input)
|
IOSelector::IOSelector (Session& sess, boost::shared_ptr<IO> ior, bool input)
|
||||||
: session (sess),
|
: session (sess),
|
||||||
io (ior),
|
io (ior),
|
||||||
for_input (input),
|
for_input (input),
|
||||||
|
|
@ -184,14 +184,14 @@ IOSelector::IOSelector (Session& sess, IO& ior, bool input)
|
||||||
port_button_box.pack_start (add_port_button, false, false);
|
port_button_box.pack_start (add_port_button, false, false);
|
||||||
|
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
if (io.input_maximum() < 0 || io.input_maximum() > (int) io.n_inputs()) {
|
if (io->input_maximum() < 0 || io->input_maximum() > (int) io->n_inputs()) {
|
||||||
add_port_button.set_sensitive (true);
|
add_port_button.set_sensitive (true);
|
||||||
} else {
|
} else {
|
||||||
add_port_button.set_sensitive (false);
|
add_port_button.set_sensitive (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (io.output_maximum() < 0 || io.output_maximum() > (int) io.n_outputs()) {
|
if (io->output_maximum() < 0 || io->output_maximum() > (int) io->n_outputs()) {
|
||||||
add_port_button.set_sensitive (true);
|
add_port_button.set_sensitive (true);
|
||||||
} else {
|
} else {
|
||||||
add_port_button.set_sensitive (false);
|
add_port_button.set_sensitive (false);
|
||||||
|
|
@ -202,14 +202,14 @@ IOSelector::IOSelector (Session& sess, IO& ior, bool input)
|
||||||
port_button_box.pack_start (remove_port_button, false, false);
|
port_button_box.pack_start (remove_port_button, false, false);
|
||||||
|
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
if (io.input_minimum() < 0 || io.input_minimum() < (int) io.n_inputs()) {
|
if (io->input_minimum() < 0 || io->input_minimum() < (int) io->n_inputs()) {
|
||||||
remove_port_button.set_sensitive (true);
|
remove_port_button.set_sensitive (true);
|
||||||
} else {
|
} else {
|
||||||
remove_port_button.set_sensitive (false);
|
remove_port_button.set_sensitive (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (io.output_minimum() < 0 || io.output_minimum() < (int) io.n_outputs()) {
|
if (io->output_minimum() < 0 || io->output_minimum() < (int) io->n_outputs()) {
|
||||||
remove_port_button.set_sensitive (true);
|
remove_port_button.set_sensitive (true);
|
||||||
} else {
|
} else {
|
||||||
remove_port_button.set_sensitive (false);
|
remove_port_button.set_sensitive (false);
|
||||||
|
|
@ -241,12 +241,12 @@ IOSelector::IOSelector (Session& sess, IO& ior, bool input)
|
||||||
remove_port_button.signal_clicked().connect (mem_fun(*this, &IOSelector::remove_port));
|
remove_port_button.signal_clicked().connect (mem_fun(*this, &IOSelector::remove_port));
|
||||||
|
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
io.input_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
io->input_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
||||||
} else {
|
} else {
|
||||||
io.output_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
io->output_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
||||||
}
|
}
|
||||||
|
|
||||||
io.name_changed.connect (mem_fun(*this, &IOSelector::name_changed));
|
io->name_changed.connect (mem_fun(*this, &IOSelector::name_changed));
|
||||||
}
|
}
|
||||||
|
|
||||||
IOSelector::~IOSelector ()
|
IOSelector::~IOSelector ()
|
||||||
|
|
@ -265,9 +265,9 @@ void
|
||||||
IOSelector::clear_connections ()
|
IOSelector::clear_connections ()
|
||||||
{
|
{
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
io.disconnect_inputs (this);
|
io->disconnect_inputs (this);
|
||||||
} else {
|
} else {
|
||||||
io.disconnect_outputs (this);
|
io->disconnect_outputs (this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -374,9 +374,9 @@ IOSelector::display_ports ()
|
||||||
uint32_t limit;
|
uint32_t limit;
|
||||||
|
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
limit = io.n_inputs();
|
limit = io->n_inputs();
|
||||||
} else {
|
} else {
|
||||||
limit = io.n_outputs();
|
limit = io->n_outputs();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ) {
|
for (slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ) {
|
||||||
|
|
@ -401,9 +401,9 @@ IOSelector::display_ports ()
|
||||||
string really_short_name;
|
string really_short_name;
|
||||||
|
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
port = io.input (n);
|
port = io->input (n);
|
||||||
} else {
|
} else {
|
||||||
port = io.output (n);
|
port = io->output (n);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we know there is '/' because we put it there */
|
/* we know there is '/' because we put it there */
|
||||||
|
|
@ -443,7 +443,7 @@ IOSelector::display_ports ()
|
||||||
|
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
|
|
||||||
if (io.input_maximum() == 1) {
|
if (io->input_maximum() == 1) {
|
||||||
selected_port = port;
|
selected_port = port;
|
||||||
selected_port_tview = tview;
|
selected_port_tview = tview;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -454,7 +454,7 @@ IOSelector::display_ports ()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (io.output_maximum() == 1) {
|
if (io->output_maximum() == 1) {
|
||||||
selected_port = port;
|
selected_port = port;
|
||||||
selected_port_tview = tview;
|
selected_port_tview = tview;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -516,12 +516,12 @@ IOSelector::port_selection_changed (GdkEventButton *ev, TreeView* treeview)
|
||||||
ustring other_port_name = (*i)[port_display_columns.full_name];
|
ustring other_port_name = (*i)[port_display_columns.full_name];
|
||||||
|
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
if ((status = io.connect_input (selected_port, other_port_name, this)) == 0) {
|
if ((status = io->connect_input (selected_port, other_port_name, this)) == 0) {
|
||||||
Port *p = session.engine().get_port_by_name (other_port_name);
|
Port *p = session.engine().get_port_by_name (other_port_name);
|
||||||
p->enable_metering();
|
p->enable_metering();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
status = io.connect_output (selected_port, other_port_name, this);
|
status = io->connect_output (selected_port, other_port_name, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
|
|
@ -548,7 +548,7 @@ IOSelector::add_port ()
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
io.add_input_port ("", this);
|
io->add_input_port ("", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (AudioEngine::PortRegistrationFailure& err) {
|
catch (AudioEngine::PortRegistrationFailure& err) {
|
||||||
|
|
@ -556,18 +556,18 @@ IOSelector::add_port ()
|
||||||
msg.run ();
|
msg.run ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (io.input_maximum() >= 0 && io.input_maximum() <= (int) io.n_inputs()) {
|
if (io->input_maximum() >= 0 && io->input_maximum() <= (int) io->n_inputs()) {
|
||||||
add_port_button.set_sensitive (false);
|
add_port_button.set_sensitive (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (io.input_minimum() < (int) io.n_inputs()) {
|
if (io->input_minimum() < (int) io->n_inputs()) {
|
||||||
remove_port_button.set_sensitive (true);
|
remove_port_button.set_sensitive (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
io.add_output_port ("", this);
|
io->add_output_port ("", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (AudioEngine::PortRegistrationFailure& err) {
|
catch (AudioEngine::PortRegistrationFailure& err) {
|
||||||
|
|
@ -575,7 +575,7 @@ IOSelector::add_port ()
|
||||||
msg.run ();
|
msg.run ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (io.output_maximum() >= 0 && io.output_maximum() <= (int) io.n_outputs()) {
|
if (io->output_maximum() >= 0 && io->output_maximum() <= (int) io->n_outputs()) {
|
||||||
add_port_button.set_sensitive (false);
|
add_port_button.set_sensitive (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -589,15 +589,15 @@ IOSelector::remove_port ()
|
||||||
// always remove last port
|
// always remove last port
|
||||||
|
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
if ((nports = io.n_inputs()) > 0) {
|
if ((nports = io->n_inputs()) > 0) {
|
||||||
io.remove_input_port (io.input(nports-1), this);
|
io->remove_input_port (io->input(nports-1), this);
|
||||||
}
|
}
|
||||||
if (io.input_minimum() == (int) io.n_inputs()) {
|
if (io->input_minimum() == (int) io->n_inputs()) {
|
||||||
remove_port_button.set_sensitive (false);
|
remove_port_button.set_sensitive (false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((nports = io.n_outputs()) > 0) {
|
if ((nports = io->n_outputs()) > 0) {
|
||||||
io.remove_output_port (io.output(nports-1), this);
|
io->remove_output_port (io->output(nports-1), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -606,9 +606,9 @@ gint
|
||||||
IOSelector::remove_port_when_idle (Port *port)
|
IOSelector::remove_port_when_idle (Port *port)
|
||||||
{
|
{
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
io.remove_input_port (port, this);
|
io->remove_input_port (port, this);
|
||||||
} else {
|
} else {
|
||||||
io.remove_output_port (port, this);
|
io->remove_output_port (port, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
@ -651,9 +651,9 @@ IOSelector::connection_button_release (GdkEventButton *ev, TreeView *treeview)
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
Port *p = session.engine().get_port_by_name (connected_port_name);
|
Port *p = session.engine().get_port_by_name (connected_port_name);
|
||||||
p->disable_metering();
|
p->disable_metering();
|
||||||
io.disconnect_input (port, connected_port_name, this);
|
io->disconnect_input (port, connected_port_name, this);
|
||||||
} else {
|
} else {
|
||||||
io.disconnect_output (port, connected_port_name, this);
|
io->disconnect_output (port, connected_port_name, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -749,17 +749,17 @@ IOSelector::redisplay ()
|
||||||
display_ports ();
|
display_ports ();
|
||||||
|
|
||||||
if (for_input) {
|
if (for_input) {
|
||||||
if (io.input_maximum() != 0) {
|
if (io->input_maximum() != 0) {
|
||||||
rescan ();
|
rescan ();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (io.output_maximum() != 0) {
|
if (io->output_maximum() != 0) {
|
||||||
rescan();
|
rescan();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PortInsertUI::PortInsertUI (Session& sess, PortInsert& pi)
|
PortInsertUI::PortInsertUI (Session& sess, boost::shared_ptr<PortInsert> pi)
|
||||||
: input_selector (sess, pi, true),
|
: input_selector (sess, pi, true),
|
||||||
output_selector (sess, pi, false)
|
output_selector (sess, pi, false)
|
||||||
{
|
{
|
||||||
|
|
@ -786,9 +786,9 @@ PortInsertUI::finished(IOSelector::Result r)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PortInsertWindow::PortInsertWindow (Session& sess, PortInsert& pi, bool can_cancel)
|
PortInsertWindow::PortInsertWindow (Session& sess, boost::shared_ptr<PortInsert> pi, bool can_cancel)
|
||||||
: ArdourDialog ("port insert dialog"),
|
: ArdourDialog ("port insert dialog"),
|
||||||
_portinsertui(sess, pi),
|
_portinsertui (sess, pi),
|
||||||
ok_button (can_cancel ? _("OK"): _("Close")),
|
ok_button (can_cancel ? _("OK"): _("Close")),
|
||||||
cancel_button (_("Cancel")),
|
cancel_button (_("Cancel")),
|
||||||
rescan_button (_("Rescan"))
|
rescan_button (_("Rescan"))
|
||||||
|
|
@ -796,7 +796,7 @@ PortInsertWindow::PortInsertWindow (Session& sess, PortInsert& pi, bool can_canc
|
||||||
|
|
||||||
set_name ("IOSelectorWindow");
|
set_name ("IOSelectorWindow");
|
||||||
string title = _("ardour: ");
|
string title = _("ardour: ");
|
||||||
title += pi.name();
|
title += pi->name();
|
||||||
set_title (title);
|
set_title (title);
|
||||||
|
|
||||||
ok_button.set_name ("IOSelectorButton");
|
ok_button.set_name ("IOSelectorButton");
|
||||||
|
|
@ -823,7 +823,7 @@ PortInsertWindow::PortInsertWindow (Session& sess, PortInsert& pi, bool can_canc
|
||||||
rescan_button.signal_clicked().connect (mem_fun(*this, &PortInsertWindow::rescan));
|
rescan_button.signal_clicked().connect (mem_fun(*this, &PortInsertWindow::rescan));
|
||||||
|
|
||||||
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
||||||
pi.GoingAway.connect (mem_fun(*this, &PortInsertWindow::plugin_going_away));
|
pi->GoingAway.connect (mem_fun(*this, &PortInsertWindow::plugin_going_away));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ namespace ARDOUR {
|
||||||
|
|
||||||
class IOSelector : public Gtk::VBox {
|
class IOSelector : public Gtk::VBox {
|
||||||
public:
|
public:
|
||||||
IOSelector (ARDOUR::Session&, ARDOUR::IO&, bool for_input);
|
IOSelector (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool for_input);
|
||||||
~IOSelector ();
|
~IOSelector ();
|
||||||
|
|
||||||
void redisplay ();
|
void redisplay ();
|
||||||
|
|
@ -67,9 +67,9 @@ class IOSelector : public Gtk::VBox {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ARDOUR::Session& session;
|
ARDOUR::Session& session;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ARDOUR::IO& io;
|
boost::shared_ptr<ARDOUR::IO> io;
|
||||||
bool for_input;
|
bool for_input;
|
||||||
ARDOUR::Port *selected_port;
|
ARDOUR::Port *selected_port;
|
||||||
|
|
||||||
|
|
@ -135,7 +135,7 @@ class IOSelector : public Gtk::VBox {
|
||||||
class IOSelectorWindow : public ArdourDialog
|
class IOSelectorWindow : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IOSelectorWindow (ARDOUR::Session&, ARDOUR::IO&, bool for_input, bool can_cancel=false);
|
IOSelectorWindow (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool for_input, bool can_cancel=false);
|
||||||
~IOSelectorWindow ();
|
~IOSelectorWindow ();
|
||||||
|
|
||||||
IOSelector& selector() { return _selector; }
|
IOSelector& selector() { return _selector; }
|
||||||
|
|
@ -162,7 +162,7 @@ class IOSelectorWindow : public ArdourDialog
|
||||||
class PortInsertUI : public Gtk::VBox
|
class PortInsertUI : public Gtk::VBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PortInsertUI (ARDOUR::Session&, ARDOUR::PortInsert&);
|
PortInsertUI (ARDOUR::Session&, boost::shared_ptr<ARDOUR::PortInsert>);
|
||||||
|
|
||||||
void redisplay ();
|
void redisplay ();
|
||||||
void finished (IOSelector::Result);
|
void finished (IOSelector::Result);
|
||||||
|
|
@ -178,7 +178,7 @@ class PortInsertUI : public Gtk::VBox
|
||||||
class PortInsertWindow : public ArdourDialog
|
class PortInsertWindow : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PortInsertWindow (ARDOUR::Session&, ARDOUR::PortInsert&, bool can_cancel=false);
|
PortInsertWindow (ARDOUR::Session&, boost::shared_ptr<ARDOUR::PortInsert>, bool can_cancel=false);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void on_map ();
|
void on_map ();
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ using namespace Gtk;
|
||||||
using namespace Editing;
|
using namespace Editing;
|
||||||
|
|
||||||
|
|
||||||
MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, Route& rt, Canvas& canvas)
|
MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, boost::shared_ptr<Route> rt, Canvas& canvas)
|
||||||
: AxisView(sess), // FIXME: won't compile without this, why??
|
: AxisView(sess), // FIXME: won't compile without this, why??
|
||||||
RouteTimeAxisView(ed, sess, rt, canvas)
|
RouteTimeAxisView(ed, sess, rt, canvas)
|
||||||
{
|
{
|
||||||
|
|
@ -236,7 +236,7 @@ MidiTimeAxisView::build_display_menu ()
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active)));
|
items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active)));
|
||||||
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||||
route_active_menu_item->set_active (_route.active());
|
route_active_menu_item->set_active (_route->active());
|
||||||
|
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
|
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
|
||||||
|
|
@ -268,7 +268,7 @@ MidiTimeAxisView::route_active_changed ()
|
||||||
RouteUI::route_active_changed ();
|
RouteUI::route_active_changed ();
|
||||||
|
|
||||||
if (is_midi_track()) {
|
if (is_midi_track()) {
|
||||||
if (_route.active()) {
|
if (_route->active()) {
|
||||||
controls_ebox.set_name ("MidiTrackControlsBaseUnselected");
|
controls_ebox.set_name ("MidiTrackControlsBaseUnselected");
|
||||||
controls_base_selected_name = "MidiTrackControlsBaseSelected";
|
controls_base_selected_name = "MidiTrackControlsBaseSelected";
|
||||||
controls_base_unselected_name = "MidiTrackControlsBaseUnselected";
|
controls_base_unselected_name = "MidiTrackControlsBaseUnselected";
|
||||||
|
|
@ -278,7 +278,7 @@ MidiTimeAxisView::route_active_changed ()
|
||||||
controls_base_unselected_name = "MidiTrackControlsBaseInactiveUnselected";
|
controls_base_unselected_name = "MidiTrackControlsBaseInactiveUnselected";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (_route.active()) {
|
if (_route->active()) {
|
||||||
controls_ebox.set_name ("BusControlsBaseUnselected");
|
controls_ebox.set_name ("BusControlsBaseUnselected");
|
||||||
controls_base_selected_name = "BusControlsBaseSelected";
|
controls_base_selected_name = "BusControlsBaseSelected";
|
||||||
controls_base_unselected_name = "BusControlsBaseUnselected";
|
controls_base_unselected_name = "BusControlsBaseUnselected";
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class AutomationTimeAxisView;
|
||||||
class MidiTimeAxisView : public RouteTimeAxisView
|
class MidiTimeAxisView : public RouteTimeAxisView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MidiTimeAxisView (PublicEditor&, ARDOUR::Session&, ARDOUR::Route&, ArdourCanvas::Canvas& canvas);
|
MidiTimeAxisView (PublicEditor&, ARDOUR::Session&, boost::shared_ptr<ARDOUR::Route>, ArdourCanvas::Canvas& canvas);
|
||||||
virtual ~MidiTimeAxisView ();
|
virtual ~MidiTimeAxisView ();
|
||||||
|
|
||||||
/* overridden from parent to store display state */
|
/* overridden from parent to store display state */
|
||||||
|
|
@ -78,7 +78,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
||||||
|
|
||||||
void route_active_changed ();
|
void route_active_changed ();
|
||||||
|
|
||||||
void redirects_changed (void *);
|
//void redirects_changed (void *); FIXME?
|
||||||
|
|
||||||
void build_display_menu ();
|
void build_display_menu ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ speed_printer (char buf[32], Gtk::Adjustment& adj, void* arg)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
|
MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt, bool in_mixer)
|
||||||
: AxisView(sess),
|
: AxisView(sess),
|
||||||
RouteUI (rt, sess, _("Mute"), _("Solo"), _("Record")),
|
RouteUI (rt, sess, _("Mute"), _("Solo"), _("Record")),
|
||||||
_mixer(mx),
|
_mixer(mx),
|
||||||
|
|
@ -125,12 +125,12 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
|
||||||
output_button.set_name ("MixerIOButton");
|
output_button.set_name ("MixerIOButton");
|
||||||
output_label.set_name ("MixerIOButtonLabel");
|
output_label.set_name ("MixerIOButtonLabel");
|
||||||
|
|
||||||
_route.meter_change.connect (mem_fun(*this, &MixerStrip::meter_changed));
|
_route->meter_change.connect (mem_fun(*this, &MixerStrip::meter_changed));
|
||||||
meter_point_button.add (meter_point_label);
|
meter_point_button.add (meter_point_label);
|
||||||
meter_point_button.set_name ("MixerStripMeterPreButton");
|
meter_point_button.set_name ("MixerStripMeterPreButton");
|
||||||
meter_point_label.set_name ("MixerStripMeterPreButton");
|
meter_point_label.set_name ("MixerStripMeterPreButton");
|
||||||
|
|
||||||
switch (_route.meter_point()) {
|
switch (_route->meter_point()) {
|
||||||
case MeterInput:
|
case MeterInput:
|
||||||
meter_point_label.set_text (_("input"));
|
meter_point_label.set_text (_("input"));
|
||||||
break;
|
break;
|
||||||
|
|
@ -191,7 +191,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
|
||||||
rec_enable_button->unset_flags (Gtk::CAN_FOCUS);
|
rec_enable_button->unset_flags (Gtk::CAN_FOCUS);
|
||||||
rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press));
|
rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press));
|
||||||
|
|
||||||
AudioTrack* at = dynamic_cast<AudioTrack*>(&_route);
|
AudioTrack* at = audio_track();
|
||||||
|
|
||||||
at->FreezeChange.connect (mem_fun(*this, &MixerStrip::map_frozen));
|
at->FreezeChange.connect (mem_fun(*this, &MixerStrip::map_frozen));
|
||||||
|
|
||||||
|
|
@ -217,10 +217,10 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
|
||||||
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
|
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
|
||||||
|
|
||||||
name_label.set_name ("MixerNameButtonLabel");
|
name_label.set_name ("MixerNameButtonLabel");
|
||||||
if (_route.phase_invert()) {
|
if (_route->phase_invert()) {
|
||||||
name_label.set_text (X_("Ø ") + name_label.get_text());
|
name_label.set_text (X_("Ø ") + name_label.get_text());
|
||||||
} else {
|
} else {
|
||||||
name_label.set_text (_route.name());
|
name_label.set_text (_route->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
group_button.add (group_label);
|
group_button.add (group_label);
|
||||||
|
|
@ -229,9 +229,9 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
|
||||||
|
|
||||||
comment_button.set_name ("MixerCommentButton");
|
comment_button.set_name ("MixerCommentButton");
|
||||||
|
|
||||||
ARDOUR_UI::instance()->tooltips().set_tip (comment_button, _route.comment()=="" ?
|
ARDOUR_UI::instance()->tooltips().set_tip (comment_button, _route->comment()=="" ?
|
||||||
_("Click to Add/Edit Comments"):
|
_("Click to Add/Edit Comments"):
|
||||||
_route.comment());
|
_route->comment());
|
||||||
|
|
||||||
comment_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::comment_button_clicked));
|
comment_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::comment_button_clicked));
|
||||||
|
|
||||||
|
|
@ -281,22 +281,22 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
|
||||||
|
|
||||||
_session.engine().Stopped.connect (mem_fun(*this, &MixerStrip::engine_stopped));
|
_session.engine().Stopped.connect (mem_fun(*this, &MixerStrip::engine_stopped));
|
||||||
_session.engine().Running.connect (mem_fun(*this, &MixerStrip::engine_running));
|
_session.engine().Running.connect (mem_fun(*this, &MixerStrip::engine_running));
|
||||||
_route.input_changed.connect (mem_fun(*this, &MixerStrip::input_changed));
|
_route->input_changed.connect (mem_fun(*this, &MixerStrip::input_changed));
|
||||||
_route.output_changed.connect (mem_fun(*this, &MixerStrip::output_changed));
|
_route->output_changed.connect (mem_fun(*this, &MixerStrip::output_changed));
|
||||||
_route.mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
|
_route->mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
|
||||||
_route.solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
_route->solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
||||||
_route.solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
_route->solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
||||||
_route.mix_group_changed.connect (mem_fun(*this, &MixerStrip::mix_group_changed));
|
_route->mix_group_changed.connect (mem_fun(*this, &MixerStrip::mix_group_changed));
|
||||||
_route.panner().Changed.connect (mem_fun(*this, &MixerStrip::connect_to_pan));
|
_route->panner().Changed.connect (mem_fun(*this, &MixerStrip::connect_to_pan));
|
||||||
|
|
||||||
if (is_audio_track()) {
|
if (is_audio_track()) {
|
||||||
audio_track()->DiskstreamChanged.connect (mem_fun(*this, &MixerStrip::diskstream_changed));
|
audio_track()->DiskstreamChanged.connect (mem_fun(*this, &MixerStrip::diskstream_changed));
|
||||||
get_diskstream()->SpeedChanged.connect (mem_fun(*this, &MixerStrip::speed_changed));
|
get_diskstream()->SpeedChanged.connect (mem_fun(*this, &MixerStrip::speed_changed));
|
||||||
}
|
}
|
||||||
|
|
||||||
_route.name_changed.connect (mem_fun(*this, &RouteUI::name_changed));
|
_route->name_changed.connect (mem_fun(*this, &RouteUI::name_changed));
|
||||||
_route.comment_changed.connect (mem_fun(*this, &MixerStrip::comment_changed));
|
_route->comment_changed.connect (mem_fun(*this, &MixerStrip::comment_changed));
|
||||||
_route.gui_changed.connect (mem_fun(*this, &MixerStrip::route_gui_changed));
|
_route->gui_changed.connect (mem_fun(*this, &MixerStrip::route_gui_changed));
|
||||||
|
|
||||||
input_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::input_press), false);
|
input_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::input_press), false);
|
||||||
output_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::output_press), false);
|
output_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::output_press), false);
|
||||||
|
|
@ -419,16 +419,16 @@ MixerStrip::set_width (Width w)
|
||||||
mute_button->set_label (_("mute"));
|
mute_button->set_label (_("mute"));
|
||||||
solo_button->set_label (_("solo"));
|
solo_button->set_label (_("solo"));
|
||||||
|
|
||||||
if (_route.comment() == "") {
|
if (_route->comment() == "") {
|
||||||
comment_button.set_label (_("comments"));
|
comment_button.set_label (_("comments"));
|
||||||
} else {
|
} else {
|
||||||
comment_button.set_label (_("*comments*"));
|
comment_button.set_label (_("*comments*"));
|
||||||
}
|
}
|
||||||
|
|
||||||
gpm.gain_automation_style_button.set_label (gpm.astyle_string(_route.gain_automation_curve().automation_style()));
|
gpm.gain_automation_style_button.set_label (gpm.astyle_string(_route->gain_automation_curve().automation_style()));
|
||||||
gpm.gain_automation_state_button.set_label (gpm.astate_string(_route.gain_automation_curve().automation_state()));
|
gpm.gain_automation_state_button.set_label (gpm.astate_string(_route->gain_automation_curve().automation_state()));
|
||||||
panners.pan_automation_style_button.set_label (panners.astyle_string(_route.panner().automation_style()));
|
panners.pan_automation_style_button.set_label (panners.astyle_string(_route->panner().automation_style()));
|
||||||
panners.pan_automation_state_button.set_label (panners.astate_string(_route.panner().automation_state()));
|
panners.pan_automation_state_button.set_label (panners.astate_string(_route->panner().automation_state()));
|
||||||
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "long", 2, 2);
|
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "long", 2, 2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -442,16 +442,16 @@ MixerStrip::set_width (Width w)
|
||||||
mute_button->set_label (_("M"));
|
mute_button->set_label (_("M"));
|
||||||
solo_button->set_label (_("S"));
|
solo_button->set_label (_("S"));
|
||||||
|
|
||||||
if (_route.comment() == "") {
|
if (_route->comment() == "") {
|
||||||
comment_button.set_label (_("Cmt"));
|
comment_button.set_label (_("Cmt"));
|
||||||
} else {
|
} else {
|
||||||
comment_button.set_label (_("*Cmt*"));
|
comment_button.set_label (_("*Cmt*"));
|
||||||
}
|
}
|
||||||
|
|
||||||
gpm.gain_automation_style_button.set_label (gpm.short_astyle_string(_route.gain_automation_curve().automation_style()));
|
gpm.gain_automation_style_button.set_label (gpm.short_astyle_string(_route->gain_automation_curve().automation_style()));
|
||||||
gpm.gain_automation_state_button.set_label (gpm.short_astate_string(_route.gain_automation_curve().automation_state()));
|
gpm.gain_automation_state_button.set_label (gpm.short_astate_string(_route->gain_automation_curve().automation_state()));
|
||||||
panners.pan_automation_style_button.set_label (panners.short_astyle_string(_route.panner().automation_style()));
|
panners.pan_automation_style_button.set_label (panners.short_astyle_string(_route->panner().automation_style()));
|
||||||
panners.pan_automation_state_button.set_label (panners.short_astate_string(_route.panner().automation_state()));
|
panners.pan_automation_state_button.set_label (panners.short_astate_string(_route->panner().automation_state()));
|
||||||
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
|
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -579,7 +579,7 @@ MixerStrip::connection_input_chosen (ARDOUR::Connection *c)
|
||||||
if (!ignore_toggle) {
|
if (!ignore_toggle) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_route.use_input_connection (*c, this);
|
_route->use_input_connection (*c, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (AudioEngine::PortRegistrationFailure& err) {
|
catch (AudioEngine::PortRegistrationFailure& err) {
|
||||||
|
|
@ -595,7 +595,7 @@ MixerStrip::connection_output_chosen (ARDOUR::Connection *c)
|
||||||
if (!ignore_toggle) {
|
if (!ignore_toggle) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_route.use_output_connection (*c, this);
|
_route->use_output_connection (*c, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (AudioEngine::PortRegistrationFailure& err) {
|
catch (AudioEngine::PortRegistrationFailure& err) {
|
||||||
|
|
@ -616,11 +616,11 @@ MixerStrip::add_connection_to_input_menu (ARDOUR::Connection* c)
|
||||||
|
|
||||||
MenuList& citems = input_menu.items();
|
MenuList& citems = input_menu.items();
|
||||||
|
|
||||||
if (c->nports() == _route.n_inputs()) {
|
if (c->nports() == _route->n_inputs()) {
|
||||||
|
|
||||||
citems.push_back (CheckMenuElem (c->name(), bind (mem_fun(*this, &MixerStrip::connection_input_chosen), c)));
|
citems.push_back (CheckMenuElem (c->name(), bind (mem_fun(*this, &MixerStrip::connection_input_chosen), c)));
|
||||||
|
|
||||||
ARDOUR::Connection *current = _route.input_connection();
|
ARDOUR::Connection *current = _route->input_connection();
|
||||||
|
|
||||||
if (current == c) {
|
if (current == c) {
|
||||||
ignore_toggle = true;
|
ignore_toggle = true;
|
||||||
|
|
@ -639,12 +639,12 @@ MixerStrip::add_connection_to_output_menu (ARDOUR::Connection* c)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->nports() == _route.n_outputs()) {
|
if (c->nports() == _route->n_outputs()) {
|
||||||
|
|
||||||
MenuList& citems = output_menu.items();
|
MenuList& citems = output_menu.items();
|
||||||
citems.push_back (CheckMenuElem (c->name(), bind (mem_fun(*this, &MixerStrip::connection_output_chosen), c)));
|
citems.push_back (CheckMenuElem (c->name(), bind (mem_fun(*this, &MixerStrip::connection_output_chosen), c)));
|
||||||
|
|
||||||
ARDOUR::Connection *current = _route.output_connection();
|
ARDOUR::Connection *current = _route->output_connection();
|
||||||
|
|
||||||
if (current == c) {
|
if (current == c) {
|
||||||
ignore_toggle = true;
|
ignore_toggle = true;
|
||||||
|
|
@ -686,8 +686,8 @@ MixerStrip::connect_to_pan ()
|
||||||
panstate_connection.disconnect ();
|
panstate_connection.disconnect ();
|
||||||
panstyle_connection.disconnect ();
|
panstyle_connection.disconnect ();
|
||||||
|
|
||||||
if (!_route.panner().empty()) {
|
if (!_route->panner().empty()) {
|
||||||
StreamPanner* sp = _route.panner().front();
|
StreamPanner* sp = _route->panner().front();
|
||||||
|
|
||||||
panstate_connection = sp->automation().automation_state_changed.connect (mem_fun(panners, &PannerUI::pan_automation_state_changed));
|
panstate_connection = sp->automation().automation_state_changed.connect (mem_fun(panners, &PannerUI::pan_automation_state_changed));
|
||||||
panstyle_connection = sp->automation().automation_style_changed.connect (mem_fun(panners, &PannerUI::pan_automation_style_changed));
|
panstyle_connection = sp->automation().automation_style_changed.connect (mem_fun(panners, &PannerUI::pan_automation_style_changed));
|
||||||
|
|
@ -701,7 +701,7 @@ MixerStrip::update_input_display ()
|
||||||
{
|
{
|
||||||
ARDOUR::Connection *c;
|
ARDOUR::Connection *c;
|
||||||
|
|
||||||
if ((c = _route.input_connection()) != 0) {
|
if ((c = _route->input_connection()) != 0) {
|
||||||
input_label.set_text (c->name());
|
input_label.set_text (c->name());
|
||||||
} else {
|
} else {
|
||||||
switch (_width) {
|
switch (_width) {
|
||||||
|
|
@ -721,7 +721,7 @@ MixerStrip::update_output_display ()
|
||||||
{
|
{
|
||||||
ARDOUR::Connection *c;
|
ARDOUR::Connection *c;
|
||||||
|
|
||||||
if ((c = _route.output_connection()) != 0) {
|
if ((c = _route->output_connection()) != 0) {
|
||||||
output_label.set_text (c->name());
|
output_label.set_text (c->name());
|
||||||
} else {
|
} else {
|
||||||
switch (_width) {
|
switch (_width) {
|
||||||
|
|
@ -772,8 +772,8 @@ MixerStrip::comment_button_clicked ()
|
||||||
|
|
||||||
if (comment_window->is_visible()) {
|
if (comment_window->is_visible()) {
|
||||||
string str = comment_area->get_buffer()->get_text();
|
string str = comment_area->get_buffer()->get_text();
|
||||||
if (_route.comment() != str) {
|
if (_route->comment() != str) {
|
||||||
_route.set_comment (str, this);
|
_route->set_comment (str, this);
|
||||||
|
|
||||||
switch (_width) {
|
switch (_width) {
|
||||||
|
|
||||||
|
|
@ -817,7 +817,7 @@ void
|
||||||
MixerStrip::setup_comment_editor ()
|
MixerStrip::setup_comment_editor ()
|
||||||
{
|
{
|
||||||
string title;
|
string title;
|
||||||
title = _route.name();
|
title = _route->name();
|
||||||
title += _(": comment editor");
|
title += _(": comment editor");
|
||||||
|
|
||||||
comment_window = new ArdourDialog (title, false);
|
comment_window = new ArdourDialog (title, false);
|
||||||
|
|
@ -829,7 +829,7 @@ MixerStrip::setup_comment_editor ()
|
||||||
comment_area->set_size_request (110, 178);
|
comment_area->set_size_request (110, 178);
|
||||||
comment_area->set_wrap_mode (WRAP_WORD);
|
comment_area->set_wrap_mode (WRAP_WORD);
|
||||||
comment_area->set_editable (true);
|
comment_area->set_editable (true);
|
||||||
comment_area->get_buffer()->set_text (_route.comment());
|
comment_area->get_buffer()->set_text (_route->comment());
|
||||||
comment_area->show ();
|
comment_area->show ();
|
||||||
|
|
||||||
comment_window->get_vbox()->pack_start (*comment_area);
|
comment_window->get_vbox()->pack_start (*comment_area);
|
||||||
|
|
@ -844,7 +844,7 @@ MixerStrip::comment_changed (void *src)
|
||||||
if (src != this) {
|
if (src != this) {
|
||||||
ignore_comment_edit = true;
|
ignore_comment_edit = true;
|
||||||
if (comment_area) {
|
if (comment_area) {
|
||||||
comment_area->get_buffer()->set_text (_route.comment());
|
comment_area->get_buffer()->set_text (_route->comment());
|
||||||
}
|
}
|
||||||
ignore_comment_edit = false;
|
ignore_comment_edit = false;
|
||||||
}
|
}
|
||||||
|
|
@ -853,7 +853,7 @@ MixerStrip::comment_changed (void *src)
|
||||||
void
|
void
|
||||||
MixerStrip::set_mix_group (RouteGroup *rg)
|
MixerStrip::set_mix_group (RouteGroup *rg)
|
||||||
{
|
{
|
||||||
_route.set_mix_group (rg, this);
|
_route->set_mix_group (rg, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -865,7 +865,7 @@ MixerStrip::add_mix_group_to_menu (RouteGroup *rg, RadioMenuItem::Group* group)
|
||||||
|
|
||||||
items.push_back (RadioMenuElem (*group, rg->name(), bind (mem_fun(*this, &MixerStrip::set_mix_group), rg)));
|
items.push_back (RadioMenuElem (*group, rg->name(), bind (mem_fun(*this, &MixerStrip::set_mix_group), rg)));
|
||||||
|
|
||||||
if (_route.mix_group() == rg) {
|
if (_route->mix_group() == rg) {
|
||||||
static_cast<RadioMenuItem*>(&items.back())->set_active ();
|
static_cast<RadioMenuItem*>(&items.back())->set_active ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -905,7 +905,7 @@ MixerStrip::mix_group_changed (void *ignored)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::mix_group_changed), ignored));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::mix_group_changed), ignored));
|
||||||
|
|
||||||
RouteGroup *rg = _route.mix_group();
|
RouteGroup *rg = _route->mix_group();
|
||||||
|
|
||||||
if (rg) {
|
if (rg) {
|
||||||
group_label.set_text (rg->name());
|
group_label.set_text (rg->name());
|
||||||
|
|
@ -961,11 +961,11 @@ MixerStrip::build_route_ops_menu ()
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
items.push_back (CheckMenuElem (_("Active"), mem_fun (*this, &RouteUI::toggle_route_active)));
|
items.push_back (CheckMenuElem (_("Active"), mem_fun (*this, &RouteUI::toggle_route_active)));
|
||||||
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||||
route_active_menu_item->set_active (_route.active());
|
route_active_menu_item->set_active (_route->active());
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
items.push_back (CheckMenuElem (_("Invert Polarity"), mem_fun (*this, &RouteUI::toggle_polarity)));
|
items.push_back (CheckMenuElem (_("Invert Polarity"), mem_fun (*this, &RouteUI::toggle_polarity)));
|
||||||
polarity_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
polarity_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||||
polarity_menu_item->set_active (_route.phase_invert());
|
polarity_menu_item->set_active (_route->phase_invert());
|
||||||
|
|
||||||
build_remote_control_menu ();
|
build_remote_control_menu ();
|
||||||
|
|
||||||
|
|
@ -1055,10 +1055,10 @@ MixerStrip::name_changed (void *src)
|
||||||
RouteUI::name_changed (src);
|
RouteUI::name_changed (src);
|
||||||
break;
|
break;
|
||||||
case Narrow:
|
case Narrow:
|
||||||
name_label.set_text (PBD::short_version (_route.name(), 5));
|
name_label.set_text (PBD::short_version (_route->name(), 5));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (_route.phase_invert()) {
|
if (_route->phase_invert()) {
|
||||||
name_label.set_text (X_("Ø ") + name_label.get_text());
|
name_label.set_text (X_("Ø ") + name_label.get_text());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1097,7 +1097,7 @@ MixerStrip::map_frozen ()
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD (mem_fun(*this, &MixerStrip::map_frozen));
|
ENSURE_GUI_THREAD (mem_fun(*this, &MixerStrip::map_frozen));
|
||||||
|
|
||||||
AudioTrack* at = dynamic_cast<AudioTrack*>(&_route);
|
AudioTrack* at = audio_track();
|
||||||
|
|
||||||
if (at) {
|
if (at) {
|
||||||
switch (at->freeze_state()) {
|
switch (at->freeze_state()) {
|
||||||
|
|
@ -1113,11 +1113,11 @@ MixerStrip::map_frozen ()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_route.foreach_redirect (this, &MixerStrip::hide_redirect_editor);
|
_route->foreach_redirect (this, &MixerStrip::hide_redirect_editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MixerStrip::hide_redirect_editor (Redirect* redirect)
|
MixerStrip::hide_redirect_editor (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
void* gui = redirect->get_gui ();
|
void* gui = redirect->get_gui ();
|
||||||
|
|
||||||
|
|
@ -1134,7 +1134,7 @@ MixerStrip::route_active_changed ()
|
||||||
// FIXME: MIDI/Audio bus distinction
|
// FIXME: MIDI/Audio bus distinction
|
||||||
|
|
||||||
if (is_midi_track()) {
|
if (is_midi_track()) {
|
||||||
if (_route.active()) {
|
if (_route->active()) {
|
||||||
set_name ("MidiTrackStripBase");
|
set_name ("MidiTrackStripBase");
|
||||||
gpm.set_meter_strip_name ("MidiTrackStripBase");
|
gpm.set_meter_strip_name ("MidiTrackStripBase");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1143,7 +1143,7 @@ MixerStrip::route_active_changed ()
|
||||||
}
|
}
|
||||||
gpm.set_fader_name ("MidiTrackFader");
|
gpm.set_fader_name ("MidiTrackFader");
|
||||||
} else if (is_audio_track()) {
|
} else if (is_audio_track()) {
|
||||||
if (_route.active()) {
|
if (_route->active()) {
|
||||||
set_name ("AudioTrackStripBase");
|
set_name ("AudioTrackStripBase");
|
||||||
gpm.set_meter_strip_name ("AudioTrackStripBase");
|
gpm.set_meter_strip_name ("AudioTrackStripBase");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1152,7 +1152,7 @@ MixerStrip::route_active_changed ()
|
||||||
}
|
}
|
||||||
gpm.set_fader_name ("AudioTrackFader");
|
gpm.set_fader_name ("AudioTrackFader");
|
||||||
} else {
|
} else {
|
||||||
if (_route.active()) {
|
if (_route->active()) {
|
||||||
set_name ("AudioBusStripBase");
|
set_name ("AudioBusStripBase");
|
||||||
gpm.set_meter_strip_name ("AudioBusStripBase");
|
gpm.set_meter_strip_name ("AudioBusStripBase");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1166,7 +1166,7 @@ MixerStrip::route_active_changed ()
|
||||||
RouteGroup*
|
RouteGroup*
|
||||||
MixerStrip::mix_group() const
|
MixerStrip::mix_group() const
|
||||||
{
|
{
|
||||||
return _route.mix_group();
|
return _route->mix_group();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1195,7 +1195,7 @@ MixerStrip::meter_changed (void *src)
|
||||||
|
|
||||||
ENSURE_GUI_THREAD (bind (mem_fun(*this, &MixerStrip::meter_changed), src));
|
ENSURE_GUI_THREAD (bind (mem_fun(*this, &MixerStrip::meter_changed), src));
|
||||||
|
|
||||||
switch (_route.meter_point()) {
|
switch (_route->meter_point()) {
|
||||||
case MeterInput:
|
case MeterInput:
|
||||||
meter_point_label.set_text (_("input"));
|
meter_point_label.set_text (_("input"));
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ class Mixer_UI;
|
||||||
class MixerStrip : public RouteUI, public Gtk::EventBox
|
class MixerStrip : public RouteUI, public Gtk::EventBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MixerStrip (Mixer_UI&, ARDOUR::Session&, ARDOUR::Route &, bool in_mixer = true);
|
MixerStrip (Mixer_UI&, ARDOUR::Session&, boost::shared_ptr<ARDOUR::Route>, bool in_mixer = true);
|
||||||
~MixerStrip ();
|
~MixerStrip ();
|
||||||
|
|
||||||
void set_width (Width);
|
void set_width (Width);
|
||||||
|
|
@ -237,7 +237,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
||||||
void name_changed (void *src);
|
void name_changed (void *src);
|
||||||
void update_speed_display ();
|
void update_speed_display ();
|
||||||
void map_frozen ();
|
void map_frozen ();
|
||||||
void hide_redirect_editor (ARDOUR::Redirect* redirect);
|
void hide_redirect_editor (boost::shared_ptr<ARDOUR::Redirect> redirect);
|
||||||
|
|
||||||
bool ignore_speed_adjustment;
|
bool ignore_speed_adjustment;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ Mixer_UI::show_window ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Mixer_UI::add_strip (Route* route)
|
Mixer_UI::add_strip (boost::shared_ptr<Route> route)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::add_strip), route));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::add_strip), route));
|
||||||
|
|
||||||
|
|
@ -261,7 +261,7 @@ Mixer_UI::add_strip (Route* route)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strip = new MixerStrip (*this, *session, *route);
|
strip = new MixerStrip (*this, *session, route);
|
||||||
strips.push_back (strip);
|
strips.push_back (strip);
|
||||||
|
|
||||||
strip->set_width (_strip_width);
|
strip->set_width (_strip_width);
|
||||||
|
|
@ -310,7 +310,7 @@ void
|
||||||
Mixer_UI::follow_strip_selection ()
|
Mixer_UI::follow_strip_selection ()
|
||||||
{
|
{
|
||||||
for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
|
for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||||
(*i)->set_selected (_selection.selected (&(*i)->route()));
|
(*i)->set_selected (_selection.selected ((*i)->route()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -324,13 +324,13 @@ Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip)
|
||||||
at the same time.
|
at the same time.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (_selection.selected (&strip->route())) {
|
if (_selection.selected (strip->route())) {
|
||||||
_selection.remove (&strip->route());
|
_selection.remove (strip->route());
|
||||||
} else {
|
} else {
|
||||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||||
_selection.add (&strip->route());
|
_selection.add (strip->route());
|
||||||
} else {
|
} else {
|
||||||
_selection.set (&strip->route());
|
_selection.set (strip->route());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -444,7 +444,7 @@ Mixer_UI::set_all_strips_visibility (bool yn)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strip->route().master() || strip->route().control()) {
|
if (strip->route()->master() || strip->route()->control()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -472,11 +472,11 @@ Mixer_UI::set_all_audio_visibility (int tracks, bool yn)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strip->route().master() || strip->route().control()) {
|
if (strip->route()->master() || strip->route()->control()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioTrack* at = dynamic_cast<AudioTrack*> (&strip->route());
|
AudioTrack* at = strip->audio_track();
|
||||||
|
|
||||||
switch (tracks) {
|
switch (tracks) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -570,11 +570,11 @@ Mixer_UI::redisplay_track_list ()
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
strip->set_marked_for_display (true);
|
strip->set_marked_for_display (true);
|
||||||
strip->route().set_order_key (N_("signal"), order);
|
strip->route()->set_order_key (N_("signal"), order);
|
||||||
|
|
||||||
if (strip->packed()) {
|
if (strip->packed()) {
|
||||||
|
|
||||||
if (strip->route().master() || strip->route().control()) {
|
if (strip->route()->master() || strip->route()->control()) {
|
||||||
out_packer.reorder_child (*strip, -1);
|
out_packer.reorder_child (*strip, -1);
|
||||||
} else {
|
} else {
|
||||||
strip_packer.reorder_child (*strip, -1); /* put at end */
|
strip_packer.reorder_child (*strip, -1); /* put at end */
|
||||||
|
|
@ -582,7 +582,7 @@ Mixer_UI::redisplay_track_list ()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (strip->route().master() || strip->route().control()) {
|
if (strip->route()->master() || strip->route()->control()) {
|
||||||
out_packer.pack_start (*strip, false, false);
|
out_packer.pack_start (*strip, false, false);
|
||||||
} else {
|
} else {
|
||||||
strip_packer.pack_start (*strip, false, false);
|
strip_packer.pack_start (*strip, false, false);
|
||||||
|
|
@ -593,7 +593,7 @@ Mixer_UI::redisplay_track_list ()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (strip->route().master() || strip->route().control()) {
|
if (strip->route()->master() || strip->route()->control()) {
|
||||||
/* do nothing, these cannot be hidden */
|
/* do nothing, these cannot be hidden */
|
||||||
} else {
|
} else {
|
||||||
strip_packer.remove (*strip);
|
strip_packer.remove (*strip);
|
||||||
|
|
@ -604,7 +604,7 @@ Mixer_UI::redisplay_track_list ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SignalOrderRouteSorter {
|
struct SignalOrderRouteSorter {
|
||||||
bool operator() (Route* a, Route* b) {
|
bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) {
|
||||||
/* use of ">" forces the correct sort order */
|
/* use of ">" forces the correct sort order */
|
||||||
return a->order_key ("signal") < b->order_key ("signal");
|
return a->order_key ("signal") < b->order_key ("signal");
|
||||||
}
|
}
|
||||||
|
|
@ -613,16 +613,17 @@ struct SignalOrderRouteSorter {
|
||||||
void
|
void
|
||||||
Mixer_UI::initial_track_display ()
|
Mixer_UI::initial_track_display ()
|
||||||
{
|
{
|
||||||
Session::RouteList routes = session->get_routes();
|
boost::shared_ptr<Session::RouteList> routes = session->get_routes();
|
||||||
|
Session::RouteList copy (*routes);
|
||||||
SignalOrderRouteSorter sorter;
|
SignalOrderRouteSorter sorter;
|
||||||
|
|
||||||
routes.sort (sorter);
|
copy.sort (sorter);
|
||||||
|
|
||||||
no_track_list_redisplay = true;
|
no_track_list_redisplay = true;
|
||||||
|
|
||||||
track_model->clear ();
|
track_model->clear ();
|
||||||
|
|
||||||
for (Session::RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
|
for (Session::RouteList::iterator i = copy.begin(); i != copy.end(); ++i) {
|
||||||
add_strip (*i);
|
add_strip (*i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -670,7 +671,7 @@ Mixer_UI::track_display_button_press (GdkEventButton* ev)
|
||||||
MixerStrip* strip = (*iter)[track_columns.strip];
|
MixerStrip* strip = (*iter)[track_columns.strip];
|
||||||
if (strip) {
|
if (strip) {
|
||||||
|
|
||||||
if (!strip->route().master() && !strip->route().control()) {
|
if (!strip->route()->master() && !strip->route()->control()) {
|
||||||
bool visible = (*iter)[track_columns.visible];
|
bool visible = (*iter)[track_columns.visible];
|
||||||
(*iter)[track_columns.visible] = !visible;
|
(*iter)[track_columns.visible] = !visible;
|
||||||
}
|
}
|
||||||
|
|
@ -715,7 +716,7 @@ Mixer_UI::strip_name_changed (void* src, MixerStrip* mx)
|
||||||
|
|
||||||
for (i = rows.begin(); i != rows.end(); ++i) {
|
for (i = rows.begin(); i != rows.end(); ++i) {
|
||||||
if ((*i)[track_columns.strip] == mx) {
|
if ((*i)[track_columns.strip] == mx) {
|
||||||
(*i)[track_columns.text] = mx->route().name();
|
(*i)[track_columns.text] = mx->route()->name();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ class Mixer_UI : public Gtk::Window
|
||||||
|
|
||||||
bool strip_scroller_button_release (GdkEventButton*);
|
bool strip_scroller_button_release (GdkEventButton*);
|
||||||
|
|
||||||
void add_strip (ARDOUR::Route*);
|
void add_strip (boost::shared_ptr<ARDOUR::Route>);
|
||||||
void remove_strip (MixerStrip *);
|
void remove_strip (MixerStrip *);
|
||||||
|
|
||||||
void hide_all_strips (bool with_select);
|
void hide_all_strips (bool with_select);
|
||||||
|
|
@ -194,7 +194,7 @@ class Mixer_UI : public Gtk::Window
|
||||||
}
|
}
|
||||||
Gtk::TreeModelColumn<bool> visible;
|
Gtk::TreeModelColumn<bool> visible;
|
||||||
Gtk::TreeModelColumn<Glib::ustring> text;
|
Gtk::TreeModelColumn<Glib::ustring> text;
|
||||||
Gtk::TreeModelColumn<ARDOUR::Route*> route;
|
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
|
||||||
Gtk::TreeModelColumn<MixerStrip*> strip;
|
Gtk::TreeModelColumn<MixerStrip*> strip;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2001 Paul Davis
|
Copyright (C) 2001-2006 Paul Davis
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <pbd/whitespace.h>
|
#include <pbd/whitespace.h>
|
||||||
|
|
||||||
|
#include <ardour/audio_library.h>
|
||||||
#include <ardour/session.h>
|
#include <ardour/session.h>
|
||||||
#include <ardour/audioengine.h>
|
#include <ardour/audioengine.h>
|
||||||
#include <ardour/configuration.h>
|
#include <ardour/configuration.h>
|
||||||
|
|
@ -59,9 +60,7 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
|
||||||
|
|
||||||
/* Paths */
|
/* Paths */
|
||||||
path_table (11, 2),
|
path_table (11, 2),
|
||||||
sfdb_path_columns(),
|
sfdb_path_view(),
|
||||||
sfdb_paths(ListStore::create(sfdb_path_columns)),
|
|
||||||
sfdb_path_view(sfdb_paths),
|
|
||||||
|
|
||||||
/* Fades */
|
/* Fades */
|
||||||
|
|
||||||
|
|
@ -163,7 +162,6 @@ OptionEditor::set_session (Session *s)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
click_path_entry.set_sensitive (true);
|
click_path_entry.set_sensitive (true);
|
||||||
click_emphasis_path_entry.set_sensitive (true);
|
click_emphasis_path_entry.set_sensitive (true);
|
||||||
session_raid_entry.set_sensitive (true);
|
session_raid_entry.set_sensitive (true);
|
||||||
|
|
@ -251,12 +249,18 @@ OptionEditor::setup_path_options()
|
||||||
path_table.attach(*label, 0, 1, 2, 3, FILL|EXPAND, FILL);
|
path_table.attach(*label, 0, 1, 2, 3, FILL|EXPAND, FILL);
|
||||||
path_table.attach(sfdb_path_view, 1, 3, 2, 3, Gtk::FILL|Gtk::EXPAND, FILL);
|
path_table.attach(sfdb_path_view, 1, 3, 2, 3, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
|
|
||||||
sfdb_path_view.append_column(_("Paths"), sfdb_path_columns.paths);
|
sfdb_path_view.set_paths(Library->get_paths());
|
||||||
sfdb_path_view.set_size_request(-1, 100);
|
sfdb_path_view.PathsUpdated.connect (mem_fun(*this, &OptionEditor::sfdb_paths_changed));
|
||||||
|
|
||||||
path_table.show_all();
|
path_table.show_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
OptionEditor::sfdb_paths_changed ()
|
||||||
|
{
|
||||||
|
Library->set_paths (sfdb_path_view.get_paths());
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OptionEditor::add_session_paths ()
|
OptionEditor::add_session_paths ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@
|
||||||
#include <gtkmm/radiobutton.h>
|
#include <gtkmm/radiobutton.h>
|
||||||
#include <gtkmm/comboboxtext.h>
|
#include <gtkmm/comboboxtext.h>
|
||||||
|
|
||||||
|
#include <gtkmm2ext/pathlist.h>
|
||||||
|
|
||||||
#include <ardour/session.h>
|
#include <ardour/session.h>
|
||||||
|
|
||||||
#include "ardour_dialog.h"
|
#include "ardour_dialog.h"
|
||||||
|
|
@ -70,24 +72,16 @@ class OptionEditor : public Gtk::Dialog
|
||||||
|
|
||||||
/* paths */
|
/* paths */
|
||||||
|
|
||||||
Gtk::Table path_table;
|
Gtk::Table path_table;
|
||||||
Gtk::Entry session_raid_entry;
|
Gtk::Entry session_raid_entry;
|
||||||
|
|
||||||
struct SoundFilePathColumns : public Gtk::TreeModel::ColumnRecord {
|
Gtkmm2ext::PathList sfdb_path_view;
|
||||||
public:
|
|
||||||
SoundFilePathColumns() { add (paths); }
|
|
||||||
Gtk::TreeModelColumn<std::string> paths;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
SoundFilePathColumns sfdb_path_columns;
|
|
||||||
Glib::RefPtr<Gtk::ListStore> sfdb_paths;
|
|
||||||
Gtk::TreeView sfdb_path_view;
|
|
||||||
|
|
||||||
void setup_path_options();
|
void setup_path_options();
|
||||||
void add_session_paths ();
|
void add_session_paths ();
|
||||||
void remove_session_paths ();
|
void remove_session_paths ();
|
||||||
void raid_path_changed ();
|
void raid_path_changed ();
|
||||||
|
void sfdb_paths_changed ();
|
||||||
|
|
||||||
/* fades */
|
/* fades */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
|
||||||
PanAutomationTimeAxisView::PanAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n)
|
PanAutomationTimeAxisView::PanAutomationTimeAxisView (Session& s, boost::shared_ptr<Route> r, PublicEditor& e,
|
||||||
|
TimeAxisView& parent, Canvas& canvas, std::string n)
|
||||||
|
|
||||||
: AxisView (s),
|
: AxisView (s),
|
||||||
AutomationTimeAxisView (s, r, e, parent, canvas, n, X_("pan"), "")
|
AutomationTimeAxisView (s, r, e, parent, canvas, n, X_("pan"), "")
|
||||||
|
|
@ -140,6 +141,6 @@ void
|
||||||
PanAutomationTimeAxisView::set_automation_state (AutoState state)
|
PanAutomationTimeAxisView::set_automation_state (AutoState state)
|
||||||
{
|
{
|
||||||
if (!ignore_state_request) {
|
if (!ignore_state_request) {
|
||||||
route.panner().set_automation_state (state);
|
route->panner().set_automation_state (state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ class PanAutomationTimeAxisView : public AutomationTimeAxisView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PanAutomationTimeAxisView (ARDOUR::Session&,
|
PanAutomationTimeAxisView (ARDOUR::Session&,
|
||||||
ARDOUR::Route&,
|
boost::shared_ptr<ARDOUR::Route>,
|
||||||
PublicEditor&,
|
PublicEditor&,
|
||||||
TimeAxisView& parent_axis,
|
TimeAxisView& parent_axis,
|
||||||
ArdourCanvas::Canvas& canvas,
|
ArdourCanvas::Canvas& canvas,
|
||||||
std::string name);
|
std::string name);
|
||||||
|
|
||||||
~PanAutomationTimeAxisView();
|
~PanAutomationTimeAxisView();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ using namespace Gtk;
|
||||||
using namespace sigc;
|
using namespace sigc;
|
||||||
|
|
||||||
|
|
||||||
PannerUI::PannerUI (IO& io, Session& s)
|
PannerUI::PannerUI (boost::shared_ptr<IO> io, Session& s)
|
||||||
: _io (io),
|
: _io (io),
|
||||||
_session (s),
|
_session (s),
|
||||||
hAdjustment(0.0, 0.0, 0.0),
|
hAdjustment(0.0, 0.0, 0.0),
|
||||||
|
|
@ -87,13 +87,13 @@ PannerUI::PannerUI (IO& io, Session& s)
|
||||||
|
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
pan_astate_menu.items().push_back (MenuElem (_("Off"),
|
pan_astate_menu.items().push_back (MenuElem (_("Off"),
|
||||||
bind (mem_fun (_io.panner(), &Panner::set_automation_state), (AutoState) Off)));
|
bind (mem_fun (_io->panner(), &Panner::set_automation_state), (AutoState) Off)));
|
||||||
pan_astate_menu.items().push_back (MenuElem (_("Play"),
|
pan_astate_menu.items().push_back (MenuElem (_("Play"),
|
||||||
bind (mem_fun (_io.panner(), &Panner::set_automation_state), (AutoState) Play)));
|
bind (mem_fun (_io->panner(), &Panner::set_automation_state), (AutoState) Play)));
|
||||||
pan_astate_menu.items().push_back (MenuElem (_("Write"),
|
pan_astate_menu.items().push_back (MenuElem (_("Write"),
|
||||||
bind (mem_fun (_io.panner(), &Panner::set_automation_state), (AutoState) Write)));
|
bind (mem_fun (_io->panner(), &Panner::set_automation_state), (AutoState) Write)));
|
||||||
pan_astate_menu.items().push_back (MenuElem (_("Touch"),
|
pan_astate_menu.items().push_back (MenuElem (_("Touch"),
|
||||||
bind (mem_fun (_io.panner(), &Panner::set_automation_state), (AutoState) Touch)));
|
bind (mem_fun (_io->panner(), &Panner::set_automation_state), (AutoState) Touch)));
|
||||||
|
|
||||||
pan_astyle_menu.items().push_back (MenuElem (_("Trim")));
|
pan_astyle_menu.items().push_back (MenuElem (_("Trim")));
|
||||||
pan_astyle_menu.items().push_back (MenuElem (_("Abs")));
|
pan_astyle_menu.items().push_back (MenuElem (_("Abs")));
|
||||||
|
|
@ -143,9 +143,9 @@ PannerUI::PannerUI (IO& io, Session& s)
|
||||||
|
|
||||||
set_width(Narrow);
|
set_width(Narrow);
|
||||||
|
|
||||||
_io.panner().Changed.connect (mem_fun(*this, &PannerUI::panner_changed));
|
_io->panner().Changed.connect (mem_fun(*this, &PannerUI::panner_changed));
|
||||||
_io.panner().LinkStateChanged.connect (mem_fun(*this, &PannerUI::update_pan_linkage));
|
_io->panner().LinkStateChanged.connect (mem_fun(*this, &PannerUI::update_pan_linkage));
|
||||||
_io.panner().StateChanged.connect (mem_fun(*this, &PannerUI::update_pan_state));
|
_io->panner().StateChanged.connect (mem_fun(*this, &PannerUI::update_pan_state));
|
||||||
|
|
||||||
pan_changed (0);
|
pan_changed (0);
|
||||||
update_pan_sensitive ();
|
update_pan_sensitive ();
|
||||||
|
|
@ -165,7 +165,7 @@ PannerUI::panning_link_button_release (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
cerr << "link release\n";
|
cerr << "link release\n";
|
||||||
if (!ignore_toggle) {
|
if (!ignore_toggle) {
|
||||||
_io.panner().set_linked (!_io.panner().linked());
|
_io->panner().set_linked (!_io->panner().linked());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -173,12 +173,12 @@ PannerUI::panning_link_button_release (GdkEventButton* ev)
|
||||||
void
|
void
|
||||||
PannerUI::panning_link_direction_clicked()
|
PannerUI::panning_link_direction_clicked()
|
||||||
{
|
{
|
||||||
switch (_io.panner().link_direction()) {
|
switch (_io->panner().link_direction()) {
|
||||||
case Panner::SameDirection:
|
case Panner::SameDirection:
|
||||||
_io.panner().set_link_direction (Panner::OppositeDirection);
|
_io->panner().set_link_direction (Panner::OppositeDirection);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_io.panner().set_link_direction (Panner::SameDirection);
|
_io->panner().set_link_direction (Panner::SameDirection);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -188,7 +188,7 @@ PannerUI::update_pan_linkage ()
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(mem_fun(*this, &PannerUI::update_pan_linkage));
|
ENSURE_GUI_THREAD(mem_fun(*this, &PannerUI::update_pan_linkage));
|
||||||
|
|
||||||
bool x = _io.panner().linked();
|
bool x = _io->panner().linked();
|
||||||
bool bx = panning_link_button.get_active();
|
bool bx = panning_link_button.get_active();
|
||||||
|
|
||||||
if (x != bx) {
|
if (x != bx) {
|
||||||
|
|
@ -200,7 +200,7 @@ PannerUI::update_pan_linkage ()
|
||||||
|
|
||||||
panning_link_direction_button.set_sensitive (x);
|
panning_link_direction_button.set_sensitive (x);
|
||||||
|
|
||||||
switch (_io.panner().link_direction()) {
|
switch (_io->panner().link_direction()) {
|
||||||
case Panner::SameDirection:
|
case Panner::SameDirection:
|
||||||
panning_link_direction_button.set_image (*(manage (new Image (get_xpm ("forwardblarrow.xpm")))));
|
panning_link_direction_button.set_image (*(manage (new Image (get_xpm ("forwardblarrow.xpm")))));
|
||||||
break;
|
break;
|
||||||
|
|
@ -278,7 +278,7 @@ PannerUI::update_pan_state ()
|
||||||
void
|
void
|
||||||
PannerUI::setup_pan ()
|
PannerUI::setup_pan ()
|
||||||
{
|
{
|
||||||
uint32_t nouts = _io.n_outputs ();
|
uint32_t nouts = _io->n_outputs ();
|
||||||
|
|
||||||
if (nouts == 0 || nouts == 1) {
|
if (nouts == 0 || nouts == 1) {
|
||||||
|
|
||||||
|
|
@ -292,7 +292,7 @@ PannerUI::setup_pan ()
|
||||||
} else if (nouts == 2) {
|
} else if (nouts == 2) {
|
||||||
|
|
||||||
vector<Adjustment*>::size_type asz;
|
vector<Adjustment*>::size_type asz;
|
||||||
uint32_t npans = _io.panner().size();
|
uint32_t npans = _io->panner().size();
|
||||||
|
|
||||||
while (!pan_adjustments.empty()) {
|
while (!pan_adjustments.empty()) {
|
||||||
delete pan_bars.back();
|
delete pan_bars.back();
|
||||||
|
|
@ -308,23 +308,23 @@ PannerUI::setup_pan ()
|
||||||
|
|
||||||
/* initialize adjustment with current value of panner */
|
/* initialize adjustment with current value of panner */
|
||||||
|
|
||||||
_io.panner()[asz]->get_position (x);
|
_io->panner()[asz]->get_position (x);
|
||||||
|
|
||||||
pan_adjustments.push_back (new Adjustment (x, 0, 1.0, 0.05, 0.1));
|
pan_adjustments.push_back (new Adjustment (x, 0, 1.0, 0.05, 0.1));
|
||||||
pan_adjustments.back()->signal_value_changed().connect (bind (mem_fun(*this, &PannerUI::pan_adjustment_changed), (uint32_t) asz));
|
pan_adjustments.back()->signal_value_changed().connect (bind (mem_fun(*this, &PannerUI::pan_adjustment_changed), (uint32_t) asz));
|
||||||
|
|
||||||
_io.panner()[asz]->Changed.connect (bind (mem_fun(*this, &PannerUI::pan_value_changed), (uint32_t) asz));
|
_io->panner()[asz]->Changed.connect (bind (mem_fun(*this, &PannerUI::pan_value_changed), (uint32_t) asz));
|
||||||
|
|
||||||
bc = new BarController (*pan_adjustments[asz],
|
bc = new BarController (*pan_adjustments[asz],
|
||||||
_io.panner()[asz]->control(),
|
_io->panner()[asz]->control(),
|
||||||
bind (mem_fun(*this, &PannerUI::pan_printer), pan_adjustments[asz]));
|
bind (mem_fun(*this, &PannerUI::pan_printer), pan_adjustments[asz]));
|
||||||
|
|
||||||
bc->set_name ("PanSlider");
|
bc->set_name ("PanSlider");
|
||||||
bc->set_shadow_type (Gtk::SHADOW_NONE);
|
bc->set_shadow_type (Gtk::SHADOW_NONE);
|
||||||
bc->set_style (BarController::Line);
|
bc->set_style (BarController::Line);
|
||||||
|
|
||||||
bc->StartGesture.connect (bind (mem_fun (_io, &IO::start_pan_touch), (uint32_t) asz));
|
bc->StartGesture.connect (bind (mem_fun (*_io, &IO::start_pan_touch), (uint32_t) asz));
|
||||||
bc->StopGesture.connect (bind (mem_fun (_io, &IO::end_pan_touch), (uint32_t) asz));
|
bc->StopGesture.connect (bind (mem_fun (*_io, &IO::end_pan_touch), (uint32_t) asz));
|
||||||
|
|
||||||
char buf[64];
|
char buf[64];
|
||||||
snprintf (buf, sizeof (buf), _("panner for channel %zu"), asz + 1);
|
snprintf (buf, sizeof (buf), _("panner for channel %zu"), asz + 1);
|
||||||
|
|
@ -371,13 +371,13 @@ PannerUI::setup_pan ()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (panner == 0) {
|
if (panner == 0) {
|
||||||
panner = new Panner2d (_io.panner(), w, 61);
|
panner = new Panner2d (_io->panner(), w, 61);
|
||||||
panner->set_name ("MixerPanZone");
|
panner->set_name ("MixerPanZone");
|
||||||
panner->show ();
|
panner->show ();
|
||||||
}
|
}
|
||||||
|
|
||||||
update_pan_sensitive ();
|
update_pan_sensitive ();
|
||||||
panner->reset (_io.n_inputs());
|
panner->reset (_io->n_inputs());
|
||||||
panner->set_size_request (w, 61);
|
panner->set_size_request (w, 61);
|
||||||
|
|
||||||
/* and finally, add it to the panner frame */
|
/* and finally, add it to the panner frame */
|
||||||
|
|
@ -420,7 +420,7 @@ PannerUI::build_pan_menu (uint32_t which)
|
||||||
|
|
||||||
/* set state first, connect second */
|
/* set state first, connect second */
|
||||||
|
|
||||||
(dynamic_cast<CheckMenuItem*> (&items.back()))->set_active (_io.panner()[which]->muted());
|
(dynamic_cast<CheckMenuItem*> (&items.back()))->set_active (_io->panner()[which]->muted());
|
||||||
(dynamic_cast<CheckMenuItem*> (&items.back()))->signal_toggled().connect
|
(dynamic_cast<CheckMenuItem*> (&items.back()))->signal_toggled().connect
|
||||||
(bind (mem_fun(*this, &PannerUI::pan_mute), which));
|
(bind (mem_fun(*this, &PannerUI::pan_mute), which));
|
||||||
|
|
||||||
|
|
@ -429,7 +429,7 @@ PannerUI::build_pan_menu (uint32_t which)
|
||||||
|
|
||||||
/* set state first, connect second */
|
/* set state first, connect second */
|
||||||
|
|
||||||
bypass_menu_item->set_active (_io.panner().bypassed());
|
bypass_menu_item->set_active (_io->panner().bypassed());
|
||||||
bypass_menu_item->signal_toggled().connect (mem_fun(*this, &PannerUI::pan_bypass_toggle));
|
bypass_menu_item->signal_toggled().connect (mem_fun(*this, &PannerUI::pan_bypass_toggle));
|
||||||
|
|
||||||
items.push_back (MenuElem (_("Reset"), mem_fun(*this, &PannerUI::pan_reset)));
|
items.push_back (MenuElem (_("Reset"), mem_fun(*this, &PannerUI::pan_reset)));
|
||||||
|
|
@ -440,15 +440,15 @@ PannerUI::build_pan_menu (uint32_t which)
|
||||||
void
|
void
|
||||||
PannerUI::pan_mute (uint32_t which)
|
PannerUI::pan_mute (uint32_t which)
|
||||||
{
|
{
|
||||||
StreamPanner* sp = _io.panner()[which];
|
StreamPanner* sp = _io->panner()[which];
|
||||||
sp->set_muted (!sp->muted());
|
sp->set_muted (!sp->muted());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PannerUI::pan_bypass_toggle ()
|
PannerUI::pan_bypass_toggle ()
|
||||||
{
|
{
|
||||||
if (bypass_menu_item && (_io.panner().bypassed() != bypass_menu_item->get_active())) {
|
if (bypass_menu_item && (_io->panner().bypassed() != bypass_menu_item->get_active())) {
|
||||||
_io.panner().set_bypassed (!_io.panner().bypassed());
|
_io->panner().set_bypassed (!_io->panner().bypassed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -460,11 +460,11 @@ PannerUI::pan_reset ()
|
||||||
void
|
void
|
||||||
PannerUI::effective_pan_display ()
|
PannerUI::effective_pan_display ()
|
||||||
{
|
{
|
||||||
if (_io.panner().empty()) {
|
if (_io->panner().empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (_io.n_outputs()) {
|
switch (_io->n_outputs()) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
/* relax */
|
/* relax */
|
||||||
|
|
@ -487,7 +487,7 @@ PannerUI::pan_changed (void *src)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (_io.panner().size()) {
|
switch (_io->panner().size()) {
|
||||||
case 0:
|
case 0:
|
||||||
panning_link_direction_button.set_sensitive (false);
|
panning_link_direction_button.set_sensitive (false);
|
||||||
panning_link_button.set_sensitive (false);
|
panning_link_button.set_sensitive (false);
|
||||||
|
|
@ -501,7 +501,7 @@ PannerUI::pan_changed (void *src)
|
||||||
panning_link_button.set_sensitive (true);
|
panning_link_button.set_sensitive (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t nouts = _io.n_outputs();
|
uint32_t nouts = _io->n_outputs();
|
||||||
|
|
||||||
switch (nouts) {
|
switch (nouts) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -522,11 +522,11 @@ PannerUI::pan_changed (void *src)
|
||||||
void
|
void
|
||||||
PannerUI::pan_adjustment_changed (uint32_t which)
|
PannerUI::pan_adjustment_changed (uint32_t which)
|
||||||
{
|
{
|
||||||
if (!in_pan_update && which < _io.panner().size()) {
|
if (!in_pan_update && which < _io->panner().size()) {
|
||||||
|
|
||||||
float xpos;
|
float xpos;
|
||||||
float val = pan_adjustments[which]->get_value ();
|
float val = pan_adjustments[which]->get_value ();
|
||||||
_io.panner()[which]->get_position (xpos);
|
_io->panner()[which]->get_position (xpos);
|
||||||
|
|
||||||
/* add a kinda-sorta detent for the middle */
|
/* add a kinda-sorta detent for the middle */
|
||||||
|
|
||||||
|
|
@ -543,7 +543,7 @@ PannerUI::pan_adjustment_changed (uint32_t which)
|
||||||
|
|
||||||
if (!Panner::equivalent (val, xpos)) {
|
if (!Panner::equivalent (val, xpos)) {
|
||||||
|
|
||||||
_io.panner()[which]->set_position (val);
|
_io->panner()[which]->set_position (val);
|
||||||
/* XXX
|
/* XXX
|
||||||
the panner objects have no access to the session,
|
the panner objects have no access to the session,
|
||||||
so do this here. ick.
|
so do this here. ick.
|
||||||
|
|
@ -558,11 +558,11 @@ PannerUI::pan_value_changed (uint32_t which)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD (bind (mem_fun(*this, &PannerUI::pan_value_changed), which));
|
ENSURE_GUI_THREAD (bind (mem_fun(*this, &PannerUI::pan_value_changed), which));
|
||||||
|
|
||||||
if (_io.n_outputs() > 1 && which < _io.panner().size()) {
|
if (_io->n_outputs() > 1 && which < _io->panner().size()) {
|
||||||
float xpos;
|
float xpos;
|
||||||
float val = pan_adjustments[which]->get_value ();
|
float val = pan_adjustments[which]->get_value ();
|
||||||
|
|
||||||
_io.panner()[which]->get_position (xpos);
|
_io->panner()[which]->get_position (xpos);
|
||||||
|
|
||||||
if (!Panner::equivalent (val, xpos)) {
|
if (!Panner::equivalent (val, xpos)) {
|
||||||
in_pan_update = true;
|
in_pan_update = true;
|
||||||
|
|
@ -588,14 +588,14 @@ PannerUI::update_pan_bars (bool only_if_aplay)
|
||||||
float xpos, val;
|
float xpos, val;
|
||||||
|
|
||||||
if (only_if_aplay) {
|
if (only_if_aplay) {
|
||||||
AutomationList& alist (_io.panner()[n]->automation());
|
AutomationList& alist (_io->panner()[n]->automation());
|
||||||
|
|
||||||
if (!alist.automation_playback()) {
|
if (!alist.automation_playback()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_io.panner()[n]->get_effective_position (xpos);
|
_io->panner()[n]->get_effective_position (xpos);
|
||||||
val = (*i)->get_value ();
|
val = (*i)->get_value ();
|
||||||
|
|
||||||
if (!Panner::equivalent (val, xpos)) {
|
if (!Panner::equivalent (val, xpos)) {
|
||||||
|
|
@ -626,9 +626,9 @@ PannerUI::pan_printer (char *buf, uint32_t len, Adjustment* adj)
|
||||||
void
|
void
|
||||||
PannerUI::update_pan_sensitive ()
|
PannerUI::update_pan_sensitive ()
|
||||||
{
|
{
|
||||||
bool sensitive = !(_io.panner().automation_state() & Play);
|
bool sensitive = !(_io->panner().automation_state() & Play);
|
||||||
|
|
||||||
switch (_io.n_outputs()) {
|
switch (_io->n_outputs()) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
break;
|
break;
|
||||||
|
|
@ -689,10 +689,10 @@ PannerUI::pan_automation_style_changed ()
|
||||||
|
|
||||||
switch (_width) {
|
switch (_width) {
|
||||||
case Wide:
|
case Wide:
|
||||||
pan_automation_style_button.set_label (astyle_string(_io.panner().automation_style()));
|
pan_automation_style_button.set_label (astyle_string(_io->panner().automation_style()));
|
||||||
break;
|
break;
|
||||||
case Narrow:
|
case Narrow:
|
||||||
pan_automation_style_button.set_label (short_astyle_string(_io.panner().automation_style()));
|
pan_automation_style_button.set_label (short_astyle_string(_io->panner().automation_style()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -706,10 +706,10 @@ PannerUI::pan_automation_state_changed ()
|
||||||
|
|
||||||
switch (_width) {
|
switch (_width) {
|
||||||
case Wide:
|
case Wide:
|
||||||
pan_automation_state_button.set_label (astate_string(_io.panner().automation_state()));
|
pan_automation_state_button.set_label (astate_string(_io->panner().automation_state()));
|
||||||
break;
|
break;
|
||||||
case Narrow:
|
case Narrow:
|
||||||
pan_automation_state_button.set_label (short_astate_string(_io.panner().automation_state()));
|
pan_automation_state_button.set_label (short_astate_string(_io->panner().automation_state()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -718,11 +718,11 @@ PannerUI::pan_automation_state_changed ()
|
||||||
here.
|
here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (_io.panner().empty()) {
|
if (_io->panner().empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
x = (_io.panner().front()->automation().automation_state() != Off);
|
x = (_io->panner().front()->automation().automation_state() != Off);
|
||||||
|
|
||||||
if (pan_automation_state_button.get_active() != x) {
|
if (pan_automation_state_button.get_active() != x) {
|
||||||
ignore_toggle = true;
|
ignore_toggle = true;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ namespace Gtk {
|
||||||
class PannerUI : public Gtk::HBox
|
class PannerUI : public Gtk::HBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PannerUI (ARDOUR::IO&, ARDOUR::Session&);
|
PannerUI (boost::shared_ptr<ARDOUR::IO>, ARDOUR::Session&);
|
||||||
~PannerUI ();
|
~PannerUI ();
|
||||||
|
|
||||||
void pan_changed (void *);
|
void pan_changed (void *);
|
||||||
|
|
@ -72,7 +72,7 @@ class PannerUI : public Gtk::HBox
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class MixerStrip;
|
friend class MixerStrip;
|
||||||
ARDOUR::IO& _io;
|
boost::shared_ptr<ARDOUR::IO> _io;
|
||||||
ARDOUR::Session& _session;
|
ARDOUR::Session& _session;
|
||||||
|
|
||||||
bool ignore_toggle;
|
bool ignore_toggle;
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
|
||||||
rui = ruix;
|
rui = ruix;
|
||||||
|
|
||||||
str = _("ardour: playlist for ");
|
str = _("ardour: playlist for ");
|
||||||
str += rui->route().name();
|
str += rui->route()->name();
|
||||||
|
|
||||||
set_title (str);
|
set_title (str);
|
||||||
|
|
||||||
|
|
@ -223,7 +223,7 @@ PlaylistSelector::selection_changed ()
|
||||||
|
|
||||||
TreeModel::iterator iter = tree.get_selection()->get_selected();
|
TreeModel::iterator iter = tree.get_selection()->get_selected();
|
||||||
|
|
||||||
if (!iter) {
|
if (!iter || rui == 0) {
|
||||||
/* nothing selected */
|
/* nothing selected */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -233,7 +233,7 @@ PlaylistSelector::selection_changed ()
|
||||||
AudioTrack* at;
|
AudioTrack* at;
|
||||||
AudioPlaylist* apl;
|
AudioPlaylist* apl;
|
||||||
|
|
||||||
if ((at = dynamic_cast<AudioTrack*> (&rui->route())) == 0) {
|
if ((at = rui->audio_track()) == 0) {
|
||||||
/* eh? */
|
/* eh? */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ PluginSelector::use_plugin (PluginInfo* pi)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Plugin *plugin = manager->load (*session, pi);
|
boost::shared_ptr<Plugin> plugin = manager->load (*session, pi);
|
||||||
|
|
||||||
if (plugin) {
|
if (plugin) {
|
||||||
PluginCreated (plugin);
|
PluginCreated (plugin);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class PluginSelector : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PluginSelector (ARDOUR::PluginManager *);
|
PluginSelector (ARDOUR::PluginManager *);
|
||||||
sigc::signal<void,ARDOUR::Plugin *> PluginCreated;
|
sigc::signal<void,boost::shared_ptr<ARDOUR::Plugin> > PluginCreated;
|
||||||
|
|
||||||
int run (); // XXX should we try not to overload the non-virtual Gtk::Dialog::run() ?
|
int run (); // XXX should we try not to overload the non-virtual Gtk::Dialog::run() ?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,19 +61,19 @@ using namespace Gtkmm2ext;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
using namespace sigc;
|
using namespace sigc;
|
||||||
|
|
||||||
PluginUIWindow::PluginUIWindow (AudioEngine &engine, PluginInsert& insert, bool scrollable)
|
PluginUIWindow::PluginUIWindow (AudioEngine &engine, boost::shared_ptr<PluginInsert> insert, bool scrollable)
|
||||||
: ArdourDialog ("plugin ui")
|
: ArdourDialog ("plugin ui")
|
||||||
{
|
{
|
||||||
if (insert.plugin().has_editor()) {
|
if (insert->plugin()->has_editor()) {
|
||||||
|
|
||||||
#ifdef VST_SUPPORT
|
#ifdef VST_SUPPORT
|
||||||
|
|
||||||
VSTPlugin* vp;
|
boost::shared_ptr<VSTPlugin> vp;
|
||||||
|
|
||||||
if ((vp = dynamic_cast<VSTPlugin*> (&insert.plugin())) != 0) {
|
if ((vp = boost::dynamic_pointer_cast<VSTPlugin> (insert->plugin())) != 0) {
|
||||||
|
|
||||||
|
|
||||||
VSTPluginUI* vpu = new VSTPluginUI (insert, *vp);
|
VSTPluginUI* vpu = new VSTPluginUI (insert, vp);
|
||||||
|
|
||||||
_pluginui = vpu;
|
_pluginui = vpu;
|
||||||
get_vbox()->add (*vpu);
|
get_vbox()->add (*vpu);
|
||||||
|
|
@ -104,7 +104,7 @@ PluginUIWindow::PluginUIWindow (AudioEngine &engine, PluginInsert& insert, bool
|
||||||
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||||
|
|
||||||
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window*> (this)));
|
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window*> (this)));
|
||||||
insert.GoingAway.connect (mem_fun(*this, &PluginUIWindow::plugin_going_away));
|
insert->GoingAway.connect (mem_fun(*this, &PluginUIWindow::plugin_going_away));
|
||||||
|
|
||||||
if (scrollable) {
|
if (scrollable) {
|
||||||
gint h = _pluginui->get_preferred_height ();
|
gint h = _pluginui->get_preferred_height ();
|
||||||
|
|
@ -117,7 +117,7 @@ PluginUIWindow::~PluginUIWindow ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginUI::PluginUI (AudioEngine &engine, PluginInsert& pi, bool scrollable)
|
PluginUI::PluginUI (AudioEngine &engine, boost::shared_ptr<PluginInsert> pi, bool scrollable)
|
||||||
: PlugUIBase (pi),
|
: PlugUIBase (pi),
|
||||||
engine(engine),
|
engine(engine),
|
||||||
button_table (initial_button_rows, initial_button_cols),
|
button_table (initial_button_rows, initial_button_cols),
|
||||||
|
|
@ -165,8 +165,8 @@ PluginUI::PluginUI (AudioEngine &engine, PluginInsert& pi, bool scrollable)
|
||||||
pack_start (hpacker, false, false);
|
pack_start (hpacker, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
insert.active_changed.connect (mem_fun(*this, &PluginUI::redirect_active_changed));
|
insert->active_changed.connect (mem_fun(*this, &PluginUI::redirect_active_changed));
|
||||||
bypass_button.set_active (!insert.active());
|
bypass_button.set_active (!insert->active());
|
||||||
|
|
||||||
build (engine);
|
build (engine);
|
||||||
}
|
}
|
||||||
|
|
@ -233,13 +233,13 @@ PluginUI::build (AudioEngine &engine)
|
||||||
|
|
||||||
/* find all ports. build control elements for all appropriate control ports */
|
/* find all ports. build control elements for all appropriate control ports */
|
||||||
|
|
||||||
for (i = 0; i < plugin.parameter_count(); ++i) {
|
for (i = 0; i < plugin->parameter_count(); ++i) {
|
||||||
|
|
||||||
if (plugin.parameter_is_control (i)) {
|
if (plugin->parameter_is_control (i)) {
|
||||||
|
|
||||||
/* Don't show latency control ports */
|
/* Don't show latency control ports */
|
||||||
|
|
||||||
if (plugin.describe_parameter (i) == X_("latency")) {
|
if (plugin->describe_parameter (i) == X_("latency")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -263,7 +263,7 @@ PluginUI::build (AudioEngine &engine)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((cui = build_control_ui (engine, i, plugin.get_nth_control (i))) == 0) {
|
if ((cui = build_control_ui (engine, i, plugin->get_nth_control (i))) == 0) {
|
||||||
error << string_compose(_("Plugin Editor: could not build control element for port %1"), i) << endmsg;
|
error << string_compose(_("Plugin Editor: could not build control element for port %1"), i) << endmsg;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -326,8 +326,8 @@ PluginUI::build (AudioEngine &engine)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
n_ins = plugin.get_info().n_inputs;
|
n_ins = plugin->get_info().n_inputs;
|
||||||
n_outs = plugin.get_info().n_outputs;
|
n_outs = plugin->get_info().n_outputs;
|
||||||
|
|
||||||
if (box->children().empty()) {
|
if (box->children().empty()) {
|
||||||
hpacker.remove (*frame);
|
hpacker.remove (*frame);
|
||||||
|
|
@ -387,7 +387,7 @@ PluginUI::automation_state_changed (ControlUI* cui)
|
||||||
{
|
{
|
||||||
/* update button label */
|
/* update button label */
|
||||||
|
|
||||||
switch (insert.get_port_automation_state (cui->port_index) & (Off|Play|Touch|Write)) {
|
switch (insert->get_port_automation_state (cui->port_index) & (Off|Play|Touch|Write)) {
|
||||||
case Off:
|
case Off:
|
||||||
cui->automate_button.set_label (_("Off"));
|
cui->automate_button.set_label (_("Off"));
|
||||||
break;
|
break;
|
||||||
|
|
@ -415,7 +415,7 @@ static void integer_printer (char buf[32], Adjustment &adj, void *arg)
|
||||||
void
|
void
|
||||||
PluginUI::print_parameter (char *buf, uint32_t len, uint32_t param)
|
PluginUI::print_parameter (char *buf, uint32_t len, uint32_t param)
|
||||||
{
|
{
|
||||||
plugin.print_parameter (param, buf, len);
|
plugin->print_parameter (param, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginUI::ControlUI*
|
PluginUI::ControlUI*
|
||||||
|
|
@ -425,7 +425,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
ControlUI* control_ui;
|
ControlUI* control_ui;
|
||||||
Plugin::ParameterDescriptor desc;
|
Plugin::ParameterDescriptor desc;
|
||||||
|
|
||||||
plugin.get_parameter_descriptor (port_index, desc);
|
plugin->get_parameter_descriptor (port_index, desc);
|
||||||
|
|
||||||
control_ui = manage (new ControlUI ());
|
control_ui = manage (new ControlUI ());
|
||||||
control_ui->adjustment = 0;
|
control_ui->adjustment = 0;
|
||||||
|
|
@ -439,11 +439,11 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
|
|
||||||
control_ui->set_spacing (5);
|
control_ui->set_spacing (5);
|
||||||
|
|
||||||
if (plugin.parameter_is_input (port_index)) {
|
if (plugin->parameter_is_input (port_index)) {
|
||||||
|
|
||||||
LadspaPlugin* lp;
|
boost::shared_ptr<LadspaPlugin> lp;
|
||||||
|
|
||||||
if ((lp = dynamic_cast<LadspaPlugin*>(&plugin)) != 0) {
|
if ((lp = boost::dynamic_pointer_cast<LadspaPlugin>(plugin)) != 0) {
|
||||||
|
|
||||||
lrdf_defaults* defaults = lrdf_get_scale_values(lp->unique_id(), port_index);
|
lrdf_defaults* defaults = lrdf_get_scale_values(lp->unique_id(), port_index);
|
||||||
|
|
||||||
|
|
@ -453,7 +453,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
//control_ui->combo->set_value_in_list(true, false);
|
//control_ui->combo->set_value_in_list(true, false);
|
||||||
set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui));
|
set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui));
|
||||||
control_ui->combo->signal_changed().connect (bind (mem_fun(*this, &PluginUI::control_combo_changed), control_ui));
|
control_ui->combo->signal_changed().connect (bind (mem_fun(*this, &PluginUI::control_combo_changed), control_ui));
|
||||||
plugin.ParameterChanged.connect (bind (mem_fun (*this, &PluginUI::parameter_changed), control_ui));
|
plugin->ParameterChanged.connect (bind (mem_fun (*this, &PluginUI::parameter_changed), control_ui));
|
||||||
control_ui->pack_start(control_ui->label, true, true);
|
control_ui->pack_start(control_ui->label, true, true);
|
||||||
control_ui->pack_start(*control_ui->combo, false, true);
|
control_ui->pack_start(*control_ui->combo, false, true);
|
||||||
|
|
||||||
|
|
@ -478,7 +478,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
|
|
||||||
control_ui->button->signal_clicked().connect (bind (mem_fun(*this, &PluginUI::control_port_toggled), control_ui));
|
control_ui->button->signal_clicked().connect (bind (mem_fun(*this, &PluginUI::control_port_toggled), control_ui));
|
||||||
|
|
||||||
if(plugin.get_parameter (port_index) == 1){
|
if(plugin->get_parameter (port_index) == 1){
|
||||||
control_ui->button->set_active(true);
|
control_ui->button->set_active(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -529,9 +529,9 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
}
|
}
|
||||||
|
|
||||||
if (control_ui->logarithmic) {
|
if (control_ui->logarithmic) {
|
||||||
control_ui->adjustment->set_value(log(plugin.get_parameter(port_index)));
|
control_ui->adjustment->set_value(log(plugin->get_parameter(port_index)));
|
||||||
} else{
|
} else{
|
||||||
control_ui->adjustment->set_value(plugin.get_parameter(port_index));
|
control_ui->adjustment->set_value(plugin->get_parameter(port_index));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX memory leak: SliderController not destroyed by ControlUI
|
/* XXX memory leak: SliderController not destroyed by ControlUI
|
||||||
|
|
@ -552,11 +552,11 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
|
|
||||||
automation_state_changed (control_ui);
|
automation_state_changed (control_ui);
|
||||||
|
|
||||||
plugin.ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui));
|
plugin->ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui));
|
||||||
insert.automation_list (port_index).automation_state_changed.connect
|
insert->automation_list (port_index).automation_state_changed.connect
|
||||||
(bind (mem_fun(*this, &PluginUI::automation_state_changed), control_ui));
|
(bind (mem_fun(*this, &PluginUI::automation_state_changed), control_ui));
|
||||||
|
|
||||||
} else if (plugin.parameter_is_output (port_index)) {
|
} else if (plugin->parameter_is_output (port_index)) {
|
||||||
|
|
||||||
control_ui->display = manage (new EventBox);
|
control_ui->display = manage (new EventBox);
|
||||||
control_ui->display->set_name ("ParameterValueDisplay");
|
control_ui->display->set_name ("ParameterValueDisplay");
|
||||||
|
|
@ -603,20 +603,20 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
output_controls.push_back (control_ui);
|
output_controls.push_back (control_ui);
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui));
|
plugin->ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui));
|
||||||
return control_ui;
|
return control_ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::start_touch (PluginUI::ControlUI* cui)
|
PluginUI::start_touch (PluginUI::ControlUI* cui)
|
||||||
{
|
{
|
||||||
insert.automation_list (cui->port_index).start_touch ();
|
insert->automation_list (cui->port_index).start_touch ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::stop_touch (PluginUI::ControlUI* cui)
|
PluginUI::stop_touch (PluginUI::ControlUI* cui)
|
||||||
{
|
{
|
||||||
insert.automation_list (cui->port_index).stop_touch ();
|
insert->automation_list (cui->port_index).stop_touch ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -647,7 +647,7 @@ PluginUI::astate_clicked (ControlUI* cui, uint32_t port)
|
||||||
void
|
void
|
||||||
PluginUI::set_automation_state (AutoState state, ControlUI* cui)
|
PluginUI::set_automation_state (AutoState state, ControlUI* cui)
|
||||||
{
|
{
|
||||||
insert.set_port_automation_state (cui->port_index, state);
|
insert->set_port_automation_state (cui->port_index, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -663,7 +663,7 @@ PluginUI::control_adjustment_changed (ControlUI* cui)
|
||||||
value = exp(value);
|
value = exp(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
insert.set_parameter (cui->port_index, (float) value);
|
insert->set_parameter (cui->port_index, (float) value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -684,7 +684,7 @@ PluginUI::update_control_display (ControlUI* cui)
|
||||||
|
|
||||||
cui->update_pending = false;
|
cui->update_pending = false;
|
||||||
|
|
||||||
float val = plugin.get_parameter (cui->port_index);
|
float val = plugin->get_parameter (cui->port_index);
|
||||||
|
|
||||||
cui->ignore_change++;
|
cui->ignore_change++;
|
||||||
if (cui->combo) {
|
if (cui->combo) {
|
||||||
|
|
@ -718,7 +718,7 @@ void
|
||||||
PluginUI::control_port_toggled (ControlUI* cui)
|
PluginUI::control_port_toggled (ControlUI* cui)
|
||||||
{
|
{
|
||||||
if (!cui->ignore_change) {
|
if (!cui->ignore_change) {
|
||||||
insert.set_parameter (cui->port_index, cui->button->get_active());
|
insert->set_parameter (cui->port_index, cui->button->get_active());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -728,7 +728,7 @@ PluginUI::control_combo_changed (ControlUI* cui)
|
||||||
if (!cui->ignore_change) {
|
if (!cui->ignore_change) {
|
||||||
string value = cui->combo->get_active_text();
|
string value = cui->combo->get_active_text();
|
||||||
std::map<string,float> mapping = *cui->combo_map;
|
std::map<string,float> mapping = *cui->combo_map;
|
||||||
insert.set_parameter (cui->port_index, mapping[value]);
|
insert->set_parameter (cui->port_index, mapping[value]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -774,7 +774,7 @@ void
|
||||||
PluginUI::output_update ()
|
PluginUI::output_update ()
|
||||||
{
|
{
|
||||||
for (vector<ControlUI*>::iterator i = output_controls.begin(); i != output_controls.end(); ++i) {
|
for (vector<ControlUI*>::iterator i = output_controls.begin(); i != output_controls.end(); ++i) {
|
||||||
float val = plugin.get_parameter ((*i)->port_index);
|
float val = plugin->get_parameter ((*i)->port_index);
|
||||||
char buf[32];
|
char buf[32];
|
||||||
snprintf (buf, sizeof(buf), "%.2f", val);
|
snprintf (buf, sizeof(buf), "%.2f", val);
|
||||||
(*i)->display_label->set_text (buf);
|
(*i)->display_label->set_text (buf);
|
||||||
|
|
@ -808,7 +808,7 @@ vector<string>
|
||||||
PluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
|
PluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
|
||||||
{
|
{
|
||||||
vector<string> enums;
|
vector<string> enums;
|
||||||
LadspaPlugin* lp = dynamic_cast<LadspaPlugin*> (&plugin);
|
boost::shared_ptr<LadspaPlugin> lp = boost::dynamic_pointer_cast<LadspaPlugin> (plugin);
|
||||||
|
|
||||||
cui->combo_map = new std::map<string, float>;
|
cui->combo_map = new std::map<string, float>;
|
||||||
lrdf_defaults* defaults = lrdf_get_scale_values(lp->unique_id(), port_index);
|
lrdf_defaults* defaults = lrdf_get_scale_values(lp->unique_id(), port_index);
|
||||||
|
|
@ -827,14 +827,14 @@ PluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
|
||||||
return enums;
|
return enums;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlugUIBase::PlugUIBase (PluginInsert& pi)
|
PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
|
||||||
: insert (pi),
|
: insert (pi),
|
||||||
plugin (insert.plugin()),
|
plugin (insert->plugin()),
|
||||||
save_button(_("Add")),
|
save_button(_("Add")),
|
||||||
bypass_button (_("Bypass"))
|
bypass_button (_("Bypass"))
|
||||||
{
|
{
|
||||||
//combo.set_use_arrows_always(true);
|
//combo.set_use_arrows_always(true);
|
||||||
set_popdown_strings (combo, plugin.get_presets());
|
set_popdown_strings (combo, plugin->get_presets());
|
||||||
combo.set_size_request (100, -1);
|
combo.set_size_request (100, -1);
|
||||||
combo.set_active_text ("");
|
combo.set_active_text ("");
|
||||||
combo.signal_changed().connect(mem_fun(*this, &PlugUIBase::setting_selected));
|
combo.signal_changed().connect(mem_fun(*this, &PlugUIBase::setting_selected));
|
||||||
|
|
@ -850,7 +850,7 @@ void
|
||||||
PlugUIBase::setting_selected()
|
PlugUIBase::setting_selected()
|
||||||
{
|
{
|
||||||
if (combo.get_active_text().length() > 0) {
|
if (combo.get_active_text().length() > 0) {
|
||||||
if (!plugin.load_preset(combo.get_active_text())) {
|
if (!plugin->load_preset(combo.get_active_text())) {
|
||||||
warning << string_compose(_("Plugin preset %1 not found"), combo.get_active_text()) << endmsg;
|
warning << string_compose(_("Plugin preset %1 not found"), combo.get_active_text()) << endmsg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -875,8 +875,8 @@ PlugUIBase::save_plugin_setting ()
|
||||||
prompter.get_result(name);
|
prompter.get_result(name);
|
||||||
|
|
||||||
if (name.length()) {
|
if (name.length()) {
|
||||||
if(plugin.save_preset(name)){
|
if(plugin->save_preset(name)){
|
||||||
set_popdown_strings (combo, plugin.get_presets());
|
set_popdown_strings (combo, plugin->get_presets());
|
||||||
combo.set_active_text (name);
|
combo.set_active_text (name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -889,8 +889,8 @@ PlugUIBase::bypass_toggled ()
|
||||||
{
|
{
|
||||||
bool x;
|
bool x;
|
||||||
|
|
||||||
if ((x = bypass_button.get_active()) == insert.active()) {
|
if ((x = bypass_button.get_active()) == insert->active()) {
|
||||||
insert.set_active (!x, this);
|
insert->set_active (!x, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ namespace Gtkmm2ext {
|
||||||
class PlugUIBase : public virtual sigc::trackable
|
class PlugUIBase : public virtual sigc::trackable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlugUIBase (ARDOUR::PluginInsert&);
|
PlugUIBase (boost::shared_ptr<ARDOUR::PluginInsert>);
|
||||||
virtual ~PlugUIBase() {}
|
virtual ~PlugUIBase() {}
|
||||||
|
|
||||||
virtual gint get_preferred_height () = 0;
|
virtual gint get_preferred_height () = 0;
|
||||||
|
|
@ -75,8 +75,8 @@ class PlugUIBase : public virtual sigc::trackable
|
||||||
virtual bool stop_updating(GdkEventAny*) = 0;
|
virtual bool stop_updating(GdkEventAny*) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ARDOUR::PluginInsert& insert;
|
boost::shared_ptr<ARDOUR::PluginInsert> insert;
|
||||||
ARDOUR::Plugin& plugin;
|
boost::shared_ptr<ARDOUR::Plugin> plugin;
|
||||||
Gtk::ComboBoxText combo;
|
Gtk::ComboBoxText combo;
|
||||||
Gtk::Button save_button;
|
Gtk::Button save_button;
|
||||||
Gtk::ToggleButton bypass_button;
|
Gtk::ToggleButton bypass_button;
|
||||||
|
|
@ -89,7 +89,7 @@ class PlugUIBase : public virtual sigc::trackable
|
||||||
class PluginUI : public PlugUIBase, public Gtk::VBox
|
class PluginUI : public PlugUIBase, public Gtk::VBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PluginUI (ARDOUR::AudioEngine &, ARDOUR::PluginInsert& plug, bool scrollable=false);
|
PluginUI (ARDOUR::AudioEngine &, boost::shared_ptr<ARDOUR::PluginInsert> plug, bool scrollable=false);
|
||||||
~PluginUI ();
|
~PluginUI ();
|
||||||
|
|
||||||
gint get_preferred_height () { return prefheight; }
|
gint get_preferred_height () { return prefheight; }
|
||||||
|
|
@ -196,7 +196,7 @@ class PluginUI : public PlugUIBase, public Gtk::VBox
|
||||||
class PluginUIWindow : public ArdourDialog
|
class PluginUIWindow : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PluginUIWindow (ARDOUR::AudioEngine &, ARDOUR::PluginInsert& insert, bool scrollable=false);
|
PluginUIWindow (ARDOUR::AudioEngine &, boost::shared_ptr<ARDOUR::PluginInsert> insert, bool scrollable=false);
|
||||||
~PluginUIWindow ();
|
~PluginUIWindow ();
|
||||||
|
|
||||||
PlugUIBase& pluginui() { return *_pluginui; }
|
PlugUIBase& pluginui() { return *_pluginui; }
|
||||||
|
|
@ -213,7 +213,7 @@ class PluginUIWindow : public ArdourDialog
|
||||||
class VSTPluginUI : public PlugUIBase, public Gtk::VBox
|
class VSTPluginUI : public PlugUIBase, public Gtk::VBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VSTPluginUI (ARDOUR::PluginInsert&, ARDOUR::VSTPlugin&);
|
VSTPluginUI (boost::shared_ptr<ARDOUR::PluginInsert>, boost::shared_ptr<ARDOUR::VSTPlugin>);
|
||||||
~VSTPluginUI ();
|
~VSTPluginUI ();
|
||||||
|
|
||||||
gint get_preferred_height ();
|
gint get_preferred_height ();
|
||||||
|
|
@ -223,7 +223,7 @@ class VSTPluginUI : public PlugUIBase, public Gtk::VBox
|
||||||
int package (Gtk::Window&);
|
int package (Gtk::Window&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ARDOUR::VSTPlugin& vst;
|
boost::shared_ptr<ARDOUR::VSTPlugin> vst;
|
||||||
Gtk::Socket socket;
|
Gtk::Socket socket;
|
||||||
Gtk::HBox preset_box;
|
Gtk::HBox preset_box;
|
||||||
Gtk::VBox vpacker;
|
Gtk::VBox vpacker;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ RedirectAutomationLine::RedirectAutomationLine (const string & name, Redirect& r
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
}
|
}
|
||||||
|
|
||||||
pi->plugin().get_parameter_descriptor (_port, desc);
|
pi->plugin()->get_parameter_descriptor (_port, desc);
|
||||||
|
|
||||||
upper = desc.upper;
|
upper = desc.upper;
|
||||||
lower = desc.lower;
|
lower = desc.lower;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@ using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
|
||||||
RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n,
|
RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, boost::shared_ptr<Route> r,
|
||||||
|
PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n,
|
||||||
uint32_t prt, Redirect& rd, string state_name)
|
uint32_t prt, Redirect& rd, string state_name)
|
||||||
|
|
||||||
: AxisView (s),
|
: AxisView (s),
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RedirectAutomationTimeAxisView (ARDOUR::Session&,
|
RedirectAutomationTimeAxisView (ARDOUR::Session&,
|
||||||
ARDOUR::Route&,
|
boost::shared_ptr<ARDOUR::Route>,
|
||||||
PublicEditor&,
|
PublicEditor&,
|
||||||
TimeAxisView& parent,
|
TimeAxisView& parent,
|
||||||
ArdourCanvas::Canvas& canvas,
|
ArdourCanvas::Canvas& canvas,
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ bool RedirectBox::get_colors = true;
|
||||||
Gdk::Color* RedirectBox::active_redirect_color;
|
Gdk::Color* RedirectBox::active_redirect_color;
|
||||||
Gdk::Color* RedirectBox::inactive_redirect_color;
|
Gdk::Color* RedirectBox::inactive_redirect_color;
|
||||||
|
|
||||||
RedirectBox::RedirectBox (Placement pcmnt, Session& sess, Route& rt, PluginSelector &plugsel,
|
RedirectBox::RedirectBox (Placement pcmnt, Session& sess, boost::shared_ptr<Route> rt, PluginSelector &plugsel,
|
||||||
RouteRedirectSelection & rsel, bool owner_is_mixer)
|
RouteRedirectSelection & rsel, bool owner_is_mixer)
|
||||||
: _route(rt),
|
: _route(rt),
|
||||||
_session(sess),
|
_session(sess),
|
||||||
|
|
@ -132,7 +132,7 @@ RedirectBox::RedirectBox (Placement pcmnt, Session& sess, Route& rt, PluginSelec
|
||||||
|
|
||||||
pack_start (redirect_eventbox, true, true);
|
pack_start (redirect_eventbox, true, true);
|
||||||
|
|
||||||
_route.redirects_changed.connect (mem_fun(*this, &RedirectBox::redisplay_redirects));
|
_route->redirects_changed.connect (mem_fun(*this, &RedirectBox::redisplay_redirects));
|
||||||
|
|
||||||
redirect_eventbox.signal_enter_notify_event().connect (bind (sigc::ptr_fun (RedirectBox::enter_box), this));
|
redirect_eventbox.signal_enter_notify_event().connect (bind (sigc::ptr_fun (RedirectBox::enter_box), this));
|
||||||
|
|
||||||
|
|
@ -161,10 +161,10 @@ RedirectBox::object_drop (string type, uint32_t cnt, void** ptr)
|
||||||
|
|
||||||
/* do something with the dropped redirects */
|
/* do something with the dropped redirects */
|
||||||
|
|
||||||
list<Redirect*> redirects;
|
list<boost::shared_ptr<Redirect> > redirects;
|
||||||
|
|
||||||
for (uint32_t n = 0; n < cnt; ++n) {
|
for (uint32_t n = 0; n < cnt; ++n) {
|
||||||
redirects.push_back ((Redirect*) ptr[n]);
|
redirects.push_back (boost::shared_ptr<Redirect> ((Redirect*) ptr[n]));
|
||||||
}
|
}
|
||||||
|
|
||||||
paste_redirect_list (redirects);
|
paste_redirect_list (redirects);
|
||||||
|
|
@ -189,21 +189,21 @@ RedirectBox::set_width (Width w)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::remove_redirect_gui (Redirect *redirect)
|
RedirectBox::remove_redirect_gui (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
Insert *insert = 0;
|
boost::shared_ptr<Insert> insert;
|
||||||
Send *send = 0;
|
boost::shared_ptr<Send> send;
|
||||||
PortInsert *port_insert = 0;
|
boost::shared_ptr<PortInsert> port_insert;
|
||||||
|
|
||||||
if ((insert = dynamic_cast<Insert *> (redirect)) != 0) {
|
if ((insert = boost::dynamic_pointer_cast<Insert> (redirect)) != 0) {
|
||||||
|
|
||||||
if ((port_insert = dynamic_cast<PortInsert *> (insert)) != 0) {
|
if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (insert)) != 0) {
|
||||||
PortInsertUI *io_selector = reinterpret_cast<PortInsertUI *> (port_insert->get_gui());
|
PortInsertUI *io_selector = reinterpret_cast<PortInsertUI *> (port_insert->get_gui());
|
||||||
port_insert->set_gui (0);
|
port_insert->set_gui (0);
|
||||||
delete io_selector;
|
delete io_selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ((send = dynamic_cast<Send *> (insert)) != 0) {
|
} else if ((send = boost::dynamic_pointer_cast<Send> (insert)) != 0) {
|
||||||
SendUIWindow *sui = reinterpret_cast<SendUIWindow*> (send->get_gui());
|
SendUIWindow *sui = reinterpret_cast<SendUIWindow*> (send->get_gui());
|
||||||
send->set_gui (0);
|
send->set_gui (0);
|
||||||
delete sui;
|
delete sui;
|
||||||
|
|
@ -268,7 +268,7 @@ RedirectBox::redirect_button_press_event (GdkEventButton *ev)
|
||||||
TreeViewColumn* column;
|
TreeViewColumn* column;
|
||||||
int cellx;
|
int cellx;
|
||||||
int celly;
|
int celly;
|
||||||
Redirect* redirect = 0;
|
boost::shared_ptr<Redirect> redirect;
|
||||||
int ret = false;
|
int ret = false;
|
||||||
bool selected = false;
|
bool selected = false;
|
||||||
|
|
||||||
|
|
@ -353,25 +353,25 @@ RedirectBox::choose_plugin ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::insert_plugin_chosen (Plugin *plugin)
|
RedirectBox::insert_plugin_chosen (boost::shared_ptr<Plugin> plugin)
|
||||||
{
|
{
|
||||||
if (plugin) {
|
if (plugin) {
|
||||||
|
|
||||||
Redirect *redirect = new PluginInsert (_session, *plugin, _placement);
|
boost::shared_ptr<Redirect> redirect (new PluginInsert (_session, plugin, _placement));
|
||||||
|
|
||||||
redirect->active_changed.connect (mem_fun(*this, &RedirectBox::show_redirect_active));
|
redirect->active_changed.connect (mem_fun(*this, &RedirectBox::show_redirect_active));
|
||||||
|
|
||||||
uint32_t err_streams;
|
uint32_t err_streams;
|
||||||
|
|
||||||
if (_route.add_redirect (redirect, this, &err_streams)) {
|
if (_route->add_redirect (redirect, this, &err_streams)) {
|
||||||
wierd_plugin_dialog (*plugin, err_streams, _route);
|
wierd_plugin_dialog (*plugin, err_streams, _route);
|
||||||
delete redirect;
|
// XXX SHAREDPTR delete plugin here .. do we even need to care?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io)
|
RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, boost::shared_ptr<IO> io)
|
||||||
{
|
{
|
||||||
ArdourDialog dialog ("wierd plugin dialog");
|
ArdourDialog dialog ("wierd plugin dialog");
|
||||||
Label label;
|
Label label;
|
||||||
|
|
@ -417,8 +417,8 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io)
|
||||||
p.name(),
|
p.name(),
|
||||||
p.get_info().n_inputs,
|
p.get_info().n_inputs,
|
||||||
p.get_info().n_outputs,
|
p.get_info().n_outputs,
|
||||||
io.n_inputs(),
|
io->n_inputs(),
|
||||||
io.n_outputs(),
|
io->n_outputs(),
|
||||||
streams));
|
streams));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -436,36 +436,36 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io)
|
||||||
void
|
void
|
||||||
RedirectBox::choose_insert ()
|
RedirectBox::choose_insert ()
|
||||||
{
|
{
|
||||||
Redirect *redirect = new PortInsert (_session, _placement);
|
boost::shared_ptr<Redirect> redirect (new PortInsert (_session, _placement));
|
||||||
redirect->active_changed.connect (mem_fun(*this, &RedirectBox::show_redirect_active));
|
redirect->active_changed.connect (mem_fun(*this, &RedirectBox::show_redirect_active));
|
||||||
_route.add_redirect (redirect, this);
|
_route->add_redirect (redirect, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::choose_send ()
|
RedirectBox::choose_send ()
|
||||||
{
|
{
|
||||||
Send *send = new Send (_session, _placement);
|
boost::shared_ptr<Send> send (new Send (_session, _placement));
|
||||||
|
|
||||||
/* XXX need redirect lock on route */
|
/* XXX need redirect lock on route */
|
||||||
|
|
||||||
send->ensure_io (0, _route.max_redirect_outs(), false, this);
|
send->ensure_io (0, _route->max_redirect_outs(), false, this);
|
||||||
|
|
||||||
IOSelectorWindow *ios = new IOSelectorWindow (_session, *send, false, true);
|
IOSelectorWindow *ios = new IOSelectorWindow (_session, send, false, true);
|
||||||
|
|
||||||
ios->show_all ();
|
ios->show_all ();
|
||||||
ios->selector().Finished.connect (bind (mem_fun(*this, &RedirectBox::send_io_finished), static_cast<Redirect*>(send), ios));
|
ios->selector().Finished.connect (bind (mem_fun(*this, &RedirectBox::send_io_finished), boost::static_pointer_cast<Redirect>(send), ios));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::send_io_finished (IOSelector::Result r, Redirect* redirect, IOSelectorWindow* ios)
|
RedirectBox::send_io_finished (IOSelector::Result r, boost::shared_ptr<Redirect> redirect, IOSelectorWindow* ios)
|
||||||
{
|
{
|
||||||
switch (r) {
|
switch (r) {
|
||||||
case IOSelector::Cancelled:
|
case IOSelector::Cancelled:
|
||||||
delete redirect;
|
// delete redirect; XXX SHAREDPTR HOW TO DESTROY THE REDIRECT ? do we even need to think about it?
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IOSelector::Accepted:
|
case IOSelector::Accepted:
|
||||||
_route.add_redirect (redirect, this);
|
_route->add_redirect (redirect, this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -488,7 +488,8 @@ RedirectBox::redisplay_redirects (void *src)
|
||||||
redirect_active_connections.clear ();
|
redirect_active_connections.clear ();
|
||||||
redirect_name_connections.clear ();
|
redirect_name_connections.clear ();
|
||||||
|
|
||||||
_route.foreach_redirect (this, &RedirectBox::add_redirect_to_display);
|
void (RedirectBox::*pmf)(boost::shared_ptr<Redirect>) = &RedirectBox::add_redirect_to_display;
|
||||||
|
_route->foreach_redirect (this, pmf);
|
||||||
|
|
||||||
switch (_placement) {
|
switch (_placement) {
|
||||||
case PreFader:
|
case PreFader:
|
||||||
|
|
@ -501,33 +502,33 @@ RedirectBox::redisplay_redirects (void *src)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::add_redirect_to_display (Redirect *redirect)
|
RedirectBox::add_redirect_to_display (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
if (redirect->placement() != _placement) {
|
if (redirect->placement() != _placement) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gtk::TreeModel::Row row = *(model->append());
|
Gtk::TreeModel::Row row = *(model->append());
|
||||||
row[columns.text] = redirect_name (*redirect);
|
row[columns.text] = redirect_name (redirect);
|
||||||
row[columns.redirect] = redirect;
|
row[columns.redirect] = redirect;
|
||||||
|
|
||||||
show_redirect_active (redirect, this);
|
show_redirect_active (redirect.get(), this);
|
||||||
|
|
||||||
redirect_active_connections.push_back (redirect->active_changed.connect (mem_fun(*this, &RedirectBox::show_redirect_active)));
|
redirect_active_connections.push_back (redirect->active_changed.connect (mem_fun(*this, &RedirectBox::show_redirect_active)));
|
||||||
redirect_name_connections.push_back (redirect->name_changed.connect (bind (mem_fun(*this, &RedirectBox::show_redirect_name), redirect)));
|
redirect_name_connections.push_back (redirect->name_changed.connect (bind (mem_fun(*this, &RedirectBox::show_redirect_name), redirect)));
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
RedirectBox::redirect_name (Redirect& redirect)
|
RedirectBox::redirect_name (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
Send *send;
|
boost::shared_ptr<Send> send;
|
||||||
string name_display;
|
string name_display;
|
||||||
|
|
||||||
if (!redirect.active()) {
|
if (!redirect->active()) {
|
||||||
name_display = " (";
|
name_display = " (";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((send = dynamic_cast<Send *> (&redirect)) != 0) {
|
if ((send = boost::dynamic_pointer_cast<Send> (redirect)) != 0) {
|
||||||
|
|
||||||
name_display += '>';
|
name_display += '>';
|
||||||
|
|
||||||
|
|
@ -550,16 +551,16 @@ RedirectBox::redirect_name (Redirect& redirect)
|
||||||
|
|
||||||
switch (_width) {
|
switch (_width) {
|
||||||
case Wide:
|
case Wide:
|
||||||
name_display += redirect.name();
|
name_display += redirect->name();
|
||||||
break;
|
break;
|
||||||
case Narrow:
|
case Narrow:
|
||||||
name_display += PBD::short_version (redirect.name(), 5);
|
name_display += PBD::short_version (redirect->name(), 5);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!redirect.active()) {
|
if (!redirect->active()) {
|
||||||
name_display += ')';
|
name_display += ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -581,35 +582,37 @@ RedirectBox::build_redirect_tooltip (EventBox& box, string start)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::show_redirect_name (void* src, Redirect *redirect)
|
RedirectBox::show_redirect_name (void* src, boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RedirectBox::show_redirect_name), src, redirect));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RedirectBox::show_redirect_name), src, redirect));
|
||||||
|
show_redirect_active (redirect.get(), src);
|
||||||
show_redirect_active (redirect, src);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::show_redirect_active (Redirect *redirect, void *src)
|
RedirectBox::show_redirect_active (Redirect* redirect, void *src)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RedirectBox::show_redirect_active), redirect, src));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RedirectBox::show_redirect_active), redirect, src));
|
||||||
|
|
||||||
Gtk::TreeModel::Children children = model->children();
|
Gtk::TreeModel::Children children = model->children();
|
||||||
Gtk::TreeModel::Children::iterator iter = children.begin();
|
Gtk::TreeModel::Children::iterator iter = children.begin();
|
||||||
|
|
||||||
while( iter != children.end())
|
while (iter != children.end()) {
|
||||||
{
|
|
||||||
if ((*iter)[columns.redirect] == redirect)
|
boost::shared_ptr<Redirect> r = (*iter)[columns.redirect];
|
||||||
|
|
||||||
|
if (r.get() == redirect) {
|
||||||
|
(*iter)[columns.text] = redirect_name (r);
|
||||||
|
|
||||||
|
if (redirect->active()) {
|
||||||
|
(*iter)[columns.color] = *active_redirect_color;
|
||||||
|
} else {
|
||||||
|
(*iter)[columns.color] = *inactive_redirect_color;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
iter++;
|
iter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*iter)[columns.text] = redirect_name (*redirect);
|
|
||||||
|
|
||||||
if (redirect->active()) {
|
|
||||||
(*iter)[columns.color] = *active_redirect_color;
|
|
||||||
} else {
|
|
||||||
(*iter)[columns.color] = *inactive_redirect_color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -627,12 +630,12 @@ RedirectBox::compute_redirect_sort_keys ()
|
||||||
Gtk::TreeModel::Children children = model->children();
|
Gtk::TreeModel::Children children = model->children();
|
||||||
|
|
||||||
for (Gtk::TreeModel::Children::iterator iter = children.begin(); iter != children.end(); ++iter) {
|
for (Gtk::TreeModel::Children::iterator iter = children.begin(); iter != children.end(); ++iter) {
|
||||||
Redirect *redirect = (*iter)[columns.redirect];
|
boost::shared_ptr<Redirect> r = (*iter)[columns.redirect];
|
||||||
redirect->set_sort_key (sort_key);
|
r->set_sort_key (sort_key);
|
||||||
sort_key++;
|
sort_key++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_route.sort_redirects ()) {
|
if (_route->sort_redirects ()) {
|
||||||
|
|
||||||
redisplay_redirects (0);
|
redisplay_redirects (0);
|
||||||
|
|
||||||
|
|
@ -661,7 +664,7 @@ outputs do not work correctly."));
|
||||||
void
|
void
|
||||||
RedirectBox::rename_redirects ()
|
RedirectBox::rename_redirects ()
|
||||||
{
|
{
|
||||||
vector<Redirect*> to_be_renamed;
|
vector<boost::shared_ptr<Redirect> > to_be_renamed;
|
||||||
|
|
||||||
get_selected_redirects (to_be_renamed);
|
get_selected_redirects (to_be_renamed);
|
||||||
|
|
||||||
|
|
@ -669,7 +672,7 @@ RedirectBox::rename_redirects ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (vector<Redirect*>::iterator i = to_be_renamed.begin(); i != to_be_renamed.end(); ++i) {
|
for (vector<boost::shared_ptr<Redirect> >::iterator i = to_be_renamed.begin(); i != to_be_renamed.end(); ++i) {
|
||||||
rename_redirect (*i);
|
rename_redirect (*i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -677,7 +680,7 @@ RedirectBox::rename_redirects ()
|
||||||
void
|
void
|
||||||
RedirectBox::cut_redirects ()
|
RedirectBox::cut_redirects ()
|
||||||
{
|
{
|
||||||
vector<Redirect*> to_be_removed;
|
vector<boost::shared_ptr<Redirect> > to_be_removed;
|
||||||
|
|
||||||
get_selected_redirects (to_be_removed);
|
get_selected_redirects (to_be_removed);
|
||||||
|
|
||||||
|
|
@ -692,7 +695,7 @@ RedirectBox::cut_redirects ()
|
||||||
|
|
||||||
_rr_selection.set (to_be_removed);
|
_rr_selection.set (to_be_removed);
|
||||||
|
|
||||||
for (vector<Redirect*>::iterator i = to_be_removed.begin(); i != to_be_removed.end(); ++i) {
|
for (vector<boost::shared_ptr<Redirect> >::iterator i = to_be_removed.begin(); i != to_be_removed.end(); ++i) {
|
||||||
|
|
||||||
void* gui = (*i)->get_gui ();
|
void* gui = (*i)->get_gui ();
|
||||||
|
|
||||||
|
|
@ -700,7 +703,7 @@ RedirectBox::cut_redirects ()
|
||||||
static_cast<Gtk::Widget*>(gui)->hide ();
|
static_cast<Gtk::Widget*>(gui)->hide ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_route.remove_redirect (*i, this)) {
|
if (_route->remove_redirect (*i, this)) {
|
||||||
/* removal failed */
|
/* removal failed */
|
||||||
_rr_selection.remove (*i);
|
_rr_selection.remove (*i);
|
||||||
}
|
}
|
||||||
|
|
@ -711,8 +714,8 @@ RedirectBox::cut_redirects ()
|
||||||
void
|
void
|
||||||
RedirectBox::copy_redirects ()
|
RedirectBox::copy_redirects ()
|
||||||
{
|
{
|
||||||
vector<Redirect*> to_be_copied;
|
vector<boost::shared_ptr<Redirect> > to_be_copied;
|
||||||
vector<Redirect*> copies;
|
vector<boost::shared_ptr<Redirect> > copies;
|
||||||
|
|
||||||
get_selected_redirects (to_be_copied);
|
get_selected_redirects (to_be_copied);
|
||||||
|
|
||||||
|
|
@ -720,29 +723,24 @@ RedirectBox::copy_redirects ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (vector<Redirect*>::iterator i = to_be_copied.begin(); i != to_be_copied.end(); ++i) {
|
for (vector<boost::shared_ptr<Redirect> >::iterator i = to_be_copied.begin(); i != to_be_copied.end(); ++i) {
|
||||||
copies.push_back (Redirect::clone (**i));
|
copies.push_back (Redirect::clone (*i));
|
||||||
}
|
}
|
||||||
|
|
||||||
_rr_selection.set (copies);
|
_rr_selection.set (copies);
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
RedirectBox::idle_delete_redirect (Redirect *redirect)
|
RedirectBox::idle_delete_redirect (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
/* NOT copied to _mixer.selection() */
|
/* NOT copied to _mixer.selection() */
|
||||||
|
|
||||||
if (_route.remove_redirect (redirect, this)) {
|
_route->remove_redirect (redirect, this);
|
||||||
/* removal failed */
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
delete redirect;
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::rename_redirect (Redirect* redirect)
|
RedirectBox::rename_redirect (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
ArdourPrompter name_prompter (true);
|
ArdourPrompter name_prompter (true);
|
||||||
string result;
|
string result;
|
||||||
|
|
@ -767,7 +765,7 @@ RedirectBox::rename_redirect (Redirect* redirect)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::cut_redirect (Redirect *redirect)
|
RedirectBox::cut_redirect (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
/* this essentially transfers ownership of the redirect
|
/* this essentially transfers ownership of the redirect
|
||||||
of the redirect from the route to the mixer
|
of the redirect from the route to the mixer
|
||||||
|
|
@ -782,15 +780,15 @@ RedirectBox::cut_redirect (Redirect *redirect)
|
||||||
static_cast<Gtk::Widget*>(gui)->hide ();
|
static_cast<Gtk::Widget*>(gui)->hide ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_route.remove_redirect (redirect, this)) {
|
if (_route->remove_redirect (redirect, this)) {
|
||||||
_rr_selection.remove (redirect);
|
_rr_selection.remove (redirect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::copy_redirect (Redirect *redirect)
|
RedirectBox::copy_redirect (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
Redirect* copy = Redirect::clone (*redirect);
|
boost::shared_ptr<Redirect> copy = Redirect::clone (redirect);
|
||||||
_rr_selection.add (copy);
|
_rr_selection.add (copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -805,22 +803,19 @@ RedirectBox::paste_redirects ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::paste_redirect_list (list<Redirect*>& redirects)
|
RedirectBox::paste_redirect_list (list<boost::shared_ptr<Redirect> >& redirects)
|
||||||
{
|
{
|
||||||
list<Redirect*> copies;
|
list<boost::shared_ptr<Redirect> > copies;
|
||||||
|
|
||||||
for (list<Redirect*>::iterator i = redirects.begin(); i != redirects.end(); ++i) {
|
for (list<boost::shared_ptr<Redirect> >::iterator i = redirects.begin(); i != redirects.end(); ++i) {
|
||||||
|
|
||||||
Redirect* copy = Redirect::clone (**i);
|
boost::shared_ptr<Redirect> copy = Redirect::clone (*i);
|
||||||
|
|
||||||
copy->set_placement (_placement, this);
|
copy->set_placement (_placement, this);
|
||||||
copies.push_back (copy);
|
copies.push_back (copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_route.add_redirects (copies, this)) {
|
if (_route->add_redirects (copies, this)) {
|
||||||
for (list<Redirect*>::iterator i = copies.begin(); i != copies.end(); ++i) {
|
|
||||||
delete *i;
|
|
||||||
}
|
|
||||||
|
|
||||||
string msg = _(
|
string msg = _(
|
||||||
"Copying the set of redirects on the clipboard failed,\n\
|
"Copying the set of redirects on the clipboard failed,\n\
|
||||||
|
|
@ -832,19 +827,19 @@ could not match the configuration of this track.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::activate_redirect (Redirect *r)
|
RedirectBox::activate_redirect (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
r->set_active (true, 0);
|
r->set_active (true, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::deactivate_redirect (Redirect *r)
|
RedirectBox::deactivate_redirect (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
r->set_active (false, 0);
|
r->set_active (false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::get_selected_redirects (vector<Redirect*>& redirects)
|
RedirectBox::get_selected_redirects (vector<boost::shared_ptr<Redirect> >& redirects)
|
||||||
{
|
{
|
||||||
vector<Gtk::TreeModel::Path> pathlist = redirect_display.get_selection()->get_selected_rows();
|
vector<Gtk::TreeModel::Path> pathlist = redirect_display.get_selection()->get_selected_rows();
|
||||||
|
|
||||||
|
|
@ -853,12 +848,12 @@ RedirectBox::get_selected_redirects (vector<Redirect*>& redirects)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::for_selected_redirects (void (RedirectBox::*pmf)(Redirect*))
|
RedirectBox::for_selected_redirects (void (RedirectBox::*pmf)(boost::shared_ptr<Redirect>))
|
||||||
{
|
{
|
||||||
vector<Gtk::TreeModel::Path> pathlist = redirect_display.get_selection()->get_selected_rows();
|
vector<Gtk::TreeModel::Path> pathlist = redirect_display.get_selection()->get_selected_rows();
|
||||||
|
|
||||||
for (vector<Gtk::TreeModel::Path>::iterator iter = pathlist.begin(); iter != pathlist.end(); ++iter) {
|
for (vector<Gtk::TreeModel::Path>::iterator iter = pathlist.begin(); iter != pathlist.end(); ++iter) {
|
||||||
Redirect* redirect = (*(model->get_iter(*iter)))[columns.redirect];
|
boost::shared_ptr<Redirect> redirect = (*(model->get_iter(*iter)))[columns.redirect];
|
||||||
(this->*pmf)(redirect);
|
(this->*pmf)(redirect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -869,7 +864,7 @@ RedirectBox::clone_redirects ()
|
||||||
RouteSelection& routes (_rr_selection.routes);
|
RouteSelection& routes (_rr_selection.routes);
|
||||||
|
|
||||||
if (!routes.empty()) {
|
if (!routes.empty()) {
|
||||||
if (_route.copy_redirects (*routes.front(), _placement)) {
|
if (_route->copy_redirects (*routes.front(), _placement)) {
|
||||||
string msg = _(
|
string msg = _(
|
||||||
"Copying the set of redirects on the clipboard failed,\n\
|
"Copying the set of redirects on the clipboard failed,\n\
|
||||||
probably because the I/O configuration of the plugins\n\
|
probably because the I/O configuration of the plugins\n\
|
||||||
|
|
@ -883,7 +878,7 @@ could not match the configuration of this track.");
|
||||||
void
|
void
|
||||||
RedirectBox::all_redirects_active (bool state)
|
RedirectBox::all_redirects_active (bool state)
|
||||||
{
|
{
|
||||||
_route.all_redirects_active (state);
|
_route->all_redirects_active (state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -892,7 +887,7 @@ RedirectBox::clear_redirects()
|
||||||
string prompt;
|
string prompt;
|
||||||
vector<string> choices;
|
vector<string> choices;
|
||||||
|
|
||||||
if (dynamic_cast<AudioTrack*>(&_route) != 0) {
|
if (boost::dynamic_pointer_cast<AudioTrack>(_route) != 0) {
|
||||||
prompt = _("Do you really want to remove all redirects from this track?\n"
|
prompt = _("Do you really want to remove all redirects from this track?\n"
|
||||||
"(this cannot be undone)");
|
"(this cannot be undone)");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -906,23 +901,23 @@ RedirectBox::clear_redirects()
|
||||||
Gtkmm2ext::Choice prompter (prompt, choices);
|
Gtkmm2ext::Choice prompter (prompt, choices);
|
||||||
|
|
||||||
if (prompter.run () == 1) {
|
if (prompter.run () == 1) {
|
||||||
_route.clear_redirects (this);
|
_route->clear_redirects (this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RedirectBox::edit_redirect (Redirect* redirect)
|
RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
|
||||||
{
|
{
|
||||||
Insert *insert;
|
boost::shared_ptr<Insert> insert;
|
||||||
|
|
||||||
if (dynamic_cast<AudioTrack*>(&_route) != 0) {
|
if (boost::dynamic_pointer_cast<AudioTrack>(_route) != 0) {
|
||||||
|
|
||||||
if (dynamic_cast<AudioTrack*> (&_route)->freeze_state() == AudioTrack::Frozen) {
|
if (boost::dynamic_pointer_cast<AudioTrack> (_route)->freeze_state() == AudioTrack::Frozen) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((insert = dynamic_cast<Insert *> (redirect)) == 0) {
|
if ((insert = boost::dynamic_pointer_cast<Insert> (redirect)) == 0) {
|
||||||
|
|
||||||
/* its a send */
|
/* its a send */
|
||||||
|
|
||||||
|
|
@ -930,7 +925,7 @@ RedirectBox::edit_redirect (Redirect* redirect)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Send *send = dynamic_cast<Send*> (redirect);
|
boost::shared_ptr<Send> send = boost::dynamic_pointer_cast<Send> (redirect);
|
||||||
|
|
||||||
SendUIWindow *send_ui;
|
SendUIWindow *send_ui;
|
||||||
|
|
||||||
|
|
@ -939,7 +934,7 @@ RedirectBox::edit_redirect (Redirect* redirect)
|
||||||
string title;
|
string title;
|
||||||
title = string_compose(_("ardour: %1"), send->name());
|
title = string_compose(_("ardour: %1"), send->name());
|
||||||
|
|
||||||
send_ui = new SendUIWindow (*send, _session);
|
send_ui = new SendUIWindow (send, _session);
|
||||||
send_ui->set_title (title);
|
send_ui->set_title (title);
|
||||||
send->set_gui (send_ui);
|
send->set_gui (send_ui);
|
||||||
|
|
||||||
|
|
@ -957,17 +952,17 @@ RedirectBox::edit_redirect (Redirect* redirect)
|
||||||
|
|
||||||
/* its an insert */
|
/* its an insert */
|
||||||
|
|
||||||
PluginInsert *plugin_insert;
|
boost::shared_ptr<PluginInsert> plugin_insert;
|
||||||
PortInsert *port_insert;
|
boost::shared_ptr<PortInsert> port_insert;
|
||||||
|
|
||||||
if ((plugin_insert = dynamic_cast<PluginInsert *> (insert)) != 0) {
|
if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (insert)) != 0) {
|
||||||
|
|
||||||
PluginUIWindow *plugin_ui;
|
PluginUIWindow *plugin_ui;
|
||||||
|
|
||||||
if (plugin_insert->get_gui() == 0) {
|
if (plugin_insert->get_gui() == 0) {
|
||||||
|
|
||||||
string title;
|
string title;
|
||||||
string maker = plugin_insert->plugin().maker();
|
string maker = plugin_insert->plugin()->maker();
|
||||||
string::size_type email_pos;
|
string::size_type email_pos;
|
||||||
|
|
||||||
if ((email_pos = maker.find_first_of ('<')) != string::npos) {
|
if ((email_pos = maker.find_first_of ('<')) != string::npos) {
|
||||||
|
|
@ -979,9 +974,9 @@ RedirectBox::edit_redirect (Redirect* redirect)
|
||||||
maker += " ...";
|
maker += " ...";
|
||||||
}
|
}
|
||||||
|
|
||||||
title = string_compose(_("ardour: %1: %2 (by %3)"), _route.name(), plugin_insert->name(), maker);
|
title = string_compose(_("ardour: %1: %2 (by %3)"), _route->name(), plugin_insert->name(), maker);
|
||||||
|
|
||||||
plugin_ui = new PluginUIWindow (_session.engine(), *plugin_insert);
|
plugin_ui = new PluginUIWindow (_session.engine(), plugin_insert);
|
||||||
if (_owner_is_mixer) {
|
if (_owner_is_mixer) {
|
||||||
ARDOUR_UI::instance()->the_mixer()->ensure_float (*plugin_ui);
|
ARDOUR_UI::instance()->the_mixer()->ensure_float (*plugin_ui);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1000,7 +995,7 @@ RedirectBox::edit_redirect (Redirect* redirect)
|
||||||
plugin_ui->show_all ();
|
plugin_ui->show_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ((port_insert = dynamic_cast<PortInsert *> (insert)) != 0) {
|
} else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (insert)) != 0) {
|
||||||
|
|
||||||
if (!_session.engine().connected()) {
|
if (!_session.engine().connected()) {
|
||||||
MessageDialog msg ( _("Not connected to JACK - no I/O changes are possible"));
|
MessageDialog msg ( _("Not connected to JACK - no I/O changes are possible"));
|
||||||
|
|
@ -1011,7 +1006,7 @@ RedirectBox::edit_redirect (Redirect* redirect)
|
||||||
PortInsertWindow *io_selector;
|
PortInsertWindow *io_selector;
|
||||||
|
|
||||||
if (port_insert->get_gui() == 0) {
|
if (port_insert->get_gui() == 0) {
|
||||||
io_selector = new PortInsertWindow (_session, *port_insert);
|
io_selector = new PortInsertWindow (_session, port_insert);
|
||||||
port_insert->set_gui (io_selector);
|
port_insert->set_gui (io_selector);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,8 @@ namespace ARDOUR {
|
||||||
class RedirectBox : public Gtk::HBox
|
class RedirectBox : public Gtk::HBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RedirectBox (ARDOUR::Placement, ARDOUR::Session&, ARDOUR::Route &, PluginSelector &, RouteRedirectSelection &, bool owner_is_mixer = false);
|
RedirectBox (ARDOUR::Placement, ARDOUR::Session&,
|
||||||
|
boost::shared_ptr<ARDOUR::Route>, PluginSelector &, RouteRedirectSelection &, bool owner_is_mixer = false);
|
||||||
~RedirectBox ();
|
~RedirectBox ();
|
||||||
|
|
||||||
void set_width (Width);
|
void set_width (Width);
|
||||||
|
|
@ -78,8 +79,8 @@ class RedirectBox : public Gtk::HBox
|
||||||
void select_all_inserts ();
|
void select_all_inserts ();
|
||||||
void select_all_sends ();
|
void select_all_sends ();
|
||||||
|
|
||||||
sigc::signal<void,ARDOUR::Redirect *> RedirectSelected;
|
sigc::signal<void,boost::shared_ptr<ARDOUR::Redirect> > RedirectSelected;
|
||||||
sigc::signal<void,ARDOUR::Redirect *> RedirectUnselected;
|
sigc::signal<void,boost::shared_ptr<ARDOUR::Redirect> > RedirectUnselected;
|
||||||
|
|
||||||
static void register_actions();
|
static void register_actions();
|
||||||
|
|
||||||
|
|
@ -87,7 +88,7 @@ class RedirectBox : public Gtk::HBox
|
||||||
void set_stuff_from_route ();
|
void set_stuff_from_route ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ARDOUR::Route & _route;
|
boost::shared_ptr<ARDOUR::Route> _route;
|
||||||
ARDOUR::Session & _session;
|
ARDOUR::Session & _session;
|
||||||
bool _owner_is_mixer;
|
bool _owner_is_mixer;
|
||||||
|
|
||||||
|
|
@ -103,7 +104,7 @@ class RedirectBox : public Gtk::HBox
|
||||||
add (color);
|
add (color);
|
||||||
}
|
}
|
||||||
Gtk::TreeModelColumn<std::string> text;
|
Gtk::TreeModelColumn<std::string> text;
|
||||||
Gtk::TreeModelColumn<ARDOUR::Redirect*> redirect;
|
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Redirect> > redirect;
|
||||||
Gtk::TreeModelColumn<Gdk::Color> color;
|
Gtk::TreeModelColumn<Gdk::Color> color;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -138,24 +139,29 @@ class RedirectBox : public Gtk::HBox
|
||||||
void show_redirect_menu (gint arg);
|
void show_redirect_menu (gint arg);
|
||||||
|
|
||||||
void choose_send ();
|
void choose_send ();
|
||||||
void send_io_finished (IOSelector::Result, ARDOUR::Redirect*, IOSelectorWindow*);
|
void send_io_finished (IOSelector::Result, boost::shared_ptr<ARDOUR::Redirect>, IOSelectorWindow*);
|
||||||
void choose_insert ();
|
void choose_insert ();
|
||||||
void choose_plugin ();
|
void choose_plugin ();
|
||||||
void insert_plugin_chosen (ARDOUR::Plugin *);
|
void insert_plugin_chosen (boost::shared_ptr<ARDOUR::Plugin>);
|
||||||
|
|
||||||
bool no_redirect_redisplay;
|
bool no_redirect_redisplay;
|
||||||
bool ignore_delete;
|
bool ignore_delete;
|
||||||
|
|
||||||
bool redirect_button_press_event (GdkEventButton *);
|
bool redirect_button_press_event (GdkEventButton *);
|
||||||
void redisplay_redirects (void* src);
|
void redisplay_redirects (void* src);
|
||||||
void show_redirect_active (ARDOUR::Redirect *, void *);
|
void add_redirect_to_display (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void show_redirect_name (void*, ARDOUR::Redirect *);
|
|
||||||
void add_redirect_to_display (ARDOUR::Redirect *);
|
|
||||||
void row_deleted (const Gtk::TreeModel::Path& path);
|
void row_deleted (const Gtk::TreeModel::Path& path);
|
||||||
|
void show_redirect_name (void*, boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
string redirect_name (ARDOUR::Redirect&);
|
/* these are handlers for Redirect signals, so they take Redirect*
|
||||||
|
directly, rather than shared_ptr<Redirect>
|
||||||
|
*/
|
||||||
|
|
||||||
void remove_redirect_gui (ARDOUR::Redirect *);
|
void show_redirect_active (ARDOUR::Redirect*, void *);
|
||||||
|
|
||||||
|
string redirect_name (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
|
void remove_redirect_gui (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
void redirects_reordered (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&, int*);
|
void redirects_reordered (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&, int*);
|
||||||
void compute_redirect_sort_keys ();
|
void compute_redirect_sort_keys ();
|
||||||
|
|
@ -174,23 +180,23 @@ class RedirectBox : public Gtk::HBox
|
||||||
void clone_redirects ();
|
void clone_redirects ();
|
||||||
void rename_redirects ();
|
void rename_redirects ();
|
||||||
|
|
||||||
void for_selected_redirects (void (RedirectBox::*pmf)(ARDOUR::Redirect*));
|
void for_selected_redirects (void (RedirectBox::*pmf)(boost::shared_ptr<ARDOUR::Redirect>));
|
||||||
void get_selected_redirects (vector<ARDOUR::Redirect*>&);
|
void get_selected_redirects (vector<boost::shared_ptr<ARDOUR::Redirect> >&);
|
||||||
|
|
||||||
static Glib::RefPtr<Gtk::Action> paste_action;
|
static Glib::RefPtr<Gtk::Action> paste_action;
|
||||||
void paste_redirect_list (std::list<ARDOUR::Redirect*>& redirects);
|
void paste_redirect_list (std::list<boost::shared_ptr<ARDOUR::Redirect> >& redirects);
|
||||||
|
|
||||||
void activate_redirect (ARDOUR::Redirect*);
|
void activate_redirect (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void deactivate_redirect (ARDOUR::Redirect*);
|
void deactivate_redirect (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void cut_redirect (ARDOUR::Redirect*);
|
void cut_redirect (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void copy_redirect (ARDOUR::Redirect*);
|
void copy_redirect (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void edit_redirect (ARDOUR::Redirect*);
|
void edit_redirect (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void hide_redirect_editor (ARDOUR::Redirect*);
|
void hide_redirect_editor (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void rename_redirect (ARDOUR::Redirect*);
|
void rename_redirect (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
gint idle_delete_redirect (ARDOUR::Redirect *);
|
gint idle_delete_redirect (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
void wierd_plugin_dialog (ARDOUR::Plugin& p, uint32_t streams, ARDOUR::IO& io);
|
void wierd_plugin_dialog (ARDOUR::Plugin& p, uint32_t streams, boost::shared_ptr<ARDOUR::IO> io);
|
||||||
|
|
||||||
static RedirectBox* _current_redirect_box;
|
static RedirectBox* _current_redirect_box;
|
||||||
static bool enter_box (GdkEventCrossing*, RedirectBox*);
|
static bool enter_box (GdkEventCrossing*, RedirectBox*);
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,12 @@
|
||||||
#define __ardour_gtk_redirect_selection_h__
|
#define __ardour_gtk_redirect_selection_h__
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
class Redirect;
|
class Redirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct RedirectSelection : list<ARDOUR::Redirect*> {};
|
struct RedirectSelection : list<boost::shared_ptr<ARDOUR::Redirect> > {};
|
||||||
|
|
||||||
#endif /* __ardour_gtk_redirect_selection_h__ */
|
#endif /* __ardour_gtk_redirect_selection_h__ */
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,10 @@ using namespace sigc;
|
||||||
RouteParams_UI::RouteParams_UI (AudioEngine& eng)
|
RouteParams_UI::RouteParams_UI (AudioEngine& eng)
|
||||||
: ArdourDialog ("track/bus inspector"),
|
: ArdourDialog ("track/bus inspector"),
|
||||||
engine (eng),
|
engine (eng),
|
||||||
_route(0),
|
|
||||||
track_menu(0)
|
track_menu(0)
|
||||||
{
|
{
|
||||||
pre_redirect_box = 0;
|
pre_redirect_box = 0;
|
||||||
post_redirect_box = 0;
|
post_redirect_box = 0;
|
||||||
_route = 0;
|
|
||||||
_pre_redirect = 0;
|
|
||||||
_post_redirect = 0;
|
|
||||||
_input_iosel = 0;
|
_input_iosel = 0;
|
||||||
_output_iosel = 0;
|
_output_iosel = 0;
|
||||||
_active_pre_view = 0;
|
_active_pre_view = 0;
|
||||||
|
|
@ -163,7 +159,7 @@ RouteParams_UI::~RouteParams_UI ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteParams_UI::add_route (Route* route)
|
RouteParams_UI::add_route (boost::shared_ptr<Route> route)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::add_route), route));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::add_route), route));
|
||||||
|
|
||||||
|
|
@ -183,22 +179,22 @@ RouteParams_UI::add_route (Route* route)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteParams_UI::route_name_changed (void *src, Route *route)
|
RouteParams_UI::route_name_changed (void *src, boost::shared_ptr<Route> route)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::route_name_changed), src, route));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::route_name_changed), src, route));
|
||||||
|
|
||||||
bool found = false ;
|
bool found = false ;
|
||||||
TreeModel::Children rows = route_display_model->children();
|
TreeModel::Children rows = route_display_model->children();
|
||||||
for(TreeModel::Children::iterator iter = rows.begin(); iter != rows.end(); ++iter) {
|
for(TreeModel::Children::iterator iter = rows.begin(); iter != rows.end(); ++iter) {
|
||||||
if((*iter)[route_display_columns.route] == route) {
|
boost::shared_ptr<Route> r =(*iter)[route_display_columns.route];
|
||||||
|
if (r == route) {
|
||||||
(*iter)[route_display_columns.text] = route->name() ;
|
(*iter)[route_display_columns.text] = route->name() ;
|
||||||
found = true ;
|
found = true ;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!found)
|
if(!found) {
|
||||||
{
|
|
||||||
error << _("route display list item for renamed route not found!") << endmsg;
|
error << _("route display list item for renamed route not found!") << endmsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -217,8 +213,8 @@ RouteParams_UI::setup_redirect_boxes()
|
||||||
cleanup_redirect_boxes();
|
cleanup_redirect_boxes();
|
||||||
|
|
||||||
// construct new redirect boxes
|
// construct new redirect boxes
|
||||||
pre_redirect_box = new RedirectBox(PreFader, *session, *_route, *_plugin_selector, _rr_selection);
|
pre_redirect_box = new RedirectBox(PreFader, *session, _route, *_plugin_selector, _rr_selection);
|
||||||
post_redirect_box = new RedirectBox(PostFader, *session, *_route, *_plugin_selector, _rr_selection);
|
post_redirect_box = new RedirectBox(PostFader, *session, _route, *_plugin_selector, _rr_selection);
|
||||||
|
|
||||||
pre_redir_hpane.pack1 (*pre_redirect_box);
|
pre_redir_hpane.pack1 (*pre_redirect_box);
|
||||||
post_redir_hpane.pack1 (*post_redirect_box);
|
post_redir_hpane.pack1 (*post_redirect_box);
|
||||||
|
|
@ -256,13 +252,13 @@ RouteParams_UI::setup_io_frames()
|
||||||
cleanup_io_frames();
|
cleanup_io_frames();
|
||||||
|
|
||||||
// input
|
// input
|
||||||
_input_iosel = new IOSelector (*session, *_route, true);
|
_input_iosel = new IOSelector (*session, _route, true);
|
||||||
_input_iosel->redisplay ();
|
_input_iosel->redisplay ();
|
||||||
input_frame.add (*_input_iosel);
|
input_frame.add (*_input_iosel);
|
||||||
input_frame.show_all();
|
input_frame.show_all();
|
||||||
|
|
||||||
// output
|
// output
|
||||||
_output_iosel = new IOSelector (*session, *_route, false);
|
_output_iosel = new IOSelector (*session, _route, false);
|
||||||
_output_iosel->redisplay ();
|
_output_iosel->redisplay ();
|
||||||
output_frame.add (*_output_iosel);
|
output_frame.add (*_output_iosel);
|
||||||
output_frame.show_all();
|
output_frame.show_all();
|
||||||
|
|
@ -322,36 +318,31 @@ RouteParams_UI::cleanup_post_view (bool stopupdate)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteParams_UI::route_removed (Route *route)
|
RouteParams_UI::route_removed (boost::shared_ptr<Route> route)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::route_removed), route));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::route_removed), route));
|
||||||
/*
|
|
||||||
route_select_list.freeze ();
|
|
||||||
route_select_list.clear ();
|
|
||||||
session->foreach_route (this, &RouteParams_UI::add_route);
|
|
||||||
route_select_list.thaw ();
|
|
||||||
*/
|
|
||||||
|
|
||||||
TreeModel::Children rows = route_display_model->children();
|
TreeModel::Children rows = route_display_model->children();
|
||||||
TreeModel::Children::iterator ri;
|
TreeModel::Children::iterator ri;
|
||||||
|
|
||||||
for(TreeModel::Children::iterator iter = rows.begin(); iter != rows.end(); ++iter) {
|
for(TreeModel::Children::iterator iter = rows.begin(); iter != rows.end(); ++iter) {
|
||||||
if((*iter)[route_display_columns.route] == route) {
|
boost::shared_ptr<Route> r =(*iter)[route_display_columns.route];
|
||||||
|
|
||||||
|
if (r == route) {
|
||||||
route_display_model->erase(iter);
|
route_display_model->erase(iter);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (route == _route)
|
if (route == _route) {
|
||||||
{
|
|
||||||
cleanup_io_frames();
|
cleanup_io_frames();
|
||||||
cleanup_pre_view();
|
cleanup_pre_view();
|
||||||
cleanup_post_view();
|
cleanup_post_view();
|
||||||
cleanup_redirect_boxes();
|
cleanup_redirect_boxes();
|
||||||
|
|
||||||
_route = 0;
|
_route.reset ((Route*) 0);
|
||||||
_pre_redirect = 0;
|
_pre_redirect.reset ((Redirect*) 0);
|
||||||
_post_redirect = 0;
|
_post_redirect.reset ((Redirect*) 0);
|
||||||
update_title();
|
update_title();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -390,9 +381,9 @@ RouteParams_UI::session_gone ()
|
||||||
cleanup_post_view();
|
cleanup_post_view();
|
||||||
cleanup_redirect_boxes();
|
cleanup_redirect_boxes();
|
||||||
|
|
||||||
_route = 0;
|
_route.reset ((Route*) 0);
|
||||||
_pre_redirect = 0;
|
_pre_redirect.reset ((Redirect*) 0);
|
||||||
_post_redirect = 0;
|
_post_redirect.reset ((Redirect*) 0);
|
||||||
update_title();
|
update_title();
|
||||||
|
|
||||||
ArdourDialog::session_gone();
|
ArdourDialog::session_gone();
|
||||||
|
|
@ -406,7 +397,7 @@ RouteParams_UI::route_selected()
|
||||||
TreeModel::iterator iter = selection->get_selected(); // only used with Gtk::SELECTION_SINGLE
|
TreeModel::iterator iter = selection->get_selected(); // only used with Gtk::SELECTION_SINGLE
|
||||||
if(iter) {
|
if(iter) {
|
||||||
//If anything is selected
|
//If anything is selected
|
||||||
Route* route = (*iter)[route_display_columns.route] ;
|
boost::shared_ptr<Route> route = (*iter)[route_display_columns.route] ;
|
||||||
|
|
||||||
if (_route == route) {
|
if (_route == route) {
|
||||||
// do nothing
|
// do nothing
|
||||||
|
|
@ -447,9 +438,9 @@ RouteParams_UI::route_selected()
|
||||||
cleanup_post_view();
|
cleanup_post_view();
|
||||||
cleanup_redirect_boxes();
|
cleanup_redirect_boxes();
|
||||||
|
|
||||||
_route = 0;
|
_route.reset ((Route*) 0);
|
||||||
_pre_redirect = 0;
|
_pre_redirect.reset ((Redirect*) 0);
|
||||||
_post_redirect = 0;
|
_post_redirect.reset ((Redirect *) 0);
|
||||||
track_input_label.set_text(_("NO TRACK"));
|
track_input_label.set_text(_("NO TRACK"));
|
||||||
update_title();
|
update_title();
|
||||||
}
|
}
|
||||||
|
|
@ -468,7 +459,7 @@ RouteParams_UI::route_selected()
|
||||||
// cleanup_post_view();
|
// cleanup_post_view();
|
||||||
// cleanup_redirect_boxes();
|
// cleanup_redirect_boxes();
|
||||||
|
|
||||||
// _route = 0;
|
// _route.reset ((Route*)0);
|
||||||
// _pre_redirect = 0;
|
// _pre_redirect = 0;
|
||||||
// _post_redirect = 0;
|
// _post_redirect = 0;
|
||||||
// track_input_label.set_text(_("NO TRACK"));
|
// track_input_label.set_text(_("NO TRACK"));
|
||||||
|
|
@ -495,8 +486,8 @@ RouteParams_UI::redirects_changed (void *src)
|
||||||
cleanup_pre_view();
|
cleanup_pre_view();
|
||||||
cleanup_post_view();
|
cleanup_post_view();
|
||||||
|
|
||||||
_pre_redirect = 0;
|
_pre_redirect.reset ((Redirect*) 0);
|
||||||
_post_redirect = 0;
|
_post_redirect.reset ((Redirect*) 0);
|
||||||
//update_title();
|
//update_title();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -520,24 +511,24 @@ RouteParams_UI::show_track_menu()
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement place)
|
RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Redirect> redirect, ARDOUR::Placement place)
|
||||||
{
|
{
|
||||||
Insert *insert;
|
boost::shared_ptr<Insert> insert;
|
||||||
|
|
||||||
if ((place == PreFader && _pre_redirect == redirect)
|
if ((place == PreFader && _pre_redirect == redirect)
|
||||||
|| (place == PostFader && _post_redirect == redirect)){
|
|| (place == PostFader && _post_redirect == redirect)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((insert = dynamic_cast<Insert *> (redirect)) == 0) {
|
if ((insert = boost::dynamic_pointer_cast<Insert> (redirect)) == 0) {
|
||||||
|
|
||||||
Send *send;
|
boost::shared_ptr<Send> send;
|
||||||
|
|
||||||
if ((send = dynamic_cast<Send *> (redirect)) != 0) {
|
if ((send = boost::dynamic_pointer_cast<Send> (redirect)) != 0) {
|
||||||
|
|
||||||
/* its a send */
|
/* its a send */
|
||||||
|
|
||||||
SendUI *send_ui = new SendUI (*send, *session);
|
SendUI *send_ui = new SendUI (send, *session);
|
||||||
|
|
||||||
if (place == PreFader) {
|
if (place == PreFader) {
|
||||||
cleanup_pre_view();
|
cleanup_pre_view();
|
||||||
|
|
@ -560,16 +551,16 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement
|
||||||
} else {
|
} else {
|
||||||
/* its an insert, though we don't know what kind yet. */
|
/* its an insert, though we don't know what kind yet. */
|
||||||
|
|
||||||
PluginInsert *plugin_insert;
|
boost::shared_ptr<PluginInsert> plugin_insert;
|
||||||
PortInsert *port_insert;
|
boost::shared_ptr<PortInsert> port_insert;
|
||||||
|
|
||||||
if ((plugin_insert = dynamic_cast<PluginInsert *> (insert)) != 0) {
|
if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (insert)) != 0) {
|
||||||
|
|
||||||
PluginUI *plugin_ui = new PluginUI (session->engine(), *plugin_insert, true);
|
PluginUI *plugin_ui = new PluginUI (session->engine(), plugin_insert, true);
|
||||||
|
|
||||||
if (place == PreFader) {
|
if (place == PreFader) {
|
||||||
cleanup_pre_view();
|
cleanup_pre_view();
|
||||||
_pre_plugin_conn = plugin_insert->plugin().GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PreFader));
|
_pre_plugin_conn = plugin_insert->plugin()->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PreFader));
|
||||||
plugin_ui->start_updating (0);
|
plugin_ui->start_updating (0);
|
||||||
_active_pre_view = plugin_ui;
|
_active_pre_view = plugin_ui;
|
||||||
pre_redir_hpane.pack2 (*_active_pre_view);
|
pre_redir_hpane.pack2 (*_active_pre_view);
|
||||||
|
|
@ -577,16 +568,16 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cleanup_post_view();
|
cleanup_post_view();
|
||||||
_post_plugin_conn = plugin_insert->plugin().GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PostFader));
|
_post_plugin_conn = plugin_insert->plugin()->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PostFader));
|
||||||
plugin_ui->start_updating (0);
|
plugin_ui->start_updating (0);
|
||||||
_active_post_view = plugin_ui;
|
_active_post_view = plugin_ui;
|
||||||
post_redir_hpane.pack2 (*_active_post_view);
|
post_redir_hpane.pack2 (*_active_post_view);
|
||||||
post_redir_hpane.show_all();
|
post_redir_hpane.show_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ((port_insert = dynamic_cast<PortInsert *> (insert)) != 0) {
|
} else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (insert)) != 0) {
|
||||||
|
|
||||||
PortInsertUI *portinsert_ui = new PortInsertUI (*session, *port_insert);
|
PortInsertUI *portinsert_ui = new PortInsertUI (*session, port_insert);
|
||||||
|
|
||||||
if (place == PreFader) {
|
if (place == PreFader) {
|
||||||
cleanup_pre_view();
|
cleanup_pre_view();
|
||||||
|
|
@ -610,8 +601,7 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement
|
||||||
|
|
||||||
if (place == PreFader) {
|
if (place == PreFader) {
|
||||||
_pre_redirect = redirect;
|
_pre_redirect = redirect;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
_post_redirect = redirect;
|
_post_redirect = redirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -619,23 +609,6 @@ RouteParams_UI::redirect_selected (ARDOUR::Redirect *redirect, ARDOUR::Placement
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
RouteParams_UI::redirect_unselected (ARDOUR::Redirect *redirect)
|
|
||||||
{
|
|
||||||
// not called anymore
|
|
||||||
|
|
||||||
if (redirect == _pre_redirect) {
|
|
||||||
cleanup_pre_view();
|
|
||||||
_pre_redirect = 0;
|
|
||||||
}
|
|
||||||
else if (redirect == _post_redirect) {
|
|
||||||
cleanup_post_view();
|
|
||||||
_post_redirect = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteParams_UI::plugin_going_away (Plugin *plugin, Placement place)
|
RouteParams_UI::plugin_going_away (Plugin *plugin, Placement place)
|
||||||
{
|
{
|
||||||
|
|
@ -645,11 +618,11 @@ RouteParams_UI::plugin_going_away (Plugin *plugin, Placement place)
|
||||||
|
|
||||||
if (place == PreFader) {
|
if (place == PreFader) {
|
||||||
cleanup_pre_view (false);
|
cleanup_pre_view (false);
|
||||||
_pre_redirect = 0;
|
_pre_redirect.reset ((Redirect*) 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cleanup_post_view (false);
|
cleanup_post_view (false);
|
||||||
_post_redirect = 0;
|
_post_redirect.reset ((Redirect*) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -661,13 +634,13 @@ RouteParams_UI::redirect_going_away (ARDOUR::Redirect *plugin)
|
||||||
|
|
||||||
printf ("redirect going away\n");
|
printf ("redirect going away\n");
|
||||||
// delete the current view without calling finish
|
// delete the current view without calling finish
|
||||||
if (plugin == _pre_redirect) {
|
if (plugin == _pre_redirect.get()) {
|
||||||
cleanup_pre_view (false);
|
cleanup_pre_view (false);
|
||||||
_pre_redirect = 0;
|
_pre_redirect.reset ((Redirect*) 0);
|
||||||
}
|
}
|
||||||
else if (plugin == _post_redirect) {
|
else if (plugin == _post_redirect.get()) {
|
||||||
cleanup_post_view (false);
|
cleanup_post_view (false);
|
||||||
_post_redirect = 0;
|
_post_redirect.reset ((Redirect*) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,14 +121,14 @@ class RouteParams_UI : public ArdourDialog
|
||||||
PluginSelector *_plugin_selector;
|
PluginSelector *_plugin_selector;
|
||||||
RouteRedirectSelection _rr_selection;
|
RouteRedirectSelection _rr_selection;
|
||||||
|
|
||||||
ARDOUR::Route *_route;
|
boost::shared_ptr<ARDOUR::Route> _route;
|
||||||
sigc::connection _route_conn;
|
sigc::connection _route_conn;
|
||||||
sigc::connection _route_ds_conn;
|
sigc::connection _route_ds_conn;
|
||||||
|
|
||||||
ARDOUR::Redirect * _pre_redirect;
|
boost::shared_ptr<ARDOUR::Redirect> _pre_redirect;
|
||||||
sigc::connection _pre_plugin_conn;
|
sigc::connection _pre_plugin_conn;
|
||||||
|
|
||||||
ARDOUR::Redirect * _post_redirect;
|
boost::shared_ptr<ARDOUR::Redirect> _post_redirect;
|
||||||
sigc::connection _post_plugin_conn;
|
sigc::connection _post_plugin_conn;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -151,7 +151,7 @@ class RouteParams_UI : public ArdourDialog
|
||||||
add(route);
|
add(route);
|
||||||
}
|
}
|
||||||
Gtk::TreeModelColumn<Glib::ustring> text;
|
Gtk::TreeModelColumn<Glib::ustring> text;
|
||||||
Gtk::TreeModelColumn<ARDOUR::Route*> route;
|
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
|
||||||
};
|
};
|
||||||
|
|
||||||
RouteDisplayModelColumns route_display_columns ;
|
RouteDisplayModelColumns route_display_columns ;
|
||||||
|
|
@ -159,10 +159,10 @@ class RouteParams_UI : public ArdourDialog
|
||||||
Glib::RefPtr<Gtk::ListStore> route_display_model;
|
Glib::RefPtr<Gtk::ListStore> route_display_model;
|
||||||
|
|
||||||
|
|
||||||
void add_route (ARDOUR::Route*);
|
void add_route (boost::shared_ptr<ARDOUR::Route>);
|
||||||
|
|
||||||
void route_name_changed (void *src, ARDOUR::Route *route);
|
void route_name_changed (void *src, boost::shared_ptr<ARDOUR::Route> route);
|
||||||
void route_removed (ARDOUR::Route *route);
|
void route_removed (boost::shared_ptr<ARDOUR::Route> route);
|
||||||
|
|
||||||
|
|
||||||
void route_selected();
|
void route_selected();
|
||||||
|
|
@ -180,8 +180,7 @@ class RouteParams_UI : public ArdourDialog
|
||||||
void setup_redirect_boxes();
|
void setup_redirect_boxes();
|
||||||
void cleanup_redirect_boxes();
|
void cleanup_redirect_boxes();
|
||||||
|
|
||||||
void redirect_selected (ARDOUR::Redirect *, ARDOUR::Placement);
|
void redirect_selected (boost::shared_ptr<ARDOUR::Redirect>, ARDOUR::Placement);
|
||||||
void redirect_unselected (ARDOUR::Redirect *);
|
|
||||||
|
|
||||||
void plugin_going_away (ARDOUR::Plugin *foo, ARDOUR::Placement);
|
void plugin_going_away (ARDOUR::Plugin *foo, ARDOUR::Placement);
|
||||||
void redirect_going_away (ARDOUR::Redirect *foo);
|
void redirect_going_away (ARDOUR::Redirect *foo);
|
||||||
|
|
|
||||||
|
|
@ -61,17 +61,6 @@ RouteRedirectSelection::clear ()
|
||||||
void
|
void
|
||||||
RouteRedirectSelection::clear_redirects ()
|
RouteRedirectSelection::clear_redirects ()
|
||||||
{
|
{
|
||||||
for (RedirectSelection::iterator i = redirects.begin(); i != redirects.end(); ) {
|
|
||||||
RedirectSelection::iterator tmp;
|
|
||||||
|
|
||||||
tmp = i;
|
|
||||||
++tmp;
|
|
||||||
|
|
||||||
delete *i;
|
|
||||||
|
|
||||||
i = tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
redirects.clear ();
|
redirects.clear ();
|
||||||
RedirectsChanged ();
|
RedirectsChanged ();
|
||||||
}
|
}
|
||||||
|
|
@ -84,29 +73,32 @@ RouteRedirectSelection::clear_routes ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteRedirectSelection::add (Redirect* r)
|
RouteRedirectSelection::add (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
if (find (redirects.begin(), redirects.end(), r) == redirects.end()) {
|
if (find (redirects.begin(), redirects.end(), r) == redirects.end()) {
|
||||||
redirects.push_back (r);
|
redirects.push_back (r);
|
||||||
|
|
||||||
void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove;
|
// XXX SHAREDPTR FIXME
|
||||||
r->GoingAway.connect (mem_fun(*this, pmf));
|
// void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove;
|
||||||
|
// r->GoingAway.connect (mem_fun(*this, pmf));
|
||||||
|
|
||||||
RedirectsChanged();
|
RedirectsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteRedirectSelection::add (const vector<Redirect*>& rlist)
|
RouteRedirectSelection::add (const vector<boost::shared_ptr<Redirect> >& rlist)
|
||||||
{
|
{
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
|
||||||
for (vector<Redirect*>::const_iterator i = rlist.begin(); i != rlist.end(); ++i) {
|
for (vector<boost::shared_ptr<Redirect> >::const_iterator i = rlist.begin(); i != rlist.end(); ++i) {
|
||||||
if (find (redirects.begin(), redirects.end(), *i) == redirects.end()) {
|
if (find (redirects.begin(), redirects.end(), *i) == redirects.end()) {
|
||||||
redirects.push_back (*i);
|
redirects.push_back (*i);
|
||||||
|
|
||||||
void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove;
|
// XXX SHAREDPTR FIXME
|
||||||
(*i)->GoingAway.connect (mem_fun(*this, pmf));
|
|
||||||
|
//void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove;
|
||||||
|
// (*i)->GoingAway.connect (mem_fun(*this, pmf));
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -117,9 +109,9 @@ RouteRedirectSelection::add (const vector<Redirect*>& rlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteRedirectSelection::remove (Redirect* r)
|
RouteRedirectSelection::remove (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
list<Redirect*>::iterator i;
|
list<boost::shared_ptr<Redirect> >::iterator i;
|
||||||
if ((i = find (redirects.begin(), redirects.end(), r)) != redirects.end()) {
|
if ((i = find (redirects.begin(), redirects.end(), r)) != redirects.end()) {
|
||||||
redirects.erase (i);
|
redirects.erase (i);
|
||||||
RedirectsChanged ();
|
RedirectsChanged ();
|
||||||
|
|
@ -127,36 +119,37 @@ RouteRedirectSelection::remove (Redirect* r)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteRedirectSelection::set (Redirect *r)
|
RouteRedirectSelection::set (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
clear_redirects ();
|
clear_redirects ();
|
||||||
add (r);
|
add (r);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteRedirectSelection::set (const vector<Redirect*>& rlist)
|
RouteRedirectSelection::set (const vector<boost::shared_ptr<Redirect> >& rlist)
|
||||||
{
|
{
|
||||||
clear_redirects ();
|
clear_redirects ();
|
||||||
add (rlist);
|
add (rlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteRedirectSelection::add (Route* r)
|
RouteRedirectSelection::add (boost::shared_ptr<Route> r)
|
||||||
{
|
{
|
||||||
if (find (routes.begin(), routes.end(), r) == routes.end()) {
|
if (find (routes.begin(), routes.end(), r) == routes.end()) {
|
||||||
routes.push_back (r);
|
routes.push_back (r);
|
||||||
|
|
||||||
void (RouteRedirectSelection::*pmf)(Route*) = &RouteRedirectSelection::remove;
|
// XXX SHAREDPTR FIXME
|
||||||
r->GoingAway.connect (bind (mem_fun(*this, pmf), r));
|
// void (RouteRedirectSelection::*pmf)(Route*) = &RouteRedirectSelection::remove;
|
||||||
|
// r->GoingAway.connect (bind (mem_fun(*this, pmf), r));
|
||||||
|
|
||||||
RoutesChanged();
|
RoutesChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteRedirectSelection::remove (Route* r)
|
RouteRedirectSelection::remove (boost::shared_ptr<Route> r)
|
||||||
{
|
{
|
||||||
list<Route*>::iterator i;
|
list<boost::shared_ptr<Route> >::iterator i;
|
||||||
if ((i = find (routes.begin(), routes.end(), r)) != routes.end()) {
|
if ((i = find (routes.begin(), routes.end(), r)) != routes.end()) {
|
||||||
routes.erase (i);
|
routes.erase (i);
|
||||||
RoutesChanged ();
|
RoutesChanged ();
|
||||||
|
|
@ -164,16 +157,16 @@ RouteRedirectSelection::remove (Route* r)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteRedirectSelection::set (Route *r)
|
RouteRedirectSelection::set (boost::shared_ptr<Route> r)
|
||||||
{
|
{
|
||||||
clear_routes ();
|
clear_routes ();
|
||||||
add (r);
|
add (r);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RouteRedirectSelection::selected (Route* ms)
|
RouteRedirectSelection::selected (boost::shared_ptr<Route> r)
|
||||||
{
|
{
|
||||||
return find (routes.begin(), routes.end(), ms) != routes.end();
|
return find (routes.begin(), routes.end(), r) != routes.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -43,20 +43,20 @@ class RouteRedirectSelection : public sigc::trackable
|
||||||
void clear ();
|
void clear ();
|
||||||
bool empty();
|
bool empty();
|
||||||
|
|
||||||
void set (ARDOUR::Redirect*);
|
void set (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void set (const std::vector<ARDOUR::Redirect*>&);
|
void set (const std::vector<boost::shared_ptr<ARDOUR::Redirect> >&);
|
||||||
void add (ARDOUR::Redirect*);
|
void add (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void add (const std::vector<ARDOUR::Redirect*>&);
|
void add (const std::vector<boost::shared_ptr<ARDOUR::Redirect> >&);
|
||||||
void remove (ARDOUR::Redirect*);
|
void remove (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
void set (ARDOUR::Route*);
|
void set (boost::shared_ptr<ARDOUR::Route>);
|
||||||
void add (ARDOUR::Route*);
|
void add (boost::shared_ptr<ARDOUR::Route>);
|
||||||
void remove (ARDOUR::Route*);
|
void remove (boost::shared_ptr<ARDOUR::Route>);
|
||||||
|
|
||||||
void clear_redirects ();
|
void clear_redirects ();
|
||||||
void clear_routes ();
|
void clear_routes ();
|
||||||
|
|
||||||
bool selected (ARDOUR::Route*);
|
bool selected (boost::shared_ptr<ARDOUR::Route>);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool operator==(const RouteRedirectSelection& a, const RouteRedirectSelection& b);
|
bool operator==(const RouteRedirectSelection& a, const RouteRedirectSelection& b);
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
#ifndef __ardour_gtk_route_selection_h__
|
#ifndef __ardour_gtk_route_selection_h__
|
||||||
#define __ardour_gtk_route_selection_h__
|
#define __ardour_gtk_route_selection_h__
|
||||||
|
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
class Route;
|
class Route;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct RouteSelection : list<ARDOUR::Route*> {};
|
struct RouteSelection : std::list<boost::shared_ptr<ARDOUR::Route> > {};
|
||||||
|
|
||||||
#endif /* __ardour_gtk_route_selection_h__ */
|
#endif /* __ardour_gtk_route_selection_h__ */
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ using namespace Gtk;
|
||||||
using namespace Editing;
|
using namespace Editing;
|
||||||
|
|
||||||
|
|
||||||
RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, Route& rt, Canvas& canvas)
|
RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::shared_ptr<Route> rt, Canvas& canvas)
|
||||||
: AxisView(sess),
|
: AxisView(sess),
|
||||||
RouteUI(rt, sess, _("m"), _("s"), _("r")), // mute, solo, and record
|
RouteUI(rt, sess, _("m"), _("s"), _("r")), // mute, solo, and record
|
||||||
TimeAxisView(sess,ed,(TimeAxisView*) 0, canvas),
|
TimeAxisView(sess,ed,(TimeAxisView*) 0, canvas),
|
||||||
|
|
@ -98,8 +98,6 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
|
||||||
timestretch_rect = 0;
|
timestretch_rect = 0;
|
||||||
no_redraw = false;
|
no_redraw = false;
|
||||||
|
|
||||||
//view = new AudioStreamView (*this);
|
|
||||||
|
|
||||||
ignore_toggle = false;
|
ignore_toggle = false;
|
||||||
|
|
||||||
mute_button->set_active (false);
|
mute_button->set_active (false);
|
||||||
|
|
@ -189,11 +187,11 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
|
||||||
//reset_redirect_automation_curves ();
|
//reset_redirect_automation_curves ();
|
||||||
y_position = -1;
|
y_position = -1;
|
||||||
|
|
||||||
_route.mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
|
_route->mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
|
||||||
_route.solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
_route->solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
||||||
//_route.redirects_changed.connect (mem_fun(*this, &RouteTimeAxisView::redirects_changed));
|
_route->redirects_changed.connect (mem_fun(*this, &RouteTimeAxisView::redirects_changed));
|
||||||
_route.name_changed.connect (mem_fun(*this, &RouteTimeAxisView::route_name_changed));
|
_route->name_changed.connect (mem_fun(*this, &RouteTimeAxisView::route_name_changed));
|
||||||
_route.solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
_route->solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
||||||
|
|
||||||
if (is_track()) {
|
if (is_track()) {
|
||||||
|
|
||||||
|
|
@ -257,7 +255,7 @@ gint
|
||||||
RouteTimeAxisView::edit_click (GdkEventButton *ev)
|
RouteTimeAxisView::edit_click (GdkEventButton *ev)
|
||||||
{
|
{
|
||||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||||
_route.set_edit_group (0, this);
|
_route->set_edit_group (0, this);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -270,7 +268,7 @@ RouteTimeAxisView::edit_click (GdkEventButton *ev)
|
||||||
items.push_back (RadioMenuElem (group, _("No group"),
|
items.push_back (RadioMenuElem (group, _("No group"),
|
||||||
bind (mem_fun(*this, &RouteTimeAxisView::set_edit_group_from_menu), (RouteGroup *) 0)));
|
bind (mem_fun(*this, &RouteTimeAxisView::set_edit_group_from_menu), (RouteGroup *) 0)));
|
||||||
|
|
||||||
if (_route.edit_group() == 0) {
|
if (_route->edit_group() == 0) {
|
||||||
static_cast<RadioMenuItem*>(&items.back())->set_active ();
|
static_cast<RadioMenuItem*>(&items.back())->set_active ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -290,7 +288,7 @@ RouteTimeAxisView::add_edit_group_menu_item (RouteGroup *eg, RadioMenuItem::Grou
|
||||||
cerr << "adding edit group " << eg->name() << endl;
|
cerr << "adding edit group " << eg->name() << endl;
|
||||||
|
|
||||||
items.push_back (RadioMenuElem (*group, eg->name(), bind (mem_fun(*this, &RouteTimeAxisView::set_edit_group_from_menu), eg)));
|
items.push_back (RadioMenuElem (*group, eg->name(), bind (mem_fun(*this, &RouteTimeAxisView::set_edit_group_from_menu), eg)));
|
||||||
if (_route.edit_group() == eg) {
|
if (_route->edit_group() == eg) {
|
||||||
static_cast<RadioMenuItem*>(&items.back())->set_active ();
|
static_cast<RadioMenuItem*>(&items.back())->set_active ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -299,7 +297,7 @@ void
|
||||||
RouteTimeAxisView::set_edit_group_from_menu (RouteGroup *eg)
|
RouteTimeAxisView::set_edit_group_from_menu (RouteGroup *eg)
|
||||||
|
|
||||||
{
|
{
|
||||||
_route.set_edit_group (eg, this);
|
_route->set_edit_group (eg, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -323,7 +321,7 @@ RouteTimeAxisView::playlist_changed ()
|
||||||
void
|
void
|
||||||
RouteTimeAxisView::label_view ()
|
RouteTimeAxisView::label_view ()
|
||||||
{
|
{
|
||||||
string x = _route.name();
|
string x = _route->name();
|
||||||
|
|
||||||
if (x != name_entry.get_text()) {
|
if (x != name_entry.get_text()) {
|
||||||
name_entry.set_text (x);
|
name_entry.set_text (x);
|
||||||
|
|
@ -396,14 +394,14 @@ RouteTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
|
||||||
remember that edit_group() == 0 implies the route is *not* in a edit group.
|
remember that edit_group() == 0 implies the route is *not* in a edit group.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!(ts.track == this || (ts.group != 0 && ts.group == _route.edit_group()))) {
|
if (!(ts.track == this || (ts.group != 0 && ts.group == _route->edit_group()))) {
|
||||||
/* this doesn't apply to us */
|
/* this doesn't apply to us */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ignore it if our edit group is not active */
|
/* ignore it if our edit group is not active */
|
||||||
|
|
||||||
if ((ts.track != this) && _route.edit_group() && !_route.edit_group()->is_active()) {
|
if ((ts.track != this) && _route->edit_group() && !_route->edit_group()->is_active()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -451,8 +449,8 @@ RouteTimeAxisView::show_selection (TimeSelection& ts)
|
||||||
that the track is not in an edit group).
|
that the track is not in an edit group).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (((ts.track != this && !is_child (ts.track)) && _route.edit_group() && !_route.edit_group()->is_active()) ||
|
if (((ts.track != this && !is_child (ts.track)) && _route->edit_group() && !_route->edit_group()->is_active()) ||
|
||||||
(!(ts.track == this || is_child (ts.track) || (ts.group != 0 && ts.group == _route.edit_group())))) {
|
(!(ts.track == this || is_child (ts.track) || (ts.group != 0 && ts.group == _route->edit_group())))) {
|
||||||
hide_selection ();
|
hide_selection ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -515,13 +513,13 @@ RouteTimeAxisView::set_height (TrackHeight h)
|
||||||
controls_table.show ();
|
controls_table.show ();
|
||||||
hide_name_entry ();
|
hide_name_entry ();
|
||||||
show_name_label ();
|
show_name_label ();
|
||||||
name_label.set_text (_route.name());
|
name_label.set_text (_route->name());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (height_changed) {
|
if (height_changed) {
|
||||||
/* only emit the signal if the height really changed */
|
/* only emit the signal if the height really changed */
|
||||||
_route.gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -733,7 +731,7 @@ RouteTimeAxisView::update_diskstream_display ()
|
||||||
void
|
void
|
||||||
RouteTimeAxisView::selection_click (GdkEventButton* ev)
|
RouteTimeAxisView::selection_click (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
PublicEditor::TrackViewList* tracks = editor.get_valid_views (this, _route.edit_group());
|
PublicEditor::TrackViewList* tracks = editor.get_valid_views (this, _route->edit_group());
|
||||||
|
|
||||||
switch (Keyboard::selection_type (ev->state)) {
|
switch (Keyboard::selection_type (ev->state)) {
|
||||||
case Selection::Toggle:
|
case Selection::Toggle:
|
||||||
|
|
@ -805,13 +803,13 @@ RouteTimeAxisView::get_inverted_selectables (Selection& sel, list<Selectable*>&
|
||||||
RouteGroup*
|
RouteGroup*
|
||||||
RouteTimeAxisView::edit_group() const
|
RouteTimeAxisView::edit_group() const
|
||||||
{
|
{
|
||||||
return _route.edit_group();
|
return _route->edit_group();
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
RouteTimeAxisView::name() const
|
RouteTimeAxisView::name() const
|
||||||
{
|
{
|
||||||
return _route.name();
|
return _route->name();
|
||||||
}
|
}
|
||||||
|
|
||||||
Playlist *
|
Playlist *
|
||||||
|
|
@ -833,22 +831,22 @@ RouteTimeAxisView::name_entry_changed ()
|
||||||
|
|
||||||
x = name_entry.get_text ();
|
x = name_entry.get_text ();
|
||||||
|
|
||||||
if (x == _route.name()) {
|
if (x == _route->name()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.length() == 0) {
|
if (x.length() == 0) {
|
||||||
name_entry.set_text (_route.name());
|
name_entry.set_text (_route->name());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strip_whitespace_edges(x);
|
strip_whitespace_edges(x);
|
||||||
|
|
||||||
if (_session.route_name_unique (x)) {
|
if (_session.route_name_unique (x)) {
|
||||||
_route.set_name (x, this);
|
_route->set_name (x, this);
|
||||||
} else {
|
} else {
|
||||||
ARDOUR_UI::instance()->popup_error (_("a track already exists with that name"));
|
ARDOUR_UI::instance()->popup_error (_("a track already exists with that name"));
|
||||||
name_entry.set_text (_route.name());
|
name_entry.set_text (_route->name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class TimeSelection;
|
||||||
class RouteTimeAxisView : public RouteUI, public TimeAxisView
|
class RouteTimeAxisView : public RouteUI, public TimeAxisView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RouteTimeAxisView (PublicEditor&, ARDOUR::Session&, ARDOUR::Route&, ArdourCanvas::Canvas& canvas);
|
RouteTimeAxisView (PublicEditor&, ARDOUR::Session&, boost::shared_ptr<ARDOUR::Route>, ArdourCanvas::Canvas& canvas);
|
||||||
virtual ~RouteTimeAxisView ();
|
virtual ~RouteTimeAxisView ();
|
||||||
|
|
||||||
void show_selection (TimeSelection&);
|
void show_selection (TimeSelection&);
|
||||||
|
|
@ -101,7 +101,7 @@ class RouteTimeAxisView : public RouteUI, public TimeAxisView
|
||||||
void use_copy_playlist (bool prompt);
|
void use_copy_playlist (bool prompt);
|
||||||
void clear_playlist ();
|
void clear_playlist ();
|
||||||
|
|
||||||
//private:
|
//private: (FIXME)
|
||||||
friend class StreamView;
|
friend class StreamView;
|
||||||
|
|
||||||
StreamView *_view;
|
StreamView *_view;
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,9 @@ using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
|
|
||||||
RouteUI::RouteUI (ARDOUR::Route& rt, ARDOUR::Session& sess, const char* m_name,
|
RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, const char* m_name,
|
||||||
const char* s_name, const char* r_name)
|
const char* s_name, const char* r_name)
|
||||||
: AxisView(sess),
|
: AxisView(sess),
|
||||||
_route(rt),
|
_route(rt),
|
||||||
mute_button(0),
|
mute_button(0),
|
||||||
solo_button(0),
|
solo_button(0),
|
||||||
|
|
@ -66,16 +66,16 @@ RouteUI::RouteUI (ARDOUR::Route& rt, ARDOUR::Session& sess, const char* m_name,
|
||||||
set_color (unique_random_color());
|
set_color (unique_random_color());
|
||||||
}
|
}
|
||||||
|
|
||||||
_route.GoingAway.connect (mem_fun (*this, &RouteUI::route_removed));
|
_route->GoingAway.connect (mem_fun (*this, &RouteUI::route_removed));
|
||||||
_route.active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed));
|
_route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed));
|
||||||
|
|
||||||
mute_button = manage (new BindableToggleButton (_route.mute_control(), m_name ));
|
mute_button = manage (new BindableToggleButton (_route->mute_control(), m_name ));
|
||||||
solo_button = manage (new BindableToggleButton (_route.solo_control(), s_name ));
|
solo_button = manage (new BindableToggleButton (_route->solo_control(), s_name ));
|
||||||
|
|
||||||
if (is_track()) {
|
if (is_track()) {
|
||||||
Track* t = dynamic_cast<Track*>(&_route);
|
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(_route);
|
||||||
|
|
||||||
get_diskstream()->RecordEnableChanged.connect (mem_fun (*this, &RouteUI::route_rec_enable_changed));
|
t->diskstream().RecordEnableChanged.connect (mem_fun (*this, &RouteUI::route_rec_enable_changed));
|
||||||
|
|
||||||
_session.RecordStateChanged.connect (mem_fun (*this, &RouteUI::session_rec_enable_changed));
|
_session.RecordStateChanged.connect (mem_fun (*this, &RouteUI::session_rec_enable_changed));
|
||||||
|
|
||||||
|
|
@ -131,7 +131,7 @@ RouteUI::mute_press(GdkEventButton* ev)
|
||||||
|
|
||||||
_session.begin_reversible_command (_("mute change"));
|
_session.begin_reversible_command (_("mute change"));
|
||||||
_session.add_undo (_session.global_mute_memento(this));
|
_session.add_undo (_session.global_mute_memento(this));
|
||||||
_session.set_all_mute (!_route.muted());
|
_session.set_all_mute (!_route->muted());
|
||||||
_session.add_redo_no_execute (_session.global_mute_memento(this));
|
_session.add_redo_no_execute (_session.global_mute_memento(this));
|
||||||
_session.commit_reversible_command ();
|
_session.commit_reversible_command ();
|
||||||
|
|
||||||
|
|
@ -142,14 +142,14 @@ RouteUI::mute_press(GdkEventButton* ev)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ev->button == 1) {
|
if (ev->button == 1) {
|
||||||
set_mix_group_mute (_route, !_route.muted());
|
set_mix_group_mute (_route, !_route->muted());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* plain click applies change to this route */
|
/* plain click applies change to this route */
|
||||||
|
|
||||||
reversibly_apply_route_boolean ("mute change", &Route::set_mute, !_route.muted(), this);
|
reversibly_apply_route_boolean ("mute change", &Route::set_mute, !_route->muted(), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -206,7 +206,7 @@ RouteUI::solo_press(GdkEventButton* ev)
|
||||||
|
|
||||||
_session.begin_reversible_command (_("solo change"));
|
_session.begin_reversible_command (_("solo change"));
|
||||||
_session.add_undo (_session.global_solo_memento(this));
|
_session.add_undo (_session.global_solo_memento(this));
|
||||||
_session.set_all_solo (!_route.soloed());
|
_session.set_all_solo (!_route->soloed());
|
||||||
_session.add_redo_no_execute (_session.global_solo_memento(this));
|
_session.add_redo_no_execute (_session.global_solo_memento(this));
|
||||||
_session.commit_reversible_command ();
|
_session.commit_reversible_command ();
|
||||||
|
|
||||||
|
|
@ -217,7 +217,7 @@ RouteUI::solo_press(GdkEventButton* ev)
|
||||||
_session.begin_reversible_command (_("solo change"));
|
_session.begin_reversible_command (_("solo change"));
|
||||||
_session.add_undo (_session.global_solo_memento(this));
|
_session.add_undo (_session.global_solo_memento(this));
|
||||||
_session.set_all_solo (false);
|
_session.set_all_solo (false);
|
||||||
_route.set_solo (true, this);
|
_route->set_solo (true, this);
|
||||||
_session.add_redo_no_execute (_session.global_solo_memento(this));
|
_session.add_redo_no_execute (_session.global_solo_memento(this));
|
||||||
_session.commit_reversible_command ();
|
_session.commit_reversible_command ();
|
||||||
|
|
||||||
|
|
@ -225,7 +225,7 @@ RouteUI::solo_press(GdkEventButton* ev)
|
||||||
|
|
||||||
// shift-click: set this route to solo safe
|
// shift-click: set this route to solo safe
|
||||||
|
|
||||||
_route.set_solo_safe (!_route.solo_safe(), this);
|
_route->set_solo_safe (!_route->solo_safe(), this);
|
||||||
wait_for_release = false;
|
wait_for_release = false;
|
||||||
|
|
||||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||||
|
|
@ -235,14 +235,14 @@ RouteUI::solo_press(GdkEventButton* ev)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ev->button == 1) {
|
if (ev->button == 1) {
|
||||||
set_mix_group_solo (_route, !_route.soloed());
|
set_mix_group_solo (_route, !_route->soloed());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* click: solo this route */
|
/* click: solo this route */
|
||||||
|
|
||||||
reversibly_apply_route_boolean ("solo change", &Route::set_solo, !_route.soloed(), this);
|
reversibly_apply_route_boolean ("solo change", &Route::set_solo, !_route->soloed(), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -291,7 +291,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
|
||||||
|
|
||||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||||
|
|
||||||
set_mix_group_rec_enable (_route, !_route.record_enabled());
|
set_mix_group_rec_enable (_route, !_route->record_enabled());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
@ -319,7 +319,7 @@ RouteUI::update_solo_display ()
|
||||||
{
|
{
|
||||||
bool x;
|
bool x;
|
||||||
|
|
||||||
if (solo_button->get_active() != (x = _route.soloed())){
|
if (solo_button->get_active() != (x = _route->soloed())){
|
||||||
ignore_toggle = true;
|
ignore_toggle = true;
|
||||||
solo_button->set_active(x);
|
solo_button->set_active(x);
|
||||||
ignore_toggle = false;
|
ignore_toggle = false;
|
||||||
|
|
@ -327,7 +327,7 @@ RouteUI::update_solo_display ()
|
||||||
|
|
||||||
/* show solo safe */
|
/* show solo safe */
|
||||||
|
|
||||||
if (_route.solo_safe()){
|
if (_route->solo_safe()){
|
||||||
solo_button->set_name(safe_solo_button_name());
|
solo_button->set_name(safe_solo_button_name());
|
||||||
} else {
|
} else {
|
||||||
solo_button->set_name(solo_button_name());
|
solo_button->set_name(solo_button_name());
|
||||||
|
|
@ -345,7 +345,7 @@ RouteUI::update_mute_display ()
|
||||||
{
|
{
|
||||||
bool x;
|
bool x;
|
||||||
|
|
||||||
if (mute_button->get_active() != (x = _route.muted())){
|
if (mute_button->get_active() != (x = _route->muted())){
|
||||||
ignore_toggle = true;
|
ignore_toggle = true;
|
||||||
mute_button->set_active(x);
|
mute_button->set_active(x);
|
||||||
ignore_toggle = false;
|
ignore_toggle = false;
|
||||||
|
|
@ -367,7 +367,7 @@ RouteUI::session_rec_enable_changed ()
|
||||||
void
|
void
|
||||||
RouteUI::update_rec_display ()
|
RouteUI::update_rec_display ()
|
||||||
{
|
{
|
||||||
bool model = _route.record_enabled();
|
bool model = _route->record_enabled();
|
||||||
bool view = rec_enable_button->get_active();
|
bool view = rec_enable_button->get_active();
|
||||||
|
|
||||||
/* first make sure the button's "depressed" visual
|
/* first make sure the button's "depressed" visual
|
||||||
|
|
@ -433,7 +433,7 @@ RouteUI::refresh_remote_control_menu ()
|
||||||
limit += 4; /* leave some breathing room */
|
limit += 4; /* leave some breathing room */
|
||||||
|
|
||||||
rc_items.push_back (RadioMenuElem (rc_group, _("None")));
|
rc_items.push_back (RadioMenuElem (rc_group, _("None")));
|
||||||
if (_route.remote_control_id() == 0) {
|
if (_route->remote_control_id() == 0) {
|
||||||
rc_active = dynamic_cast<CheckMenuItem*> (&rc_items.back());
|
rc_active = dynamic_cast<CheckMenuItem*> (&rc_items.back());
|
||||||
rc_active->set_active ();
|
rc_active->set_active ();
|
||||||
}
|
}
|
||||||
|
|
@ -442,7 +442,7 @@ RouteUI::refresh_remote_control_menu ()
|
||||||
snprintf (buf, sizeof (buf), "%u", i);
|
snprintf (buf, sizeof (buf), "%u", i);
|
||||||
rc_items.push_back (RadioMenuElem (rc_group, buf));
|
rc_items.push_back (RadioMenuElem (rc_group, buf));
|
||||||
rc_active = dynamic_cast<RadioMenuItem*>(&rc_items.back());
|
rc_active = dynamic_cast<RadioMenuItem*>(&rc_items.back());
|
||||||
if (_route.remote_control_id() == i) {
|
if (_route->remote_control_id() == i) {
|
||||||
rc_active = dynamic_cast<CheckMenuItem*> (&rc_items.back());
|
rc_active = dynamic_cast<CheckMenuItem*> (&rc_items.back());
|
||||||
rc_active->set_active ();
|
rc_active->set_active ();
|
||||||
}
|
}
|
||||||
|
|
@ -460,7 +460,7 @@ RouteUI::set_remote_control_id (uint32_t id, CheckMenuItem* item)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (item->get_active()) {
|
if (item->get_active()) {
|
||||||
_route.set_remote_control_id (id);
|
_route->set_remote_control_id (id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -475,9 +475,9 @@ RouteUI::build_solo_menu (void)
|
||||||
CheckMenuItem* check;
|
CheckMenuItem* check;
|
||||||
|
|
||||||
check = new CheckMenuItem(_("Solo-safe"));
|
check = new CheckMenuItem(_("Solo-safe"));
|
||||||
check->set_active (_route.solo_safe());
|
check->set_active (_route->solo_safe());
|
||||||
check->signal_toggled().connect (bind (mem_fun (*this, &RouteUI::toggle_solo_safe), check));
|
check->signal_toggled().connect (bind (mem_fun (*this, &RouteUI::toggle_solo_safe), check));
|
||||||
_route.solo_safe_changed.connect(bind (mem_fun (*this, &RouteUI::solo_safe_toggle), check));
|
_route->solo_safe_changed.connect(bind (mem_fun (*this, &RouteUI::solo_safe_toggle), check));
|
||||||
items.push_back (CheckMenuElem(*check));
|
items.push_back (CheckMenuElem(*check));
|
||||||
check->show_all();
|
check->show_all();
|
||||||
|
|
||||||
|
|
@ -499,28 +499,28 @@ RouteUI::build_mute_menu(void)
|
||||||
check = new CheckMenuItem(_("Pre Fader"));
|
check = new CheckMenuItem(_("Pre Fader"));
|
||||||
init_mute_menu(PRE_FADER, check);
|
init_mute_menu(PRE_FADER, check);
|
||||||
check->signal_toggled().connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), PRE_FADER, check));
|
check->signal_toggled().connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), PRE_FADER, check));
|
||||||
_route.pre_fader_changed.connect(bind (mem_fun (*this, &RouteUI::pre_fader_toggle), check));
|
_route->pre_fader_changed.connect(bind (mem_fun (*this, &RouteUI::pre_fader_toggle), check));
|
||||||
items.push_back (CheckMenuElem(*check));
|
items.push_back (CheckMenuElem(*check));
|
||||||
check->show_all();
|
check->show_all();
|
||||||
|
|
||||||
check = new CheckMenuItem(_("Post Fader"));
|
check = new CheckMenuItem(_("Post Fader"));
|
||||||
init_mute_menu(POST_FADER, check);
|
init_mute_menu(POST_FADER, check);
|
||||||
check->signal_toggled().connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), POST_FADER, check));
|
check->signal_toggled().connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), POST_FADER, check));
|
||||||
_route.post_fader_changed.connect(bind (mem_fun (*this, &RouteUI::post_fader_toggle), check));
|
_route->post_fader_changed.connect(bind (mem_fun (*this, &RouteUI::post_fader_toggle), check));
|
||||||
items.push_back (CheckMenuElem(*check));
|
items.push_back (CheckMenuElem(*check));
|
||||||
check->show_all();
|
check->show_all();
|
||||||
|
|
||||||
check = new CheckMenuItem(_("Control Outs"));
|
check = new CheckMenuItem(_("Control Outs"));
|
||||||
init_mute_menu(CONTROL_OUTS, check);
|
init_mute_menu(CONTROL_OUTS, check);
|
||||||
check->signal_toggled().connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), CONTROL_OUTS, check));
|
check->signal_toggled().connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), CONTROL_OUTS, check));
|
||||||
_route.control_outs_changed.connect(bind (mem_fun (*this, &RouteUI::control_outs_toggle), check));
|
_route->control_outs_changed.connect(bind (mem_fun (*this, &RouteUI::control_outs_toggle), check));
|
||||||
items.push_back (CheckMenuElem(*check));
|
items.push_back (CheckMenuElem(*check));
|
||||||
check->show_all();
|
check->show_all();
|
||||||
|
|
||||||
check = new CheckMenuItem(_("Main Outs"));
|
check = new CheckMenuItem(_("Main Outs"));
|
||||||
init_mute_menu(MAIN_OUTS, check);
|
init_mute_menu(MAIN_OUTS, check);
|
||||||
check->signal_toggled().connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), MAIN_OUTS, check));
|
check->signal_toggled().connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), MAIN_OUTS, check));
|
||||||
_route.main_outs_changed.connect(bind (mem_fun (*this, &RouteUI::main_outs_toggle), check));
|
_route->main_outs_changed.connect(bind (mem_fun (*this, &RouteUI::main_outs_toggle), check));
|
||||||
items.push_back (CheckMenuElem(*check));
|
items.push_back (CheckMenuElem(*check));
|
||||||
check->show_all();
|
check->show_all();
|
||||||
|
|
||||||
|
|
@ -531,7 +531,7 @@ RouteUI::build_mute_menu(void)
|
||||||
void
|
void
|
||||||
RouteUI::init_mute_menu(mute_type type, CheckMenuItem* check)
|
RouteUI::init_mute_menu(mute_type type, CheckMenuItem* check)
|
||||||
{
|
{
|
||||||
if (_route.get_mute_config (type)) {
|
if (_route->get_mute_config (type)) {
|
||||||
check->set_active (true);
|
check->set_active (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -539,28 +539,28 @@ RouteUI::init_mute_menu(mute_type type, CheckMenuItem* check)
|
||||||
void
|
void
|
||||||
RouteUI::toggle_mute_menu(mute_type type, Gtk::CheckMenuItem* check)
|
RouteUI::toggle_mute_menu(mute_type type, Gtk::CheckMenuItem* check)
|
||||||
{
|
{
|
||||||
_route.set_mute_config(type, check->get_active(), this);
|
_route->set_mute_config(type, check->get_active(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteUI::toggle_solo_safe (Gtk::CheckMenuItem* check)
|
RouteUI::toggle_solo_safe (Gtk::CheckMenuItem* check)
|
||||||
{
|
{
|
||||||
_route.set_solo_safe (check->get_active(), this);
|
_route->set_solo_safe (check->get_active(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteUI::set_mix_group_solo(Route& route, bool yn)
|
RouteUI::set_mix_group_solo(boost::shared_ptr<Route> route, bool yn)
|
||||||
{
|
{
|
||||||
RouteGroup* mix_group;
|
RouteGroup* mix_group;
|
||||||
|
|
||||||
if((mix_group = route.mix_group()) != 0){
|
if((mix_group = route->mix_group()) != 0){
|
||||||
_session.begin_reversible_command (_("mix group solo change"));
|
_session.begin_reversible_command (_("mix group solo change"));
|
||||||
_session.add_undo (_session.global_solo_memento (this));
|
_session.add_undo (_session.global_solo_memento (this));
|
||||||
mix_group->apply(&Route::set_solo, yn, this);
|
mix_group->apply(&Route::set_solo, yn, this);
|
||||||
_session.add_redo_no_execute (_session.global_solo_memento(this));
|
_session.add_redo_no_execute (_session.global_solo_memento(this));
|
||||||
_session.commit_reversible_command ();
|
_session.commit_reversible_command ();
|
||||||
} else {
|
} else {
|
||||||
reversibly_apply_route_boolean ("solo change", &Route::set_solo, !route.soloed(), this);
|
reversibly_apply_route_boolean ("solo change", &Route::set_solo, !route->soloed(), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -568,8 +568,8 @@ void
|
||||||
RouteUI::reversibly_apply_route_boolean (string name, void (Route::*func)(bool, void *), bool yn, void *arg)
|
RouteUI::reversibly_apply_route_boolean (string name, void (Route::*func)(bool, void *), bool yn, void *arg)
|
||||||
{
|
{
|
||||||
_session.begin_reversible_command (name);
|
_session.begin_reversible_command (name);
|
||||||
_session.add_undo (bind (mem_fun (_route, func), !yn, (void *) arg));
|
_session.add_undo (bind (mem_fun (*_route, func), !yn, (void *) arg));
|
||||||
_session.add_redo (bind (mem_fun (_route, func), yn, (void *) arg));
|
_session.add_redo (bind (mem_fun (*_route, func), yn, (void *) arg));
|
||||||
_session.commit_reversible_command ();
|
_session.commit_reversible_command ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -583,34 +583,34 @@ RouteUI::reversibly_apply_audio_track_boolean (string name, void (AudioTrack::*f
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteUI::set_mix_group_mute(Route& route, bool yn)
|
RouteUI::set_mix_group_mute(boost::shared_ptr<Route> route, bool yn)
|
||||||
{
|
{
|
||||||
RouteGroup* mix_group;
|
RouteGroup* mix_group;
|
||||||
|
|
||||||
if((mix_group = route.mix_group()) != 0){
|
if((mix_group = route->mix_group()) != 0){
|
||||||
_session.begin_reversible_command (_("mix group mute change"));
|
_session.begin_reversible_command (_("mix group mute change"));
|
||||||
_session.add_undo (_session.global_mute_memento (this));
|
_session.add_undo (_session.global_mute_memento (this));
|
||||||
mix_group->apply(&Route::set_mute, yn, this);
|
mix_group->apply(&Route::set_mute, yn, this);
|
||||||
_session.add_redo_no_execute (_session.global_mute_memento(this));
|
_session.add_redo_no_execute (_session.global_mute_memento(this));
|
||||||
_session.commit_reversible_command ();
|
_session.commit_reversible_command ();
|
||||||
} else {
|
} else {
|
||||||
reversibly_apply_route_boolean ("mute change", &Route::set_mute, !route.muted(), this);
|
reversibly_apply_route_boolean ("mute change", &Route::set_mute, !route->muted(), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteUI::set_mix_group_rec_enable(Route& route, bool yn)
|
RouteUI::set_mix_group_rec_enable(boost::shared_ptr<Route> route, bool yn)
|
||||||
{
|
{
|
||||||
RouteGroup* mix_group;
|
RouteGroup* mix_group;
|
||||||
|
|
||||||
if((mix_group = route.mix_group()) != 0){
|
if((mix_group = route->mix_group()) != 0){
|
||||||
_session.begin_reversible_command (_("mix group rec-enable change"));
|
_session.begin_reversible_command (_("mix group rec-enable change"));
|
||||||
_session.add_undo (_session.global_record_enable_memento (this));
|
_session.add_undo (_session.global_record_enable_memento (this));
|
||||||
mix_group->apply (&Route::set_record_enable, yn, this);
|
mix_group->apply (&Route::set_record_enable, yn, this);
|
||||||
_session.add_redo_no_execute (_session.global_record_enable_memento(this));
|
_session.add_redo_no_execute (_session.global_record_enable_memento(this));
|
||||||
_session.commit_reversible_command ();
|
_session.commit_reversible_command ();
|
||||||
} else {
|
} else {
|
||||||
reversibly_apply_route_boolean ("rec-enable change", &Route::set_record_enable, !_route.record_enabled(), this);
|
reversibly_apply_route_boolean ("rec-enable change", &Route::set_record_enable, !_route->record_enabled(), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -641,7 +641,7 @@ RouteUI::set_color (const Gdk::Color & c)
|
||||||
snprintf (buf, sizeof (buf), "%d:%d:%d", c.get_red(), c.get_green(), c.get_blue());
|
snprintf (buf, sizeof (buf), "%d:%d:%d", c.get_red(), c.get_green(), c.get_blue());
|
||||||
xml_node->add_property ("color", buf);
|
xml_node->add_property ("color", buf);
|
||||||
|
|
||||||
_route.gui_changed ("color", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("color", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -649,9 +649,9 @@ void
|
||||||
RouteUI::ensure_xml_node ()
|
RouteUI::ensure_xml_node ()
|
||||||
{
|
{
|
||||||
if (xml_node == 0) {
|
if (xml_node == 0) {
|
||||||
if ((xml_node = _route.extra_xml ("GUI")) == 0) {
|
if ((xml_node = _route->extra_xml ("GUI")) == 0) {
|
||||||
xml_node = new XMLNode ("GUI");
|
xml_node = new XMLNode ("GUI");
|
||||||
_route.add_extra_xml (*xml_node);
|
_route->add_extra_xml (*xml_node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -697,9 +697,9 @@ RouteUI::remove_this_route ()
|
||||||
string prompt;
|
string prompt;
|
||||||
|
|
||||||
if (is_track()) {
|
if (is_track()) {
|
||||||
prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n(cannot be undone)"), _route.name());
|
prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n(cannot be undone)"), _route->name());
|
||||||
} else {
|
} else {
|
||||||
prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n(cannot be undone)"), _route.name());
|
prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n(cannot be undone)"), _route->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
choices.push_back (_("No, do nothing."));
|
choices.push_back (_("No, do nothing."));
|
||||||
|
|
@ -733,7 +733,7 @@ RouteUI::route_rename ()
|
||||||
ArdourPrompter name_prompter (true);
|
ArdourPrompter name_prompter (true);
|
||||||
string result;
|
string result;
|
||||||
name_prompter.set_prompt (_("New Name: "));
|
name_prompter.set_prompt (_("New Name: "));
|
||||||
name_prompter.set_initial_text (_route.name());
|
name_prompter.set_initial_text (_route->name());
|
||||||
name_prompter.add_button (_("Rename"), Gtk::RESPONSE_ACCEPT);
|
name_prompter.add_button (_("Rename"), Gtk::RESPONSE_ACCEPT);
|
||||||
name_prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
|
name_prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
|
||||||
name_prompter.show_all ();
|
name_prompter.show_all ();
|
||||||
|
|
@ -743,7 +743,7 @@ RouteUI::route_rename ()
|
||||||
case Gtk::RESPONSE_ACCEPT:
|
case Gtk::RESPONSE_ACCEPT:
|
||||||
name_prompter.get_result (result);
|
name_prompter.get_result (result);
|
||||||
if (result.length()) {
|
if (result.length()) {
|
||||||
_route.set_name (result, this);
|
_route->set_name (result, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -757,7 +757,7 @@ RouteUI::name_changed (void *src)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::name_changed), src));
|
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::name_changed), src));
|
||||||
|
|
||||||
name_label.set_text (_route.name());
|
name_label.set_text (_route->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -766,8 +766,8 @@ RouteUI::toggle_route_active ()
|
||||||
bool yn;
|
bool yn;
|
||||||
|
|
||||||
if (route_active_menu_item) {
|
if (route_active_menu_item) {
|
||||||
if (route_active_menu_item->get_active() != (yn = _route.active())) {
|
if (route_active_menu_item->get_active() != (yn = _route->active())) {
|
||||||
_route.set_active (!yn);
|
_route->set_active (!yn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -776,7 +776,7 @@ void
|
||||||
RouteUI::route_active_changed ()
|
RouteUI::route_active_changed ()
|
||||||
{
|
{
|
||||||
if (route_active_menu_item) {
|
if (route_active_menu_item) {
|
||||||
Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun (*route_active_menu_item, &CheckMenuItem::set_active), _route.active()));
|
Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun (*route_active_menu_item, &CheckMenuItem::set_active), _route->active()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -789,12 +789,12 @@ RouteUI::toggle_polarity ()
|
||||||
|
|
||||||
ENSURE_GUI_THREAD(mem_fun (*this, &RouteUI::toggle_polarity));
|
ENSURE_GUI_THREAD(mem_fun (*this, &RouteUI::toggle_polarity));
|
||||||
|
|
||||||
if ((x = polarity_menu_item->get_active()) != _route.phase_invert()) {
|
if ((x = polarity_menu_item->get_active()) != _route->phase_invert()) {
|
||||||
_route.set_phase_invert (x, this);
|
_route->set_phase_invert (x, this);
|
||||||
if (x) {
|
if (x) {
|
||||||
name_label.set_text (X_("Ø ") + name_label.get_text());
|
name_label.set_text (X_("Ø ") + name_label.get_text());
|
||||||
} else {
|
} else {
|
||||||
name_label.set_text (_route.name());
|
name_label.set_text (_route->name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -809,7 +809,7 @@ RouteUI::polarity_changed ()
|
||||||
void
|
void
|
||||||
RouteUI::solo_safe_toggle(void* src, Gtk::CheckMenuItem* check)
|
RouteUI::solo_safe_toggle(void* src, Gtk::CheckMenuItem* check)
|
||||||
{
|
{
|
||||||
bool yn = _route.solo_safe ();
|
bool yn = _route->solo_safe ();
|
||||||
|
|
||||||
if (check->get_active() != yn) {
|
if (check->get_active() != yn) {
|
||||||
check->set_active (yn);
|
check->set_active (yn);
|
||||||
|
|
@ -820,7 +820,7 @@ RouteUI::pre_fader_toggle(void* src, Gtk::CheckMenuItem* check)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::pre_fader_toggle), src, check));
|
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::pre_fader_toggle), src, check));
|
||||||
|
|
||||||
bool yn = _route.get_mute_config(PRE_FADER);
|
bool yn = _route->get_mute_config(PRE_FADER);
|
||||||
if (check->get_active() != yn) {
|
if (check->get_active() != yn) {
|
||||||
check->set_active (yn);
|
check->set_active (yn);
|
||||||
}
|
}
|
||||||
|
|
@ -831,7 +831,7 @@ RouteUI::post_fader_toggle(void* src, Gtk::CheckMenuItem* check)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::post_fader_toggle), src, check));
|
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::post_fader_toggle), src, check));
|
||||||
|
|
||||||
bool yn = _route.get_mute_config(POST_FADER);
|
bool yn = _route->get_mute_config(POST_FADER);
|
||||||
if (check->get_active() != yn) {
|
if (check->get_active() != yn) {
|
||||||
check->set_active (yn);
|
check->set_active (yn);
|
||||||
}
|
}
|
||||||
|
|
@ -842,7 +842,7 @@ RouteUI::control_outs_toggle(void* src, Gtk::CheckMenuItem* check)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::control_outs_toggle), src, check));
|
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::control_outs_toggle), src, check));
|
||||||
|
|
||||||
bool yn = _route.get_mute_config(CONTROL_OUTS);
|
bool yn = _route->get_mute_config(CONTROL_OUTS);
|
||||||
if (check->get_active() != yn) {
|
if (check->get_active() != yn) {
|
||||||
check->set_active (yn);
|
check->set_active (yn);
|
||||||
}
|
}
|
||||||
|
|
@ -853,7 +853,7 @@ RouteUI::main_outs_toggle(void* src, Gtk::CheckMenuItem* check)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::main_outs_toggle), src, check));
|
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::main_outs_toggle), src, check));
|
||||||
|
|
||||||
bool yn = _route.get_mute_config(MAIN_OUTS);
|
bool yn = _route->get_mute_config(MAIN_OUTS);
|
||||||
if (check->get_active() != yn) {
|
if (check->get_active() != yn) {
|
||||||
check->set_active (yn);
|
check->set_active (yn);
|
||||||
}
|
}
|
||||||
|
|
@ -862,68 +862,67 @@ RouteUI::main_outs_toggle(void* src, Gtk::CheckMenuItem* check)
|
||||||
void
|
void
|
||||||
RouteUI::disconnect_input ()
|
RouteUI::disconnect_input ()
|
||||||
{
|
{
|
||||||
_route.disconnect_inputs (this);
|
_route->disconnect_inputs (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteUI::disconnect_output ()
|
RouteUI::disconnect_output ()
|
||||||
{
|
{
|
||||||
_route.disconnect_outputs (this);
|
_route->disconnect_outputs (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RouteUI::is_track () const
|
RouteUI::is_track () const
|
||||||
{
|
{
|
||||||
return dynamic_cast<Track*>(&_route) != 0;
|
return dynamic_cast<Track*>(_route.get()) != 0;
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
RouteUI::is_audio_track () const
|
|
||||||
{
|
|
||||||
return dynamic_cast<AudioTrack*>(&_route) != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
RouteUI::is_midi_track () const
|
|
||||||
{
|
|
||||||
return dynamic_cast<MidiTrack*>(&_route) != 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Track*
|
Track*
|
||||||
RouteUI::track() const
|
RouteUI::track() const
|
||||||
{
|
{
|
||||||
return dynamic_cast<Track*>(&_route);
|
return dynamic_cast<Track*>(_route.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
RouteUI::is_audio_track () const
|
||||||
|
{
|
||||||
|
return dynamic_cast<AudioTrack*>(_route.get()) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioTrack*
|
AudioTrack*
|
||||||
RouteUI::audio_track() const
|
RouteUI::audio_track() const
|
||||||
{
|
{
|
||||||
return dynamic_cast<AudioTrack*>(&_route);
|
return dynamic_cast<AudioTrack*>(_route.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
RouteUI::is_midi_track () const
|
||||||
|
{
|
||||||
|
return dynamic_cast<MidiTrack*>(_route.get()) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
MidiTrack*
|
MidiTrack*
|
||||||
RouteUI::midi_track() const
|
RouteUI::midi_track() const
|
||||||
{
|
{
|
||||||
return dynamic_cast<MidiTrack*>(&_route);
|
return dynamic_cast<MidiTrack*>(_route.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
Diskstream*
|
Diskstream*
|
||||||
RouteUI::get_diskstream () const
|
RouteUI::get_diskstream () const
|
||||||
{
|
{
|
||||||
Track *t;
|
boost::shared_ptr<Track> t;
|
||||||
|
|
||||||
if ((t = dynamic_cast<Track*>(&_route)) != 0) {
|
if ((t = boost::dynamic_pointer_cast<Track>(_route)) != 0) {
|
||||||
return &t->diskstream();
|
return &t->diskstream();
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string
|
string
|
||||||
RouteUI::name() const
|
RouteUI::name() const
|
||||||
{
|
{
|
||||||
return _route.name();
|
return _route->name();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -931,7 +930,7 @@ RouteUI::map_frozen ()
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD (mem_fun (*this, &RouteUI::map_frozen));
|
ENSURE_GUI_THREAD (mem_fun (*this, &RouteUI::map_frozen));
|
||||||
|
|
||||||
AudioTrack* at = dynamic_cast<AudioTrack*>(&_route);
|
AudioTrack* at = dynamic_cast<AudioTrack*>(_route.get());
|
||||||
|
|
||||||
if (at) {
|
if (at) {
|
||||||
switch (at->freeze_state()) {
|
switch (at->freeze_state()) {
|
||||||
|
|
@ -944,3 +943,4 @@ RouteUI::map_frozen ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,15 +46,16 @@ class BindableToggleButton;
|
||||||
class RouteUI : public virtual AxisView
|
class RouteUI : public virtual AxisView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RouteUI(ARDOUR::Route&, ARDOUR::Session&, const char*, const char*, const char*);
|
RouteUI(boost::shared_ptr<ARDOUR::Route>, ARDOUR::Session&, const char*, const char*, const char*);
|
||||||
virtual ~RouteUI();
|
virtual ~RouteUI();
|
||||||
|
|
||||||
ARDOUR::Route& route() const { return _route; }
|
|
||||||
|
|
||||||
bool is_track() const;
|
bool is_track() const;
|
||||||
bool is_audio_track() const;
|
bool is_audio_track() const;
|
||||||
bool is_midi_track() const;
|
bool is_midi_track() const;
|
||||||
|
|
||||||
|
boost::shared_ptr<ARDOUR::Route> route() const { return _route; }
|
||||||
|
|
||||||
|
// FIXME: make these return shared_ptr
|
||||||
ARDOUR::Track* track() const;
|
ARDOUR::Track* track() const;
|
||||||
ARDOUR::AudioTrack* audio_track() const;
|
ARDOUR::AudioTrack* audio_track() const;
|
||||||
ARDOUR::MidiTrack* midi_track() const;
|
ARDOUR::MidiTrack* midi_track() const;
|
||||||
|
|
@ -62,8 +63,10 @@ class RouteUI : public virtual AxisView
|
||||||
ARDOUR::Diskstream* get_diskstream() const;
|
ARDOUR::Diskstream* get_diskstream() const;
|
||||||
|
|
||||||
string name() const;
|
string name() const;
|
||||||
|
|
||||||
ARDOUR::Route& _route;
|
// protected: XXX sigh this should be here
|
||||||
|
|
||||||
|
boost::shared_ptr<ARDOUR::Route> _route;
|
||||||
|
|
||||||
void set_color (const Gdk::Color & c);
|
void set_color (const Gdk::Color & c);
|
||||||
bool choose_color ();
|
bool choose_color ();
|
||||||
|
|
@ -95,6 +98,7 @@ class RouteUI : public virtual AxisView
|
||||||
|
|
||||||
void solo_changed(void*);
|
void solo_changed(void*);
|
||||||
void mute_changed(void*);
|
void mute_changed(void*);
|
||||||
|
virtual void redirects_changed (void *) {}
|
||||||
void route_rec_enable_changed(void*);
|
void route_rec_enable_changed(void*);
|
||||||
void session_rec_enable_changed();
|
void session_rec_enable_changed();
|
||||||
|
|
||||||
|
|
@ -114,9 +118,9 @@ class RouteUI : public virtual AxisView
|
||||||
void build_mute_menu(void);
|
void build_mute_menu(void);
|
||||||
void init_mute_menu(ARDOUR::mute_type, Gtk::CheckMenuItem*);
|
void init_mute_menu(ARDOUR::mute_type, Gtk::CheckMenuItem*);
|
||||||
|
|
||||||
void set_mix_group_solo(ARDOUR::Route&, bool);
|
void set_mix_group_solo(boost::shared_ptr<ARDOUR::Route>, bool);
|
||||||
void set_mix_group_mute(ARDOUR::Route&, bool);
|
void set_mix_group_mute(boost::shared_ptr<ARDOUR::Route>, bool);
|
||||||
void set_mix_group_rec_enable(ARDOUR::Route&, bool);
|
void set_mix_group_rec_enable(boost::shared_ptr<ARDOUR::Route>, bool);
|
||||||
|
|
||||||
int set_color_from_route ();
|
int set_color_from_route ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ Selection::clear_lines ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Selection::toggle (Redirect* r)
|
Selection::toggle (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
RedirectSelection::iterator i;
|
RedirectSelection::iterator i;
|
||||||
|
|
||||||
|
|
@ -243,7 +243,7 @@ Selection::toggle (jack_nframes_t start, jack_nframes_t end)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Selection::add (Redirect* r)
|
Selection::add (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
if (find (redirects.begin(), redirects.end(), r) == redirects.end()) {
|
if (find (redirects.begin(), redirects.end(), r) == redirects.end()) {
|
||||||
redirects.push_back (r);
|
redirects.push_back (r);
|
||||||
|
|
@ -381,9 +381,9 @@ Selection::add (AutomationList* ac)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Selection::remove (Redirect* r)
|
Selection::remove (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
list<Redirect*>::iterator i;
|
RedirectSelection::iterator i;
|
||||||
if ((i = find (redirects.begin(), redirects.end(), r)) != redirects.end()) {
|
if ((i = find (redirects.begin(), redirects.end(), r)) != redirects.end()) {
|
||||||
redirects.erase (i);
|
redirects.erase (i);
|
||||||
RedirectsChanged ();
|
RedirectsChanged ();
|
||||||
|
|
@ -491,7 +491,7 @@ Selection::remove (AutomationList *ac)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Selection::set (Redirect *r)
|
Selection::set (boost::shared_ptr<Redirect> r)
|
||||||
{
|
{
|
||||||
clear_redirects ();
|
clear_redirects ();
|
||||||
add (r);
|
add (r);
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#define __ardour_gtk_selection_h__
|
#define __ardour_gtk_selection_h__
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <sigc++/signal.h>
|
#include <sigc++/signal.h>
|
||||||
|
|
||||||
|
|
@ -101,7 +102,7 @@ class Selection : public sigc::trackable
|
||||||
void set (ARDOUR::AutomationList*);
|
void set (ARDOUR::AutomationList*);
|
||||||
void set (ARDOUR::Playlist*);
|
void set (ARDOUR::Playlist*);
|
||||||
void set (const list<ARDOUR::Playlist*>&);
|
void set (const list<ARDOUR::Playlist*>&);
|
||||||
void set (ARDOUR::Redirect*);
|
void set (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
void set (AutomationSelectable*);
|
void set (AutomationSelectable*);
|
||||||
|
|
||||||
void toggle (TimeAxisView*);
|
void toggle (TimeAxisView*);
|
||||||
|
|
@ -112,7 +113,7 @@ class Selection : public sigc::trackable
|
||||||
void toggle (ARDOUR::AutomationList*);
|
void toggle (ARDOUR::AutomationList*);
|
||||||
void toggle (ARDOUR::Playlist*);
|
void toggle (ARDOUR::Playlist*);
|
||||||
void toggle (const list<ARDOUR::Playlist*>&);
|
void toggle (const list<ARDOUR::Playlist*>&);
|
||||||
void toggle (ARDOUR::Redirect*);
|
void toggle (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
void add (TimeAxisView*);
|
void add (TimeAxisView*);
|
||||||
void add (const list<TimeAxisView*>&);
|
void add (const list<TimeAxisView*>&);
|
||||||
|
|
@ -122,7 +123,7 @@ class Selection : public sigc::trackable
|
||||||
void add (ARDOUR::AutomationList*);
|
void add (ARDOUR::AutomationList*);
|
||||||
void add (ARDOUR::Playlist*);
|
void add (ARDOUR::Playlist*);
|
||||||
void add (const list<ARDOUR::Playlist*>&);
|
void add (const list<ARDOUR::Playlist*>&);
|
||||||
void add (ARDOUR::Redirect*);
|
void add (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
void remove (TimeAxisView*);
|
void remove (TimeAxisView*);
|
||||||
void remove (const list<TimeAxisView*>&);
|
void remove (const list<TimeAxisView*>&);
|
||||||
|
|
@ -132,7 +133,7 @@ class Selection : public sigc::trackable
|
||||||
void remove (ARDOUR::AutomationList*);
|
void remove (ARDOUR::AutomationList*);
|
||||||
void remove (ARDOUR::Playlist*);
|
void remove (ARDOUR::Playlist*);
|
||||||
void remove (const list<ARDOUR::Playlist*>&);
|
void remove (const list<ARDOUR::Playlist*>&);
|
||||||
void remove (ARDOUR::Redirect*);
|
void remove (boost::shared_ptr<ARDOUR::Redirect>);
|
||||||
|
|
||||||
void replace (uint32_t time_index, jack_nframes_t start, jack_nframes_t end);
|
void replace (uint32_t time_index, jack_nframes_t start, jack_nframes_t end);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
SendUI::SendUI (Send& s, Session& se)
|
SendUI::SendUI (boost::shared_ptr<Send> s, Session& se)
|
||||||
: _send (s),
|
: _send (s),
|
||||||
_session (se),
|
_session (se),
|
||||||
gpm (s, se),
|
gpm (s, se),
|
||||||
|
|
@ -53,10 +53,10 @@ SendUI::SendUI (Send& s, Session& se)
|
||||||
|
|
||||||
show_all ();
|
show_all ();
|
||||||
|
|
||||||
_send.set_metering (true);
|
_send->set_metering (true);
|
||||||
|
|
||||||
_send.output_changed.connect (mem_fun (*this, &SendUI::ins_changed));
|
_send->output_changed.connect (mem_fun (*this, &SendUI::ins_changed));
|
||||||
_send.output_changed.connect (mem_fun (*this, &SendUI::outs_changed));
|
_send->output_changed.connect (mem_fun (*this, &SendUI::outs_changed));
|
||||||
|
|
||||||
panners.set_width (Wide);
|
panners.set_width (Wide);
|
||||||
panners.setup_pan ();
|
panners.setup_pan ();
|
||||||
|
|
@ -70,7 +70,7 @@ SendUI::SendUI (Send& s, Session& se)
|
||||||
|
|
||||||
SendUI::~SendUI ()
|
SendUI::~SendUI ()
|
||||||
{
|
{
|
||||||
_send.set_metering (false);
|
_send->set_metering (false);
|
||||||
|
|
||||||
/* XXX not clear that we need to do this */
|
/* XXX not clear that we need to do this */
|
||||||
|
|
||||||
|
|
@ -118,7 +118,7 @@ SendUI::fast_update ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SendUIWindow::SendUIWindow (Send& s, Session& ss)
|
SendUIWindow::SendUIWindow (boost::shared_ptr<Send> s, Session& ss)
|
||||||
{
|
{
|
||||||
ui = new SendUI (s, ss);
|
ui = new SendUI (s, ss);
|
||||||
|
|
||||||
|
|
@ -131,7 +131,7 @@ SendUIWindow::SendUIWindow (Send& s, Session& ss)
|
||||||
add (vpacker);
|
add (vpacker);
|
||||||
set_name ("SendUIWindow");
|
set_name ("SendUIWindow");
|
||||||
|
|
||||||
s.GoingAway.connect (mem_fun (*this, &SendUIWindow::send_going_away));
|
s->GoingAway.connect (mem_fun (*this, &SendUIWindow::send_going_away));
|
||||||
|
|
||||||
signal_delete_event().connect (bind (ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
signal_delete_event().connect (bind (ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class IOSelector;
|
||||||
class SendUI : public Gtk::HBox
|
class SendUI : public Gtk::HBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SendUI (ARDOUR::Send&, ARDOUR::Session&);
|
SendUI (boost::shared_ptr<ARDOUR::Send>, ARDOUR::Session&);
|
||||||
~SendUI();
|
~SendUI();
|
||||||
|
|
||||||
void update ();
|
void update ();
|
||||||
|
|
@ -44,7 +44,7 @@ class SendUI : public Gtk::HBox
|
||||||
IOSelector* io;
|
IOSelector* io;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ARDOUR::Send& _send;
|
boost::shared_ptr<ARDOUR::Send> _send;
|
||||||
ARDOUR::Session& _session;
|
ARDOUR::Session& _session;
|
||||||
GainMeter gpm;
|
GainMeter gpm;
|
||||||
PannerUI panners;
|
PannerUI panners;
|
||||||
|
|
@ -62,7 +62,7 @@ class SendUI : public Gtk::HBox
|
||||||
class SendUIWindow : public Gtk::Window
|
class SendUIWindow : public Gtk::Window
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SendUIWindow(ARDOUR::Send&, ARDOUR::Session&);
|
SendUIWindow(boost::shared_ptr<ARDOUR::Send>, ARDOUR::Session&);
|
||||||
~SendUIWindow();
|
~SendUIWindow();
|
||||||
|
|
||||||
SendUI* ui;
|
SendUI* ui;
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,9 @@ SoundFileBox::SoundFileBox ()
|
||||||
(mem_fun (*this, &SoundFileBox::add_field_clicked));
|
(mem_fun (*this, &SoundFileBox::add_field_clicked));
|
||||||
remove_field_btn.signal_clicked().connect
|
remove_field_btn.signal_clicked().connect
|
||||||
(mem_fun (*this, &SoundFileBox::remove_field_clicked));
|
(mem_fun (*this, &SoundFileBox::remove_field_clicked));
|
||||||
|
|
||||||
|
Gtk::CellRendererText* cell(static_cast<Gtk::CellRendererText*>(field_view.get_column_cell_renderer(1)));
|
||||||
|
cell->signal_edited().connect (mem_fun (*this, &SoundFileBox::field_edited));
|
||||||
|
|
||||||
field_view.get_selection()->signal_changed().connect (mem_fun (*this, &SoundFileBox::field_selected));
|
field_view.get_selection()->signal_changed().connect (mem_fun (*this, &SoundFileBox::field_selected));
|
||||||
Library->fields_changed.connect (mem_fun (*this, &SoundFileBox::setup_fields));
|
Library->fields_changed.connect (mem_fun (*this, &SoundFileBox::setup_fields));
|
||||||
|
|
@ -259,6 +262,13 @@ SoundFileBox::remove_field_clicked ()
|
||||||
Library->save_changes ();
|
Library->save_changes ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SoundFileBox::field_edited (const Glib::ustring& str1, const Glib::ustring& str2)
|
||||||
|
{
|
||||||
|
cout << "field_edited" << endl;
|
||||||
|
Library->save_changes ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SoundFileBox::delete_row (const Gtk::TreeModel::iterator& iter)
|
SoundFileBox::delete_row (const Gtk::TreeModel::iterator& iter)
|
||||||
{
|
{
|
||||||
|
|
@ -394,6 +404,9 @@ SoundFileOmega::set_mode (Editing::ImportMode mode)
|
||||||
case Editing::ImportToTrack:
|
case Editing::ImportToTrack:
|
||||||
split_check.set_sensitive (false);
|
split_check.set_sensitive (false);
|
||||||
break;
|
break;
|
||||||
|
case Editing::ImportAsTapeTrack:
|
||||||
|
split_check.set_sensitive (true);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -433,5 +446,8 @@ SoundFileOmega::mode_changed ()
|
||||||
case Editing::ImportToTrack:
|
case Editing::ImportToTrack:
|
||||||
split_check.set_sensitive (false);
|
split_check.set_sensitive (false);
|
||||||
break;
|
break;
|
||||||
|
case Editing::ImportAsTapeTrack:
|
||||||
|
split_check.set_sensitive (true);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ class SoundFileBox : public Gtk::VBox
|
||||||
void stop_btn_clicked ();
|
void stop_btn_clicked ();
|
||||||
void add_field_clicked ();
|
void add_field_clicked ();
|
||||||
void remove_field_clicked ();
|
void remove_field_clicked ();
|
||||||
|
void field_edited (const Glib::ustring&, const Glib::ustring&);
|
||||||
void delete_row (const Gtk::TreeModel::iterator& iter);
|
void delete_row (const Gtk::TreeModel::iterator& iter);
|
||||||
|
|
||||||
void field_selected ();
|
void field_selected ();
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ namespace ARDOUR {
|
||||||
const char* old;
|
const char* old;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
/* how do we make these be within the Ardour namespace? */
|
/* how do we make these be within the Ardour namespace? */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -305,6 +305,6 @@ class AudioDiskstream : public Diskstream
|
||||||
void disengage_record_enable (void* src);
|
void disengage_record_enable (void* src);
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_audio_diskstream_h__ */
|
#endif /* __ardour_audio_diskstream_h__ */
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ class AudioLibrary : public Stateful
|
||||||
AudioLibrary ();
|
AudioLibrary ();
|
||||||
~AudioLibrary ();
|
~AudioLibrary ();
|
||||||
|
|
||||||
|
static string state_node_name;
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,13 +81,12 @@ class AudioTrack : public Track
|
||||||
uint32_t n_process_buffers ();
|
uint32_t n_process_buffers ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int set_diskstream (AudioDiskstream&, void *);
|
int set_diskstream (AudioDiskstream&, void *);
|
||||||
|
|
||||||
int deprecated_use_diskstream_connections ();
|
int deprecated_use_diskstream_connections ();
|
||||||
void set_state_part_two ();
|
void set_state_part_two ();
|
||||||
void set_state_part_three ();
|
void set_state_part_three ();
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace ARDOUR*/
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_audio_track_h__ */
|
#endif /* __ardour_audio_track_h__ */
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,6 @@ class AudioEngine : public sigc::trackable
|
||||||
mutable gint m_meter_exit;
|
mutable gint m_meter_exit;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_audioengine_h__ */
|
#endif /* __ardour_audioengine_h__ */
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,8 @@ class AudioFileSource : public AudioSource {
|
||||||
Removable = 0x8,
|
Removable = 0x8,
|
||||||
RemovableIfEmpty = 0x10,
|
RemovableIfEmpty = 0x10,
|
||||||
RemoveAtDestroy = 0x20,
|
RemoveAtDestroy = 0x20,
|
||||||
NoPeakFile = 0x40
|
NoPeakFile = 0x40,
|
||||||
|
Destructive = 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual ~AudioFileSource ();
|
virtual ~AudioFileSource ();
|
||||||
|
|
@ -150,7 +151,7 @@ class AudioFileSource : public AudioSource {
|
||||||
bool writable() const { return _flags & Writable; }
|
bool writable() const { return _flags & Writable; }
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_audiofilesource_h__ */
|
#endif /* __ardour_audiofilesource_h__ */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,7 @@ class AudioRegion : public Region
|
||||||
Fast,
|
Fast,
|
||||||
Slow,
|
Slow,
|
||||||
LogA,
|
LogA,
|
||||||
LogB,
|
LogB
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void set_fade_in_active (bool yn);
|
void set_fade_in_active (bool yn);
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,6 @@ class Configuration : public Stateful
|
||||||
extern Configuration *Config;
|
extern Configuration *Config;
|
||||||
extern gain_t speed_quietning; /* see comment in configuration.cc */
|
extern gain_t speed_quietning; /* see comment in configuration.cc */
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_configuration_h__ */
|
#endif /* __ardour_configuration_h__ */
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ class Curve : public AutomationList
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void curve_get_vector_from_c (void *arg, double, double, float*, int32_t);
|
void curve_get_vector_from_c (void *arg, double, double, float*, int32_t);
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ class DestructiveFileSource : public SndFileSource {
|
||||||
DestructiveFileSource (std::string path, SampleFormat samp_format, HeaderFormat hdr_format, jack_nframes_t rate,
|
DestructiveFileSource (std::string path, SampleFormat samp_format, HeaderFormat hdr_format, jack_nframes_t rate,
|
||||||
Flag flags = AudioFileSource::Flag (AudioFileSource::Writable));
|
Flag flags = AudioFileSource::Flag (AudioFileSource::Writable));
|
||||||
|
|
||||||
|
DestructiveFileSource (std::string path, Flag flags);
|
||||||
|
|
||||||
DestructiveFileSource (const XMLNode&);
|
DestructiveFileSource (const XMLNode&);
|
||||||
~DestructiveFileSource ();
|
~DestructiveFileSource ();
|
||||||
|
|
||||||
|
|
@ -62,6 +64,7 @@ class DestructiveFileSource : public SndFileSource {
|
||||||
jack_nframes_t file_pos; // unit is frames
|
jack_nframes_t file_pos; // unit is frames
|
||||||
Sample* xfade_buf;
|
Sample* xfade_buf;
|
||||||
|
|
||||||
|
void init ();
|
||||||
jack_nframes_t crossfade (Sample* data, jack_nframes_t cnt, int dir, char * workbuf);
|
jack_nframes_t crossfade (Sample* data, jack_nframes_t cnt, int dir, char * workbuf);
|
||||||
void set_timeline_position (jack_nframes_t);
|
void set_timeline_position (jack_nframes_t);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,6 @@ namespace ARDOUR
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_export_h__ */
|
#endif /* __ardour_export_h__ */
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ struct PluginInsertState : public RedirectState
|
||||||
class PluginInsert : public Insert
|
class PluginInsert : public Insert
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PluginInsert (Session&, Plugin&, Placement);
|
PluginInsert (Session&, boost::shared_ptr<Plugin>, Placement);
|
||||||
PluginInsert (Session&, const XMLNode&);
|
PluginInsert (Session&, const XMLNode&);
|
||||||
PluginInsert (const PluginInsert&);
|
PluginInsert (const PluginInsert&);
|
||||||
~PluginInsert ();
|
~PluginInsert ();
|
||||||
|
|
@ -141,11 +141,11 @@ class PluginInsert : public Insert
|
||||||
|
|
||||||
float default_parameter_value (uint32_t which);
|
float default_parameter_value (uint32_t which);
|
||||||
|
|
||||||
Plugin& plugin(uint32_t num=0) const {
|
boost::shared_ptr<Plugin> plugin(uint32_t num=0) const {
|
||||||
if (num < _plugins.size()) {
|
if (num < _plugins.size()) {
|
||||||
return *_plugins[num];
|
return _plugins[num];
|
||||||
} else {
|
} else {
|
||||||
return *_plugins[0]; // we always have one
|
return _plugins[0]; // we always have one
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,7 +163,7 @@ class PluginInsert : public Insert
|
||||||
|
|
||||||
void parameter_changed (uint32_t, float);
|
void parameter_changed (uint32_t, float);
|
||||||
|
|
||||||
vector<Plugin*> _plugins;
|
vector<boost::shared_ptr<Plugin> > _plugins;
|
||||||
void automation_run (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset);
|
void automation_run (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset);
|
||||||
void connect_and_run (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset, bool with_auto, jack_nframes_t now = 0);
|
void connect_and_run (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset, bool with_auto, jack_nframes_t now = 0);
|
||||||
|
|
||||||
|
|
@ -172,9 +172,9 @@ class PluginInsert : public Insert
|
||||||
void auto_state_changed (uint32_t which);
|
void auto_state_changed (uint32_t which);
|
||||||
void automation_list_creation_callback (uint32_t, AutomationList&);
|
void automation_list_creation_callback (uint32_t, AutomationList&);
|
||||||
|
|
||||||
Plugin* plugin_factory (Plugin&);
|
boost::shared_ptr<Plugin> plugin_factory (boost::shared_ptr<Plugin>);
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_insert_h__ */
|
#endif /* __ardour_insert_h__ */
|
||||||
|
|
|
||||||
|
|
@ -393,6 +393,6 @@ public:
|
||||||
int32_t find_output_port_hole ();
|
int32_t find_output_port_hole ();
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /*__ardour_io_h__ */
|
#endif /*__ardour_io_h__ */
|
||||||
|
|
|
||||||
|
|
@ -199,6 +199,6 @@ class Locations : public Stateful, public StateManager
|
||||||
StateManager::State* state_factory (std::string why) const;
|
StateManager::State* state_factory (std::string why) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_location_h__ */
|
#endif /* __ardour_location_h__ */
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ class LogCurveOut : public LogCurve
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_logcurve_h__ */
|
#endif /* __ardour_logcurve_h__ */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -312,6 +312,6 @@ class Panner : public std::vector<StreamPanner*>, public Stateful, public sigc::
|
||||||
static float current_automation_version_number;
|
static float current_automation_version_number;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /*__ardour_panner_h__ */
|
#endif /*__ardour_panner_h__ */
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#ifndef __ardour_ladspa_h__
|
#ifndef __ardour_ladspa_h__
|
||||||
#define __ardour_ladspa_h__
|
#define __ardour_ladspa_h__
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <sigc++/signal.h>
|
#include <sigc++/signal.h>
|
||||||
|
|
||||||
#include <pbd/stateful.h>
|
#include <pbd/stateful.h>
|
||||||
|
|
@ -179,7 +180,7 @@ class Plugin : public Stateful, public sigc::trackable
|
||||||
|
|
||||||
/* this is actually defined in plugin_manager.cc */
|
/* this is actually defined in plugin_manager.cc */
|
||||||
|
|
||||||
Plugin * find_plugin(ARDOUR::Session&, string name, long unique_id, PluginInfo::Type);
|
boost::shared_ptr<Plugin> find_plugin(ARDOUR::Session&, string name, long unique_id, PluginInfo::Type);
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <ardour/types.h>
|
#include <ardour/types.h>
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
@ -26,7 +28,7 @@ class PluginManager {
|
||||||
int add_ladspa_directory (std::string dirpath);
|
int add_ladspa_directory (std::string dirpath);
|
||||||
int add_vst_directory (std::string dirpath);
|
int add_vst_directory (std::string dirpath);
|
||||||
|
|
||||||
Plugin *load (ARDOUR::Session& s, PluginInfo* info);
|
boost::shared_ptr<Plugin> load (ARDOUR::Session& s, PluginInfo* info);
|
||||||
|
|
||||||
static PluginManager* the_manager() { return _manager; }
|
static PluginManager* the_manager() { return _manager; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,6 @@ class Port : public sigc::trackable {
|
||||||
static jack_nframes_t _short_over_length;
|
static jack_nframes_t _short_over_length;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_port_h__ */
|
#endif /* __ardour_port_h__ */
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <sigc++/signal.h>
|
#include <sigc++/signal.h>
|
||||||
|
|
||||||
#include <glibmm/thread.h>
|
#include <glibmm/thread.h>
|
||||||
|
|
@ -64,7 +65,7 @@ class Redirect : public IO
|
||||||
Redirect (const Redirect&);
|
Redirect (const Redirect&);
|
||||||
virtual ~Redirect ();
|
virtual ~Redirect ();
|
||||||
|
|
||||||
static Redirect *clone (const Redirect&);
|
static boost::shared_ptr<Redirect> clone (boost::shared_ptr<const Redirect>);
|
||||||
|
|
||||||
bool active () const { return _active; }
|
bool active () const { return _active; }
|
||||||
void set_active (bool yn, void *src);
|
void set_active (bool yn, void *src);
|
||||||
|
|
@ -148,6 +149,6 @@ class Redirect : public IO
|
||||||
void* _gui; /* generic, we don't know or care what this is */
|
void* _gui; /* generic, we don't know or care what this is */
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_redirect_h__ */
|
#endif /* __ardour_redirect_h__ */
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <pbd/fastlog.h>
|
#include <pbd/fastlog.h>
|
||||||
#include <glibmm/thread.h>
|
#include <glibmm/thread.h>
|
||||||
#include <pbd/xml++.h>
|
#include <pbd/xml++.h>
|
||||||
|
|
@ -57,13 +59,13 @@ class Route : public IO
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
typedef list<Redirect *> RedirectList;
|
typedef list<boost::shared_ptr<Redirect> > RedirectList;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum Flag {
|
enum Flag {
|
||||||
Hidden = 0x1,
|
Hidden = 0x1,
|
||||||
MasterOut = 0x2,
|
MasterOut = 0x2,
|
||||||
ControlOut = 0x4,
|
ControlOut = 0x4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -141,19 +143,19 @@ class Route : public IO
|
||||||
|
|
||||||
void flush_redirects ();
|
void flush_redirects ();
|
||||||
|
|
||||||
template<class T> void foreach_redirect (T *obj, void (T::*func)(Redirect *)) {
|
template<class T> void foreach_redirect (T *obj, void (T::*func)(boost::shared_ptr<Redirect>)) {
|
||||||
Glib::RWLock::ReaderLock lm (redirect_lock);
|
Glib::RWLock::ReaderLock lm (redirect_lock);
|
||||||
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
|
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
|
||||||
(obj->*func) (*i);
|
(obj->*func) (*i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Redirect *nth_redirect (uint32_t n) {
|
boost::shared_ptr<Redirect> nth_redirect (uint32_t n) {
|
||||||
Glib::RWLock::ReaderLock lm (redirect_lock);
|
Glib::RWLock::ReaderLock lm (redirect_lock);
|
||||||
RedirectList::iterator i;
|
RedirectList::iterator i;
|
||||||
for (i = _redirects.begin(); i != _redirects.end() && n; ++i, --n);
|
for (i = _redirects.begin(); i != _redirects.end() && n; ++i, --n);
|
||||||
if (i == _redirects.end()) {
|
if (i == _redirects.end()) {
|
||||||
return 0;
|
return boost::shared_ptr<Redirect> ();
|
||||||
} else {
|
} else {
|
||||||
return *i;
|
return *i;
|
||||||
}
|
}
|
||||||
|
|
@ -161,9 +163,9 @@ class Route : public IO
|
||||||
|
|
||||||
uint32_t max_redirect_outs () const { return redirect_max_outs; }
|
uint32_t max_redirect_outs () const { return redirect_max_outs; }
|
||||||
|
|
||||||
int add_redirect (Redirect *, void *src, uint32_t* err_streams = 0);
|
int add_redirect (boost::shared_ptr<Redirect>, void *src, uint32_t* err_streams = 0);
|
||||||
int add_redirects (const RedirectList&, void *src, uint32_t* err_streams = 0);
|
int add_redirects (const RedirectList&, void *src, uint32_t* err_streams = 0);
|
||||||
int remove_redirect (Redirect *, void *src, uint32_t* err_streams = 0);
|
int remove_redirect (boost::shared_ptr<Redirect>, void *src, uint32_t* err_streams = 0);
|
||||||
int copy_redirects (const Route&, Placement, uint32_t* err_streams = 0);
|
int copy_redirects (const Route&, Placement, uint32_t* err_streams = 0);
|
||||||
int sort_redirects (uint32_t* err_streams = 0);
|
int sort_redirects (uint32_t* err_streams = 0);
|
||||||
|
|
||||||
|
|
@ -212,8 +214,8 @@ class Route : public IO
|
||||||
int set_control_outs (const vector<std::string>& ports);
|
int set_control_outs (const vector<std::string>& ports);
|
||||||
IO* control_outs() { return _control_outs; }
|
IO* control_outs() { return _control_outs; }
|
||||||
|
|
||||||
bool feeds (Route *);
|
bool feeds (boost::shared_ptr<Route>);
|
||||||
set<Route *> fed_by;
|
set<boost::shared_ptr<Route> > fed_by;
|
||||||
|
|
||||||
struct ToggleControllable : public PBD::Controllable {
|
struct ToggleControllable : public PBD::Controllable {
|
||||||
enum ToggleType {
|
enum ToggleType {
|
||||||
|
|
@ -339,12 +341,12 @@ class Route : public IO
|
||||||
/* plugin count handling */
|
/* plugin count handling */
|
||||||
|
|
||||||
struct InsertCount {
|
struct InsertCount {
|
||||||
ARDOUR::Insert& insert;
|
boost::shared_ptr<ARDOUR::Insert> insert;
|
||||||
int32_t cnt;
|
int32_t cnt;
|
||||||
int32_t in;
|
int32_t in;
|
||||||
int32_t out;
|
int32_t out;
|
||||||
|
|
||||||
InsertCount (ARDOUR::Insert& ins) : insert (ins), cnt (-1) {}
|
InsertCount (boost::shared_ptr<ARDOUR::Insert> ins) : insert (ins), cnt (-1) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
int32_t apply_some_plugin_counts (std::list<InsertCount>& iclist);
|
int32_t apply_some_plugin_counts (std::list<InsertCount>& iclist);
|
||||||
|
|
@ -355,6 +357,6 @@ class Route : public IO
|
||||||
void redirect_active_proxy (Redirect*, void*);
|
void redirect_active_proxy (Redirect*, void*);
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR*/
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_route_h__ */
|
#endif /* __ardour_route_h__ */
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class RouteGroup : public Stateful, public sigc::trackable {
|
||||||
enum Flag {
|
enum Flag {
|
||||||
Relative = 0x1,
|
Relative = 0x1,
|
||||||
Active = 0x2,
|
Active = 0x2,
|
||||||
Hidden = 0x4,
|
Hidden = 0x4
|
||||||
};
|
};
|
||||||
|
|
||||||
RouteGroup (Session& s, const string &n, Flag f = Flag(0));
|
RouteGroup (Session& s, const string &n, Flag f = Flag(0));
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,6 @@ class Send : public Redirect {
|
||||||
uint32_t expected_inputs;
|
uint32_t expected_inputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_send_h__ */
|
#endif /* __ardour_send_h__ */
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
#include <pbd/error.h>
|
#include <pbd/error.h>
|
||||||
#include <pbd/undo.h>
|
#include <pbd/undo.h>
|
||||||
#include <pbd/pool.h>
|
#include <pbd/pool.h>
|
||||||
|
#include <pbd/rcu.h>
|
||||||
|
|
||||||
#include <midi++/types.h>
|
#include <midi++/types.h>
|
||||||
#include <midi++/mmc.h>
|
#include <midi++/mmc.h>
|
||||||
|
|
@ -112,9 +113,9 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef std::pair<Route*,bool> RouteBooleanState;
|
typedef std::pair<boost::shared_ptr<Route>,bool> RouteBooleanState;
|
||||||
typedef vector<RouteBooleanState> GlobalRouteBooleanState;
|
typedef vector<RouteBooleanState> GlobalRouteBooleanState;
|
||||||
typedef std::pair<Route*,MeterPoint> RouteMeterState;
|
typedef std::pair<boost::shared_ptr<Route>,MeterPoint> RouteMeterState;
|
||||||
typedef vector<RouteMeterState> GlobalRouteMeterState;
|
typedef vector<RouteMeterState> GlobalRouteMeterState;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -127,7 +128,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
enum SlaveSource {
|
enum SlaveSource {
|
||||||
None = 0,
|
None = 0,
|
||||||
MTC,
|
MTC,
|
||||||
JACK,
|
JACK
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AutoConnectOption {
|
enum AutoConnectOption {
|
||||||
|
|
@ -158,7 +159,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
*/
|
*/
|
||||||
|
|
||||||
StopOnce,
|
StopOnce,
|
||||||
AutoLoop,
|
AutoLoop
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Action {
|
enum Action {
|
||||||
|
|
@ -178,6 +179,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
void* ptr;
|
void* ptr;
|
||||||
bool yes_or_no;
|
bool yes_or_no;
|
||||||
Session::SlaveSource slave;
|
Session::SlaveSource slave;
|
||||||
|
Route* route;
|
||||||
};
|
};
|
||||||
|
|
||||||
list<AudioRange> audio_range;
|
list<AudioRange> audio_range;
|
||||||
|
|
@ -292,27 +294,26 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
typedef list<Diskstream *> DiskstreamList;
|
typedef list<Diskstream *> DiskstreamList;
|
||||||
|
|
||||||
typedef list<Route *> RouteList;
|
typedef std::list<boost::shared_ptr<Route> > RouteList;
|
||||||
|
|
||||||
RouteList get_routes() const {
|
boost::shared_ptr<RouteList> get_routes() const {
|
||||||
Glib::RWLock::ReaderLock rlock (route_lock);
|
return routes.reader ();
|
||||||
return routes; /* XXX yes, force a copy */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t nroutes() const { return routes.size(); }
|
uint32_t nroutes() const { return routes.reader()->size(); }
|
||||||
uint32_t ntracks () const;
|
uint32_t ntracks () const;
|
||||||
uint32_t nbusses () const;
|
uint32_t nbusses () const;
|
||||||
|
|
||||||
struct RoutePublicOrderSorter {
|
struct RoutePublicOrderSorter {
|
||||||
bool operator() (Route *, Route *b);
|
bool operator() (boost::shared_ptr<Route>, boost::shared_ptr<Route> b);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T> void foreach_route (T *obj, void (T::*func)(Route&));
|
template<class T> void foreach_route (T *obj, void (T::*func)(Route&));
|
||||||
template<class T> void foreach_route (T *obj, void (T::*func)(Route*));
|
template<class T> void foreach_route (T *obj, void (T::*func)(boost::shared_ptr<Route>));
|
||||||
template<class T, class A> void foreach_route (T *obj, void (T::*func)(Route&, A), A arg);
|
template<class T, class A> void foreach_route (T *obj, void (T::*func)(Route&, A), A arg);
|
||||||
|
|
||||||
Route *route_by_name (string);
|
boost::shared_ptr<Route> route_by_name (string);
|
||||||
Route *route_by_remote_id (uint32_t id);
|
boost::shared_ptr<Route> route_by_remote_id (uint32_t id);
|
||||||
|
|
||||||
bool route_name_unique (string) const;
|
bool route_name_unique (string) const;
|
||||||
|
|
||||||
|
|
@ -354,7 +355,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
sigc::signal<void> DurationChanged;
|
sigc::signal<void> DurationChanged;
|
||||||
sigc::signal<void> HaltOnXrun;
|
sigc::signal<void> HaltOnXrun;
|
||||||
|
|
||||||
sigc::signal<void,Route*> RouteAdded;
|
sigc::signal<void,boost::shared_ptr<Route> > RouteAdded;
|
||||||
sigc::signal<void,Diskstream*> DiskstreamAdded;
|
sigc::signal<void,Diskstream*> DiskstreamAdded;
|
||||||
|
|
||||||
void request_roll ();
|
void request_roll ();
|
||||||
|
|
@ -505,9 +506,6 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
void add_instant_xml (XMLNode&, const std::string& dir);
|
void add_instant_xml (XMLNode&, const std::string& dir);
|
||||||
|
|
||||||
void swap_configuration(Configuration** new_config);
|
|
||||||
void copy_configuration(Configuration* new_config);
|
|
||||||
|
|
||||||
enum StateOfTheState {
|
enum StateOfTheState {
|
||||||
Clean = 0x0,
|
Clean = 0x0,
|
||||||
Dirty = 0x1,
|
Dirty = 0x1,
|
||||||
|
|
@ -548,15 +546,19 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
/* fundamental operations. duh. */
|
/* fundamental operations. duh. */
|
||||||
|
|
||||||
AudioTrack *new_audio_track (int input_channels, int output_channels, TrackMode mode = Normal);
|
boost::shared_ptr<AudioTrack> new_audio_track (int input_channels, int output_channels, TrackMode mode = Normal);
|
||||||
Route *new_audio_route (int input_channels, int output_channels);
|
boost::shared_ptr<Route> new_audio_route (int input_channels, int output_channels);
|
||||||
|
|
||||||
MidiTrack *new_midi_track (TrackMode mode = Normal);
|
boost::shared_ptr<MidiTrack> new_midi_track (TrackMode mode = Normal);
|
||||||
Route *new_midi_route ();
|
boost::shared_ptr<Route> new_midi_route ();
|
||||||
|
|
||||||
void remove_route (Route&);
|
|
||||||
void resort_routes (void *src);
|
|
||||||
|
|
||||||
|
void remove_route (boost::shared_ptr<Route>);
|
||||||
|
void resort_routes ();
|
||||||
|
void resort_routes_using (boost::shared_ptr<RouteList>);
|
||||||
|
void resort_routes_proxy (void* src) {
|
||||||
|
resort_routes ();
|
||||||
|
}
|
||||||
|
|
||||||
AudioEngine &engine() { return _engine; };
|
AudioEngine &engine() { return _engine; };
|
||||||
|
|
||||||
/* configuration. there should really be accessors/mutators
|
/* configuration. there should really be accessors/mutators
|
||||||
|
|
@ -735,7 +737,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
/* auditioning */
|
/* auditioning */
|
||||||
|
|
||||||
Auditioner& the_auditioner() { return *auditioner; }
|
boost::shared_ptr<Auditioner> the_auditioner() { return auditioner; }
|
||||||
void audition_playlist ();
|
void audition_playlist ();
|
||||||
void audition_region (AudioRegion&);
|
void audition_region (AudioRegion&);
|
||||||
void cancel_audition ();
|
void cancel_audition ();
|
||||||
|
|
@ -774,8 +776,8 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
/* control/master out */
|
/* control/master out */
|
||||||
|
|
||||||
IO* control_out() const { return _control_out; }
|
boost::shared_ptr<IO> control_out() const { return _control_out; }
|
||||||
IO* master_out() const { return _master_out; }
|
boost::shared_ptr<IO> master_out() const { return _master_out; }
|
||||||
|
|
||||||
/* insert/send management */
|
/* insert/send management */
|
||||||
|
|
||||||
|
|
@ -870,7 +872,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
/* clicking */
|
/* clicking */
|
||||||
|
|
||||||
IO& click_io() { return *_click_io; }
|
boost::shared_ptr<IO> click_io() { return _click_io; }
|
||||||
void set_clicking (bool yn);
|
void set_clicking (bool yn);
|
||||||
bool get_clicking() const;
|
bool get_clicking() const;
|
||||||
|
|
||||||
|
|
@ -1040,9 +1042,9 @@ class Session : public sigc::trackable, public Stateful
|
||||||
float _meter_falloff;
|
float _meter_falloff;
|
||||||
bool _end_location_is_free;
|
bool _end_location_is_free;
|
||||||
|
|
||||||
void set_worst_io_latencies (bool take_lock);
|
void set_worst_io_latencies ();
|
||||||
void set_worst_io_latencies_x (IOChange asifwecare, void *ignored) {
|
void set_worst_io_latencies_x (IOChange asifwecare, void *ignored) {
|
||||||
set_worst_io_latencies (true);
|
set_worst_io_latencies ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_latency_compensation_proxy (void* ignored);
|
void update_latency_compensation_proxy (void* ignored);
|
||||||
|
|
@ -1481,13 +1483,13 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
/* routes stuff */
|
/* routes stuff */
|
||||||
|
|
||||||
RouteList routes;
|
SerializedRCUManager<RouteList> routes;
|
||||||
mutable Glib::RWLock route_lock;
|
|
||||||
void add_route (Route*);
|
void add_route (boost::shared_ptr<Route>);
|
||||||
uint32_t destructive_index;
|
uint32_t destructive_index;
|
||||||
|
|
||||||
int load_routes (const XMLNode&);
|
int load_routes (const XMLNode&);
|
||||||
Route* XMLRouteFactory (const XMLNode&);
|
boost::shared_ptr<Route> XMLRouteFactory (const XMLNode&);
|
||||||
|
|
||||||
/* mixer stuff */
|
/* mixer stuff */
|
||||||
|
|
||||||
|
|
@ -1497,7 +1499,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
bool currently_soloing;
|
bool currently_soloing;
|
||||||
|
|
||||||
void route_mute_changed (void *src);
|
void route_mute_changed (void *src);
|
||||||
void route_solo_changed (void *src, Route *);
|
void route_solo_changed (void *src, boost::shared_ptr<Route>);
|
||||||
void catch_up_on_solo ();
|
void catch_up_on_solo ();
|
||||||
void update_route_solo_state ();
|
void update_route_solo_state ();
|
||||||
void modify_solo_mute (bool, bool);
|
void modify_solo_mute (bool, bool);
|
||||||
|
|
@ -1564,7 +1566,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
/* AUDITIONING */
|
/* AUDITIONING */
|
||||||
|
|
||||||
Auditioner *auditioner;
|
boost::shared_ptr<Auditioner> auditioner;
|
||||||
void set_audition (AudioRegion*);
|
void set_audition (AudioRegion*);
|
||||||
void non_realtime_set_audition ();
|
void non_realtime_set_audition ();
|
||||||
AudioRegion *pending_audition_region;
|
AudioRegion *pending_audition_region;
|
||||||
|
|
@ -1681,7 +1683,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
|
|
||||||
Clicks clicks;
|
Clicks clicks;
|
||||||
bool _clicking;
|
bool _clicking;
|
||||||
IO* _click_io;
|
boost::shared_ptr<IO> _click_io;
|
||||||
Sample* click_data;
|
Sample* click_data;
|
||||||
Sample* click_emphasis_data;
|
Sample* click_emphasis_data;
|
||||||
jack_nframes_t click_length;
|
jack_nframes_t click_length;
|
||||||
|
|
@ -1713,8 +1715,8 @@ class Session : public sigc::trackable, public Stateful
|
||||||
/* main outs */
|
/* main outs */
|
||||||
uint32_t main_outs;
|
uint32_t main_outs;
|
||||||
|
|
||||||
IO* _master_out;
|
boost::shared_ptr<IO> _master_out;
|
||||||
IO* _control_out;
|
boost::shared_ptr<IO> _control_out;
|
||||||
|
|
||||||
AutoConnectOption input_auto_connect;
|
AutoConnectOption input_auto_connect;
|
||||||
AutoConnectOption output_auto_connect;
|
AutoConnectOption output_auto_connect;
|
||||||
|
|
@ -1756,6 +1758,6 @@ class Session : public sigc::trackable, public Stateful
|
||||||
void remove_controllable (PBD::Controllable*);
|
void remove_controllable (PBD::Controllable*);
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __ardour_session_h__ */
|
#endif /* __ardour_session_h__ */
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,10 @@ namespace ARDOUR {
|
||||||
template<class T> void
|
template<class T> void
|
||||||
Session::foreach_route (T *obj, void (T::*func)(Route&))
|
Session::foreach_route (T *obj, void (T::*func)(Route&))
|
||||||
{
|
{
|
||||||
RouteList public_order;
|
boost::shared_ptr<RouteList> r = routes.reader();
|
||||||
|
RouteList public_order (*r);
|
||||||
{
|
|
||||||
Glib::RWLock::ReaderLock lm (route_lock);
|
|
||||||
public_order = routes;
|
|
||||||
}
|
|
||||||
|
|
||||||
RoutePublicOrderSorter cmp;
|
RoutePublicOrderSorter cmp;
|
||||||
|
|
||||||
public_order.sort (cmp);
|
public_order.sort (cmp);
|
||||||
|
|
||||||
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
|
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
|
||||||
|
|
@ -49,16 +45,12 @@ Session::foreach_route (T *obj, void (T::*func)(Route&))
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T> void
|
template<class T> void
|
||||||
Session::foreach_route (T *obj, void (T::*func)(Route*))
|
Session::foreach_route (T *obj, void (T::*func)(boost::shared_ptr<Route>))
|
||||||
{
|
{
|
||||||
RouteList public_order;
|
boost::shared_ptr<RouteList> r = routes.reader();
|
||||||
|
RouteList public_order (*r);
|
||||||
{
|
|
||||||
Glib::RWLock::ReaderLock lm (route_lock);
|
|
||||||
public_order = routes;
|
|
||||||
}
|
|
||||||
|
|
||||||
RoutePublicOrderSorter cmp;
|
RoutePublicOrderSorter cmp;
|
||||||
|
|
||||||
public_order.sort (cmp);
|
public_order.sort (cmp);
|
||||||
|
|
||||||
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
|
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
|
||||||
|
|
@ -66,18 +58,13 @@ Session::foreach_route (T *obj, void (T::*func)(Route*))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T, class A> void
|
template<class T, class A> void
|
||||||
Session::foreach_route (T *obj, void (T::*func)(Route&, A), A arg1)
|
Session::foreach_route (T *obj, void (T::*func)(Route&, A), A arg1)
|
||||||
{
|
{
|
||||||
RouteList public_order;
|
boost::shared_ptr<RouteList> r = routes.reader();
|
||||||
|
RouteList public_order (*r);
|
||||||
{
|
|
||||||
Glib::RWLock::ReaderLock lm (route_lock);
|
|
||||||
public_order = routes;
|
|
||||||
}
|
|
||||||
|
|
||||||
RoutePublicOrderSorter cmp;
|
RoutePublicOrderSorter cmp;
|
||||||
|
|
||||||
public_order.sort (cmp);
|
public_order.sort (cmp);
|
||||||
|
|
||||||
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
|
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class SndFileSource : public AudioFileSource {
|
||||||
int setup_broadcast_info (jack_nframes_t when, struct tm&, time_t);
|
int setup_broadcast_info (jack_nframes_t when, struct tm&, time_t);
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif /* __sndfile_source_h__ */
|
#endif /* __sndfile_source_h__ */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,15 +103,15 @@ class Track : public Route
|
||||||
MeterPoint _saved_meter_point;
|
MeterPoint _saved_meter_point;
|
||||||
TrackMode _mode;
|
TrackMode _mode;
|
||||||
|
|
||||||
//private:
|
//private: (FIXME)
|
||||||
struct FreezeRecordInsertInfo {
|
struct FreezeRecordInsertInfo {
|
||||||
FreezeRecordInsertInfo(XMLNode& st)
|
FreezeRecordInsertInfo(XMLNode& st, boost::shared_ptr<Insert> ins)
|
||||||
: state (st), insert (0) {}
|
: state (st), insert (ins) {}
|
||||||
|
|
||||||
XMLNode state;
|
XMLNode state;
|
||||||
Insert* insert;
|
boost::shared_ptr<Insert> insert;
|
||||||
PBD::ID id;
|
PBD::ID id;
|
||||||
UndoAction memento;
|
UndoAction memento;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FreezeRecord {
|
struct FreezeRecord {
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ namespace ARDOUR {
|
||||||
PanAutomation = 0x2,
|
PanAutomation = 0x2,
|
||||||
PluginAutomation = 0x4,
|
PluginAutomation = 0x4,
|
||||||
SoloAutomation = 0x8,
|
SoloAutomation = 0x8,
|
||||||
MuteAutomation = 0x10,
|
MuteAutomation = 0x10
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AutoState {
|
enum AutoState {
|
||||||
|
|
@ -192,7 +192,7 @@ namespace ARDOUR {
|
||||||
|
|
||||||
enum EditMode {
|
enum EditMode {
|
||||||
Slide,
|
Slide,
|
||||||
Splice,
|
Splice
|
||||||
};
|
};
|
||||||
|
|
||||||
enum RegionPoint {
|
enum RegionPoint {
|
||||||
|
|
@ -245,7 +245,7 @@ namespace ARDOUR {
|
||||||
PeakDatum min;
|
PeakDatum min;
|
||||||
PeakDatum max;
|
PeakDatum max;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
std::istream& operator>>(std::istream& o, ARDOUR::SampleFormat& sf);
|
std::istream& operator>>(std::istream& o, ARDOUR::SampleFormat& sf);
|
||||||
std::istream& operator>>(std::istream& o, ARDOUR::HeaderFormat& sf);
|
std::istream& operator>>(std::istream& o, ARDOUR::HeaderFormat& sf);
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ using namespace PBD;
|
||||||
|
|
||||||
static char* SOUNDFILE = "http://ardour.org/ontology/Soundfile";
|
static char* SOUNDFILE = "http://ardour.org/ontology/Soundfile";
|
||||||
|
|
||||||
|
string AudioLibrary::state_node_name = "AudioLibrary";
|
||||||
|
|
||||||
AudioLibrary::AudioLibrary ()
|
AudioLibrary::AudioLibrary ()
|
||||||
{
|
{
|
||||||
// sfdb_paths.push_back("/Users/taybin/sounds");
|
// sfdb_paths.push_back("/Users/taybin/sounds");
|
||||||
|
|
@ -74,17 +76,10 @@ AudioLibrary::AudioLibrary ()
|
||||||
}
|
}
|
||||||
|
|
||||||
lrdf_free_statements(matches);
|
lrdf_free_statements(matches);
|
||||||
|
|
||||||
XMLNode* state = instant_xml(X_("AudioLibrary"), get_user_ardour_path());
|
|
||||||
if (state) {
|
|
||||||
set_state(*state);
|
|
||||||
}
|
|
||||||
scan_paths();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioLibrary::~AudioLibrary ()
|
AudioLibrary::~AudioLibrary ()
|
||||||
{
|
{
|
||||||
add_instant_xml(get_state(), get_user_ardour_path());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -361,6 +356,8 @@ void
|
||||||
AudioLibrary::set_paths (vector<string> paths)
|
AudioLibrary::set_paths (vector<string> paths)
|
||||||
{
|
{
|
||||||
sfdb_paths = paths;
|
sfdb_paths = paths;
|
||||||
|
|
||||||
|
scan_paths ();
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<string>
|
vector<string>
|
||||||
|
|
@ -477,7 +474,7 @@ AudioLibrary::set_state (const XMLNode& node)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sfdb_paths = paths;
|
set_paths (paths);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -424,8 +424,8 @@ AudioTrack::set_state_part_two ()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()));
|
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()),
|
||||||
frii->insert = 0;
|
boost::shared_ptr<Insert>());
|
||||||
frii->id = prop->value ();
|
frii->id = prop->value ();
|
||||||
_freeze_record.insert_info.push_back (frii);
|
_freeze_record.insert_info.push_back (frii);
|
||||||
}
|
}
|
||||||
|
|
@ -740,9 +740,9 @@ AudioTrack::export_stuff (vector<Sample*>& buffers, char * workbuf, uint32_t nbu
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = _redirects.begin(); i != _redirects.end(); ++i) {
|
for (i = _redirects.begin(); i != _redirects.end(); ++i) {
|
||||||
Insert *insert;
|
boost::shared_ptr<Insert> insert;
|
||||||
|
|
||||||
if ((insert = dynamic_cast<Insert*>(*i)) != 0) {
|
if ((insert = boost::dynamic_pointer_cast<Insert>(*i)) != 0) {
|
||||||
switch (insert->placement()) {
|
switch (insert->placement()) {
|
||||||
case PreFader:
|
case PreFader:
|
||||||
insert->run (buffers, nbufs, nframes, 0);
|
insert->run (buffers, nbufs, nframes, 0);
|
||||||
|
|
@ -778,9 +778,9 @@ AudioTrack::export_stuff (vector<Sample*>& buffers, char * workbuf, uint32_t nbu
|
||||||
if (post_fader_work) {
|
if (post_fader_work) {
|
||||||
|
|
||||||
for (i = _redirects.begin(); i != _redirects.end(); ++i) {
|
for (i = _redirects.begin(); i != _redirects.end(); ++i) {
|
||||||
PluginInsert *insert;
|
boost::shared_ptr<PluginInsert> insert;
|
||||||
|
|
||||||
if ((insert = dynamic_cast<PluginInsert*>(*i)) != 0) {
|
if ((insert = boost::dynamic_pointer_cast<PluginInsert>(*i)) != 0) {
|
||||||
switch ((*i)->placement()) {
|
switch ((*i)->placement()) {
|
||||||
case PreFader:
|
case PreFader:
|
||||||
break;
|
break;
|
||||||
|
|
@ -820,7 +820,6 @@ AudioTrack::bounce_range (jack_nframes_t start, jack_nframes_t end, InterThreadI
|
||||||
void
|
void
|
||||||
AudioTrack::freeze (InterThreadInfo& itt)
|
AudioTrack::freeze (InterThreadInfo& itt)
|
||||||
{
|
{
|
||||||
Insert* insert;
|
|
||||||
vector<AudioSource*> srcs;
|
vector<AudioSource*> srcs;
|
||||||
string new_playlist_name;
|
string new_playlist_name;
|
||||||
Playlist* new_playlist;
|
Playlist* new_playlist;
|
||||||
|
|
@ -851,7 +850,7 @@ AudioTrack::freeze (InterThreadInfo& itt)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n == (UINT_MAX-1)) {
|
if (n == (UINT_MAX-1)) {
|
||||||
error << string_compose (X_("There Are too many frozen versions of playlist \"%1\""
|
error << string_compose (X_("There are too many frozen versions of playlist \"%1\""
|
||||||
" to create another one"), _freeze_record.playlist->name())
|
" to create another one"), _freeze_record.playlist->name())
|
||||||
<< endmsg;
|
<< endmsg;
|
||||||
return;
|
return;
|
||||||
|
|
@ -869,11 +868,12 @@ AudioTrack::freeze (InterThreadInfo& itt)
|
||||||
|
|
||||||
for (RedirectList::iterator r = _redirects.begin(); r != _redirects.end(); ++r) {
|
for (RedirectList::iterator r = _redirects.begin(); r != _redirects.end(); ++r) {
|
||||||
|
|
||||||
if ((insert = dynamic_cast<Insert*>(*r)) != 0) {
|
boost::shared_ptr<Insert> insert;
|
||||||
|
|
||||||
|
if ((insert = boost::dynamic_pointer_cast<Insert>(*r)) != 0) {
|
||||||
|
|
||||||
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo ((*r)->get_state());
|
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo ((*r)->get_state(), insert);
|
||||||
|
|
||||||
frii->insert = insert;
|
|
||||||
frii->id = insert->id();
|
frii->id = insert->id();
|
||||||
frii->memento = (*r)->get_memento();
|
frii->memento = (*r)->get_memento();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,10 @@ AudioFileSource::create (const string& idstr, Flag flags)
|
||||||
{
|
{
|
||||||
AudioFileSource* es = 0;
|
AudioFileSource* es = 0;
|
||||||
|
|
||||||
|
if (flags & Destructive) {
|
||||||
|
return new DestructiveFileSource (idstr, flags);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
es = new CoreAudioSource (idstr, flags);
|
es = new CoreAudioSource (idstr, flags);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -640,7 +640,7 @@ AudioSource::read_peaks (PeakData *peaks, jack_nframes_t npeaks, jack_nframes_t
|
||||||
|
|
||||||
to_read = min (chunksize, (_length - current_frame));
|
to_read = min (chunksize, (_length - current_frame));
|
||||||
|
|
||||||
if ((frames_read = read_unlocked (raw_staging, current_frame, to_read, workbuf)) < 0) {
|
if ((frames_read = read_unlocked (raw_staging, current_frame, to_read, workbuf)) == 0) {
|
||||||
error << string_compose(_("AudioSource[%1]: peak read - cannot read %2 samples at offset %3")
|
error << string_compose(_("AudioSource[%1]: peak read - cannot read %2 samples at offset %3")
|
||||||
, _name, to_read, current_frame)
|
, _name, to_read, current_frame)
|
||||||
<< endmsg;
|
<< endmsg;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue