fix up use of plugin input counts when running; SAE menu tweaks; fix up management and display of edit point selection; AU window stuff

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3117 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-02-23 15:22:58 +00:00
parent 80c6243429
commit 7e53102018
16 changed files with 103 additions and 58 deletions

View file

@ -155,6 +155,7 @@ static const char* authors[] = {
N_("Colin Fletcher"), N_("Colin Fletcher"),
N_("Roland Stigge"), N_("Roland Stigge"),
N_("Audun Halland"), N_("Audun Halland"),
N_("Armand Klenk"),
0 0
}; };

View file

@ -54,13 +54,14 @@
<menuitem action='Rewind'/> <menuitem action='Rewind'/>
<menuitem action='TransitionToRoll'/> <menuitem action='TransitionToRoll'/>
<menuitem action='TransitionToReverse'/> <menuitem action='TransitionToReverse'/>
<menuitem action='center-playhead'/>
<menuitem action='set-playhead'/>
<menuitem action='playhead-to-edit'/>
<menuitem action='nudge-playhead-forward'/> <menuitem action='nudge-playhead-forward'/>
<menuitem action='nudge-playhead-backward'/> <menuitem action='nudge-playhead-backward'/>
<menu action="MovePlayHeadMenu"> <menu action="MovePlayHeadMenu">
<menuitem action='set-playhead'/>
<menuitem action='playhead-to-edit'/>
<menuitem action='center-playhead'/>
<separator/>
<menuitem action='tab-to-transient-forwards'/> <menuitem action='tab-to-transient-forwards'/>
<menuitem action='tab-to-transient-backwards'/> <menuitem action='tab-to-transient-backwards'/>
<separator/> <separator/>
@ -107,7 +108,6 @@
<menuitem action='ToggleAutoPlay'/> <menuitem action='ToggleAutoPlay'/>
<menuitem action='ToggleAutoReturn'/> <menuitem action='ToggleAutoReturn'/>
<menuitem action='ToggleClick'/> <menuitem action='ToggleClick'/>
<menuitem action='toggle-follow-playhead'/>
<separator/> <separator/>
<menu action='LocateToMarker'> <menu action='LocateToMarker'>
</menu> </menu>
@ -287,9 +287,9 @@
<menuitem action='zoom-focus-mouse'/> <menuitem action='zoom-focus-mouse'/>
</menu> </menu>
<menu action="EditPointMenu"> <menu action="EditPointMenu">
<menuitem action='edit-point-playhead'/> <menuitem action='edit-at-playhead'/>
<menuitem action='edit-point-mouse'/> <menuitem action='edit-at-mouse'/>
<menuitem action='edit-point-marker'/> <menuitem action='edit-at-selected-marker'/>
</menu> </menu>
<menu action='KeyMouseActions'> <menu action='KeyMouseActions'>
<menuitem action='select-next-route'/> <menuitem action='select-next-route'/>
@ -312,6 +312,7 @@
<menuitem action='cycle-snap-mode'/> <menuitem action='cycle-snap-mode'/>
<menuitem action='cycle-snap-choice'/> <menuitem action='cycle-snap-choice'/>
</menu> </menu>
<menuitem action='toggle-follow-playhead'/>
</menu> </menu>
</menubar> </menubar>

View file

