diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-27 22:47:16 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-27 22:47:16 +0000 |
commit | 19ebdba1cbde4eca74af501fe500db05b1ac69d0 (patch) | |
tree | 7e9876c3a77bfbc7ab3eab6fbe8354355a6dad56 /libs/ardour/session.cc | |
parent | d17918e32e36011cff47405243a320197f72c564 (diff) |
restore independent gain control over click/metronome
git-svn-id: svn://localhost/ardour2/branches/3.0@11370 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index e205ac3e82..30e80b2627 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -377,19 +377,27 @@ Session::when_engine_running () XMLNode* child = 0; _click_io.reset (new ClickIO (*this, "click")); + _click_gain.reset (new Amp (*this)); + _click_gain->activate (); if (state_tree && (child = find_named_node (*state_tree->root(), "Click")) != 0) { /* existing state for Click */ - int c; + int c = 0; if (Stateful::loading_state_version < 3000) { c = _click_io->set_state_2X (*child->children().front(), Stateful::loading_state_version, false); } else { - c = _click_io->set_state (*child->children().front(), Stateful::loading_state_version); + const XMLNodeList& children (child->children()); + XMLNodeList::const_iterator i = children.begin(); + if ((c = _click_io->set_state (**i, Stateful::loading_state_version)) == 0) { + ++i; + if (i != children.end()) { + c = _click_gain->set_state (**i, Stateful::loading_state_version); + } + } } - - + if (c == 0) { _clicking = Config->get_clicking (); |