use a more useful and accurate heuristic to get ::input_streams() for the auditioner
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 25 Jul 2017 15:39:27 +0000 (11:39 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 18 Sep 2017 15:40:53 +0000 (11:40 -0400)
libs/ardour/auditioner.cc

index c76adb17970ea441a846a2ea19c8ad0b0c5f427b..cf03ecc2cc11b55ec0bbdb983535b7576d7f4289 100644 (file)
@@ -503,8 +503,12 @@ Auditioner::input_streams () const
           depends solely on the region we are auditioning.
        */
 
-       if (_disk_reader) {
-               return _disk_reader->input_streams ();
+       if (_midi_audition) {
+               return ChanCount (DataType::MIDI, 1);
+       } else {
+               if (the_region) {
+                       return ChanCount (DataType::AUDIO, the_region->n_channels ());
+               }
        }
 
        return ChanCount (DataType::AUDIO, 1);