use a more useful and accurate heuristic to get ::input_streams() for the auditioner
[ardour.git] / 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);