diff options
author | David Robillard <d@drobilla.net> | 2007-03-18 06:07:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-03-18 06:07:08 +0000 |
commit | 99904735e066804358f1d0bd138a84f1e9ecda91 (patch) | |
tree | 71a924cf1660b5b00231275bd481bbd27094dd9b /libs/ardour/auditioner.cc | |
parent | eb270e70a12c410cdd98585ad25bb6d8e384a4f5 (diff) |
Merged with trunk R1612.
git-svn-id: svn://localhost/ardour2/branches/midi@1614 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/auditioner.cc')
-rw-r--r-- | libs/ardour/auditioner.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index 7bbc4cd0ba..0ba30b2b8b 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #include <glibmm/thread.h> @@ -65,7 +64,7 @@ Auditioner::Auditioner (Session& s) } if (right.length()) { - audio_diskstream()->add_channel(); + audio_diskstream()->add_channel (1); add_output_port (right, this, DataType::AUDIO); } @@ -141,12 +140,10 @@ Auditioner::audition_region (boost::shared_ptr<Region> region) _diskstream->playlist()->clear (); _diskstream->playlist()->add_region (the_region, 0, 1); - while (_diskstream->n_channels().get(DataType::AUDIO) < the_region->n_channels()) { - audio_diskstream()->add_channel (); - } - - while (_diskstream->n_channels().get(DataType::AUDIO) > the_region->n_channels()) { - audio_diskstream()->remove_channel (); + if (_diskstream->n_channels().get(DataType::AUDIO) < the_region->n_channels()) { + audio_diskstream()->add_channel (the_region->n_channels() - _diskstream->n_channels().get(DataType::AUDIO)); + } else if (_diskstream->n_channels().get(DataType::AUDIO) > the_region->n_channels()) { + audio_diskstream()->remove_channel (_diskstream->n_channels().get(DataType::AUDIO) - the_region->n_channels()); } /* force a panner reset now that we have all channels */ |