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/delivery.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/delivery.cc')
-rw-r--r-- | libs/ardour/delivery.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index 967e01187e..75c32a03d1 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -375,22 +375,24 @@ Delivery::unpan () _panshell.reset (); } +uint32_t +Delivery::pan_outs () const +{ + if (_output) { + return _output->n_ports().n_audio(); + } + + return _configured_output.n_audio(); +} + void Delivery::reset_panner () { if (panners_legal) { if (!no_panner_reset) { - uint32_t ntargets; - - if (_output) { - ntargets = _output->n_ports().n_audio(); - } else { - ntargets = _configured_output.n_audio(); - } - if (_panshell) { - _panshell->configure_io (ChanCount (DataType::AUDIO, pans_required()), ChanCount (DataType::AUDIO, ntargets)); + _panshell->configure_io (ChanCount (DataType::AUDIO, pans_required()), ChanCount (DataType::AUDIO, pan_outs())); if (_role == Main) { _panshell->pannable()->set_panner (_panshell->panner()); |