@ -341,7 +341,6 @@ AUPluginUI::get_nswindow ()
void void
AUPluginUI::activate () AUPluginUI::activate ()
{ {
return;
if (carbon_window && cocoa_parent) { if (carbon_window && cocoa_parent) {
cerr << "APP activated, activate carbon window " << insert->name() << endl; cerr << "APP activated, activate carbon window " << insert->name() << endl;
_activating_from_app = true; _activating_from_app = true;
@ -391,7 +390,7 @@ AUPluginUI::carbon_event (EventHandlerCallRef nextHandlerRef, EventRef event)
break; break;
case kEventWindowHandleDeactivate: case kEventWindowHandleDeactivate:
cerr << "carbon window for " << insert->name() << " deactivated\n"; cerr << "carbon window for " << insert->name() << " would have been deactivated\n";
// never deactivate the carbon window // never deactivate the carbon window
return noErr; return noErr;
break; break;

View file

@ -723,8 +723,7 @@ Editor::Editor ()
set_snap_to (snap_type); set_snap_to (snap_type);
snap_mode = SnapOff; snap_mode = SnapOff;
set_snap_mode (snap_mode); set_snap_mode (snap_mode);
_edit_point = EditAtMouse; set_edit_point_preference (EditAtMouse, true);
set_edit_point_preference (_edit_point);
XMLNode* node = ARDOUR_UI::instance()->editor_settings(); XMLNode* node = ARDOUR_UI::instance()->editor_settings();
set_state (*node); set_state (*node);
@ -2157,9 +2156,9 @@ Editor::set_snap_mode (SnapMode mode)
instant_save (); instant_save ();
} }
void void
Editor::set_edit_point_preference (EditPoint ep) Editor::set_edit_point_preference (EditPoint ep, bool force)
{ {
bool changed = _edit_point != ep; bool changed = (_edit_point != ep);
_edit_point = ep; _edit_point = ep;
string str = edit_point_strings[(int)ep]; string str = edit_point_strings[(int)ep];
@ -2170,7 +2169,7 @@ Editor::set_edit_point_preference (EditPoint ep)
set_canvas_cursor (); set_canvas_cursor ();
if (!changed) { if (!force && !changed) {
return; return;
} }
@ -2194,6 +2193,25 @@ Editor::set_edit_point_preference (EditPoint ep)
break; break;
} }
const char* action;
switch (_edit_point) {
case EditAtPlayhead:
action = "edit-at-playhead";
break;
case EditAtSelectedMarker:
action = "edit-at-marker";
break;
case EditAtMouse:
action = "edit-at-mouse";
break;
}
Glib::RefPtr<Action> act = ActionManager::get_action ("Editor", action);
if (act) {
Glib::RefPtr<RadioAction>::cast_dynamic(act)->set_active (true);
}
instant_save (); instant_save ();
} }
@ -2267,7 +2285,7 @@ Editor::set_state (const XMLNode& node)
} }
if ((prop = node.property ("edit-point"))) { if ((prop = node.property ("edit-point"))) {
set_edit_point_preference ((EditPoint) string_2_enum (prop->value(), _edit_point)); set_edit_point_preference ((EditPoint) string_2_enum (prop->value(), _edit_point), true);
} }
if ((prop = node.property ("mouse-mode"))) { if ((prop = node.property ("mouse-mode"))) {

View file

@ -2068,7 +2068,7 @@ public:
Gtk::ComboBoxText edit_point_selector; Gtk::ComboBoxText edit_point_selector;
void set_edit_point_preference (Editing::EditPoint ep); void set_edit_point_preference (Editing::EditPoint ep, bool force = false);
void cycle_edit_point (bool with_marker); void cycle_edit_point (bool with_marker);
void set_edit_point (); void set_edit_point ();
void edit_point_selection_done (); void edit_point_selection_done ();

View file

@ -267,32 +267,32 @@ Editor::register_actions ()
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "goto", _("goto"), mem_fun(*this, &Editor::goto_frame)); act = ActionManager::register_action (editor_actions, "goto", _("goto"), mem_fun(*this, &Editor::goto_frame));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "center-playhead", _("to Center"), mem_fun(*this, &Editor::center_playhead)); act = ActionManager::register_action (editor_actions, "center-playhead", _("Center Playhead"), mem_fun(*this, &Editor::center_playhead));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "center-edit-cursor", _("to Center"), mem_fun(*this, &Editor::center_edit_point)); act = ActionManager::register_action (editor_actions, "center-edit-cursor", _("Center Active Marker"), mem_fun(*this, &Editor::center_edit_point));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "scroll-playhead-forward", _("Playhead forward"), bind (mem_fun(*this, &Editor::scroll_playhead), true));; act = ActionManager::register_action (editor_actions, "scroll-playhead-forward", _("Playhead Forward"), bind (mem_fun(*this, &Editor::scroll_playhead), true));;
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "scroll-playhead-backward", _("Playhead Backward"), bind (mem_fun(*this, &Editor::scroll_playhead), false)); act = ActionManager::register_action (editor_actions, "scroll-playhead-backward", _("Playhead Backward"), bind (mem_fun(*this, &Editor::scroll_playhead), false));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "playhead-to-edit", _("to Edit"), bind (mem_fun(*this, &Editor::cursor_align), true)); act = ActionManager::register_action (editor_actions, "playhead-to-edit", _("Playhead To Active Mark"), bind (mem_fun(*this, &Editor::cursor_align), true));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "edit-to-playhead", _("to Playhead"), bind (mem_fun(*this, &Editor::cursor_align), false)); act = ActionManager::register_action (editor_actions, "edit-to-playhead", _("Active Mark To Playhead"), bind (mem_fun(*this, &Editor::cursor_align), false));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "trim-front", _("Trim start at edit point"), mem_fun(*this, &Editor::trim_region_front)); act = ActionManager::register_action (editor_actions, "trim-front", _("Trim Start At Edit Point"), mem_fun(*this, &Editor::trim_region_front));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
ActionManager::region_selection_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "trim-back", _("Trim end at edit point"), mem_fun(*this, &Editor::trim_region_back)); act = ActionManager::register_action (editor_actions, "trim-back", _("Trim End At Edit Point"), mem_fun(*this, &Editor::trim_region_back));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
ActionManager::region_selection_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "trim-from-start", _("Start to edit point"), mem_fun(*this, &Editor::trim_region_from_edit_point)); act = ActionManager::register_action (editor_actions, "trim-from-start", _("Start To Edit Point"), mem_fun(*this, &Editor::trim_region_from_edit_point));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
ActionManager::region_selection_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "trim-to-end", _("Edit point to end"), mem_fun(*this, &Editor::trim_region_to_edit_point)); act = ActionManager::register_action (editor_actions, "trim-to-end", _("Edit Point To End"), mem_fun(*this, &Editor::trim_region_to_edit_point));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
ActionManager::region_selection_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "trim-region-to-loop", _("Trim To Loop"), mem_fun(*this, &Editor::trim_region_to_loop)); act = ActionManager::register_action (editor_actions, "trim-region-to-loop", _("Trim To Loop"), mem_fun(*this, &Editor::trim_region_to_loop));
@ -359,9 +359,9 @@ Editor::register_actions ()
act = ActionManager::register_action (editor_actions, "brush-at-mouse", _("Brush at Mouse"), mem_fun(*this, &Editor::kbd_brush)); act = ActionManager::register_action (editor_actions, "brush-at-mouse", _("Brush at Mouse"), mem_fun(*this, &Editor::kbd_brush));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "set-playhead", _("Set Playhead"), mem_fun(*this, &Editor::set_playhead_cursor)); act = ActionManager::register_action (editor_actions, "set-playhead", _("Playhead to Mouse"), mem_fun(*this, &Editor::set_playhead_cursor));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "set-edit-point", _("Set Edit Point"), mem_fun(*this, &Editor::set_edit_point)); act = ActionManager::register_action (editor_actions, "set-edit-point", _("Edit Point to Mouse"), mem_fun(*this, &Editor::set_edit_point));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "duplicate-region", _("Duplicate Region"), bind (mem_fun(*this, &Editor::duplicate_dialog), false)); act = ActionManager::register_action (editor_actions, "duplicate-region", _("Duplicate Region"), bind (mem_fun(*this, &Editor::duplicate_dialog), false));
@ -561,10 +561,6 @@ Editor::register_actions ()
ActionManager::register_radio_action (editor_actions, edit_point_group, X_("edit-at-mouse"), _("Mouse"), (bind (mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtPlayhead))); ActionManager::register_radio_action (editor_actions, edit_point_group, X_("edit-at-mouse"), _("Mouse"), (bind (mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtPlayhead)));
ActionManager::register_radio_action (editor_actions, edit_point_group, X_("edit-at-selected-marker"), _("Marker"), (bind (mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtPlayhead))); ActionManager::register_radio_action (editor_actions, edit_point_group, X_("edit-at-selected-marker"), _("Marker"), (bind (mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtPlayhead)));
ActionManager::register_action (editor_actions, "edit-point-marker", _("Marker"), bind (mem_fun (*this, &Editor::set_edit_point_preference), EditAtSelectedMarker));
ActionManager::register_action (editor_actions, "edit-point-playhead", _("Playhead"), bind (mem_fun (*this, &Editor::set_edit_point_preference), EditAtPlayhead));
ActionManager::register_action (editor_actions, "edit-point-mouse", _("Mouse"), bind (mem_fun (*this, &Editor::set_edit_point_preference), EditAtMouse));
ActionManager::register_action (editor_actions, "cycle-edit-point", _("Change edit point"), bind (mem_fun (*this, &Editor::cycle_edit_point), false)); ActionManager::register_action (editor_actions, "cycle-edit-point", _("Change edit point"), bind (mem_fun (*this, &Editor::cycle_edit_point), false));
ActionManager::register_action (editor_actions, "cycle-edit-point-with-marker", _("Change edit point (w/Marker)"), bind (mem_fun (*this, &Editor::cycle_edit_point), true)); ActionManager::register_action (editor_actions, "cycle-edit-point-with-marker", _("Change edit point (w/Marker)"), bind (mem_fun (*this, &Editor::cycle_edit_point), true));

