diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-08-10 20:22:21 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-08-10 20:22:21 +0000 |
commit | afdb298462cd7e6bb4ce866a1714a032c33be917 (patch) | |
tree | 4c56fca2e1868c204f9da49f6707af214d0860b8 /libs/ardour/internal_send.cc | |
parent | 98934548a2a5a1476e8b48cd7544d45119d21167 (diff) |
add virtual Delivery::pan_outs() so that internal sends correctly configure their panner for the number of outputs on the target rather than the output of the internal send processor within the route. fixes a crash when adding internal sends
git-svn-id: svn://localhost/ardour2/branches/3.0@9975 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/internal_send.cc')
-rw-r--r-- | libs/ardour/internal_send.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc index 7fe52ec617..e873b73aac 100644 --- a/libs/ardour/internal_send.cc +++ b/libs/ardour/internal_send.cc @@ -81,6 +81,13 @@ InternalSend::use_target (boost::shared_ptr<Route> sendto) mixbufs.ensure_buffers (_send_to->internal_return()->input_streams(), _session.get_block_size()); mixbufs.set_count (_send_to->internal_return()->input_streams()); + ChanCount n = _send_to->internal_return()->input_streams (); + + if (n != _configured_output) { + _configured_output = n; + reset_panner (); + } + set_name (sendto->name()); _send_to_id = _send_to->id(); @@ -260,6 +267,22 @@ InternalSend::can_support_io_configuration (const ChanCount& in, ChanCount& out) return true; } +uint32_t +InternalSend::pan_outs () const +{ + /* the number of targets for our panner is determined by what we are + sending to, if anything. + */ + + if (_send_to) { + return _send_to->internal_return()->input_streams().n_audio(); + } + + return 1; /* zero is more accurate, but 1 is probably safer as a way to + * say "don't pan" + */ +} + bool InternalSend::configure_io (ChanCount in, ChanCount out) { |