View file

@ -127,7 +127,7 @@ ExportDialog::ExportDialog(PublicEditor& e)
set_title (title.get_string()); set_title (title.get_string());
set_wmclass (X_("ardour_export"), "Ardour"); set_wmclass (X_("ardour_export"), "Ardour");
set_name ("ExportWindow"); set_name ("ExportWindow");
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK); set_events (get_events()|Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
spec.running = false; spec.running = false;
@ -388,6 +388,13 @@ ExportDialog::~ExportDialog()
{ {
} }
bool
ExportDialog::on_event (GdkEvent* ev)
{
cerr << "ED event type " << ev->type << endl;
return false;
}
void void
ExportDialog::do_not_allow_track_and_master_selection() ExportDialog::do_not_allow_track_and_master_selection()
{ {

View file

@ -47,6 +47,8 @@ class ExportDialog : public ArdourDialog
virtual Gtk::FileChooserAction browse_action() const { return Gtk::FILE_CHOOSER_ACTION_SAVE; } virtual Gtk::FileChooserAction browse_action() const { return Gtk::FILE_CHOOSER_ACTION_SAVE; }
bool on_event (GdkEvent* ev);
protected: protected:
ARDOUR::AudioExportSpecification spec; ARDOUR::AudioExportSpecification spec;
Gtk::Frame file_frame; Gtk::Frame file_frame;

View file

@ -268,10 +268,15 @@ void
OptionEditor::setup_misc_options () OptionEditor::setup_misc_options ()
{ {
Gtk::HBox* hbox; Gtk::HBox* hbox;
Label* label;
#ifndef GTKOSX
/* font scaling does nothing with GDK/Quartz */
Gtk::Adjustment* dpi_adj = new Gtk::Adjustment ((double)Config->get_font_scale() / 1024, 50, 250, 1, 10); Gtk::Adjustment* dpi_adj = new Gtk::Adjustment ((double)Config->get_font_scale() / 1024, 50, 250, 1, 10);
Gtk::HScale * dpi_range = new Gtk::HScale (*dpi_adj); Gtk::HScale * dpi_range = new Gtk::HScale (*dpi_adj);
Label* label = manage (new Label (_("Font Scaling"))); label = manage (new Label (_("Font Scaling")));
label->set_name ("OptionsLabel"); label->set_name ("OptionsLabel");
dpi_range->set_update_policy (Gtk::UPDATE_DISCONTINUOUS); dpi_range->set_update_policy (Gtk::UPDATE_DISCONTINUOUS);
@ -283,6 +288,7 @@ OptionEditor::setup_misc_options ()
hbox->pack_start (*label, false, false); hbox->pack_start (*label, false, false);
hbox->pack_start (*dpi_range, true, true); hbox->pack_start (*dpi_range, true, true);
misc_packer.pack_start (*hbox, false, false); misc_packer.pack_start (*hbox, false, false);
#endif
label = manage (new Label (_("Short crossfade length (msecs)"))); label = manage (new Label (_("Short crossfade length (msecs)")));
label->set_name ("OptionsLabel"); label->set_name ("OptionsLabel");

View file

@ -61,7 +61,8 @@ using namespace Gtkmm2ext;
using namespace Gtk; using namespace Gtk;
using namespace sigc; using namespace sigc;
PluginUIWindow::PluginUIWindow (boost::shared_ptr<PluginInsert> insert, bool scrollable) PluginUIWindow::PluginUIWindow (Gtk::Window* win, boost::shared_ptr<PluginInsert> insert, bool scrollable)
: parent (win)
{ {
bool have_gui = false; bool have_gui = false;
non_gtk_gui = false; non_gtk_gui = false;
@ -132,6 +133,12 @@ PluginUIWindow::~PluginUIWindow ()
{ {
} }
void
PluginUIWindow::set_parent (Gtk::Window* win)
{
parent = win;
}
void void
PluginUIWindow::on_map () PluginUIWindow::on_map ()
{ {
@ -145,7 +152,13 @@ PluginUIWindow::on_show ()
if (_pluginui) { if (_pluginui) {
_pluginui->update_presets (); _pluginui->update_presets ();
} }
Window::on_show (); Window::on_show ();
if (parent) {
cerr << "plugin becomes transient for " << parent << endl;
// set_transient_for (*parent);
}
} }
void void

View file

@ -202,12 +202,13 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
class PluginUIWindow : public Gtk::Window class PluginUIWindow : public Gtk::Window
{ {
public: public:
PluginUIWindow (boost::shared_ptr<ARDOUR::PluginInsert> insert, bool scrollable=false); PluginUIWindow (Gtk::Window*, boost::shared_ptr<ARDOUR::PluginInsert> insert, bool scrollable=false);
~PluginUIWindow (); ~PluginUIWindow ();
PlugUIBase& pluginui() { return *_pluginui; } PlugUIBase& pluginui() { return *_pluginui; }
void resize_preferred(); void resize_preferred();
void set_parent (Gtk::Window*);
bool on_key_press_event (GdkEventKey*); bool on_key_press_event (GdkEventKey*);
bool on_key_release_event (GdkEventKey*); bool on_key_release_event (GdkEventKey*);
@ -216,6 +217,7 @@ class PluginUIWindow : public Gtk::Window
void on_map (); void on_map ();
private: private:
PlugUIBase* _pluginui; PlugUIBase* _pluginui;
Gtk::Window* parent;
Gtk::VBox vbox; Gtk::VBox vbox;
bool non_gtk_gui; bool non_gtk_gui;
void app_activated (bool); void app_activated (bool);

View file

@ -1089,9 +1089,14 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
PluginUIWindow *plugin_ui; PluginUIWindow *plugin_ui;
/* these are both allowed to be null */
Container* toplevel = get_toplevel();
Window* win = dynamic_cast<Gtk::Window*>(toplevel);
if (plugin_insert->get_gui() == 0) { if (plugin_insert->get_gui() == 0) {
plugin_ui = new PluginUIWindow (plugin_insert); plugin_ui = new PluginUIWindow (win, plugin_insert);
WindowTitle title(Glib::get_application_name()); WindowTitle title(Glib::get_application_name());
title += generate_redirect_title (plugin_insert); title += generate_redirect_title (plugin_insert);
@ -1102,9 +1107,9 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
// change window title when route name is changed // change window title when route name is changed
_route->name_changed.connect (bind (mem_fun(*this, &RedirectBox::route_name_changed), plugin_ui, boost::weak_ptr<PluginInsert> (plugin_insert))); _route->name_changed.connect (bind (mem_fun(*this, &RedirectBox::route_name_changed), plugin_ui, boost::weak_ptr<PluginInsert> (plugin_insert)));
} else { } else {
plugin_ui = reinterpret_cast<PluginUIWindow *> (plugin_insert->get_gui()); plugin_ui = reinterpret_cast<PluginUIWindow *> (plugin_insert->get_gui());
plugin_ui->set_parent (win);
} }
if (plugin_ui->is_visible()) { if (plugin_ui->is_visible()) {

View file

@ -811,7 +811,6 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
info->n_inputs = -1; info->n_inputs = -1;
info->n_outputs = -1; info->n_outputs = -1;
plugs.push_back (info); plugs.push_back (info);
comp = FindNextComponent (comp, &desc); comp = FindNextComponent (comp, &desc);

View file

@ -356,12 +356,11 @@ PluginInsert::silence (nframes_t nframes, nframes_t offset)
{ {
int32_t in_index = 0; int32_t in_index = 0;
int32_t out_index = 0; int32_t out_index = 0;
int32_t n;
uint32_t n;
if (active()) { if (active()) {
for (vector<boost::shared_ptr<Plugin> >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) { for (vector<boost::shared_ptr<Plugin> >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
n = (*i) -> get_info()->n_inputs; n = input_streams();
(*i)->connect_and_run (_session.get_silent_buffers (n), n, in_index, out_index, nframes, offset); (*i)->connect_and_run (_session.get_silent_buffers (n), n, in_index, out_index, nframes, offset);
} }
} }
@ -380,20 +379,17 @@ PluginInsert::run (vector<Sample *>& bufs, uint32_t nbufs, nframes_t nframes, nf
} else { } else {
uint32_t in = _plugins[0]->get_info()->n_inputs; uint32_t in = input_streams ();
uint32_t out = _plugins[0]->get_info()->n_outputs; uint32_t out = output_streams ();
if (in < 0 || out < 0) { if (out > in) {
} else { /* not active, but something has make up for any channel count increase,
so copy the last buffer to the extras.
*/
if (out > in) { for (uint32_t n = out - in; n < out && n < nbufs; ++n) {
memcpy (bufs[n], bufs[in - 1], sizeof (Sample) * nframes);
/* not active, but something has make up for any channel count increase */
for (uint32_t n = out - in; n < out; ++n) {
memcpy (bufs[n], bufs[in - 1], sizeof (Sample) * nframes);
}
} }
} }
} }

View file

@ -848,7 +848,7 @@ Session::when_engine_running ()
add_connection (c); add_connection (c);
} }
BootMessage (_("Connect ports")); BootMessage (_("Setup signal flow and plugins"));
hookup_io (); hookup_io ();

View file

@ -1,4 +1,4 @@
#ifndef __ardour_svn_revision_h__ #ifndef __ardour_svn_revision_h__
#define __ardour_svn_revision_h__ #define __ardour_svn_revision_h__
static const char* ardour_svn_revision = "3096"; static const char* ardour_svn_revision = "3107";
#endif #endif