fix taglib header paths so linked headers are not necessary
[ardour.git] / libs / ardour / track.cc
index d4c095d738f51a25afcf3c1fb19824c874eca944..7d90709b6ff01c493202eaa18e5b3003dbacf182 100644 (file)
@@ -398,6 +398,9 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
                case MonitoringInput:
                        be_silent = false;
                        break;
+               default:
+                       be_silent = false;
+                       break;
                }
        }
 
@@ -414,13 +417,30 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
                        bool const auto_input = _session.config.get_auto_input ();
                        bool const software_monitor = Config->get_monitoring_model() == SoftwareMonitoring;
                        bool const tape_machine_mode = Config->get_tape_machine_mode ();
-
-                       if (!software_monitor && tape_machine_mode && !track_rec) {
-                               _meter->reset();
-                               _input->process_input (boost::shared_ptr<Processor>(), start_frame, end_frame, nframes);
+                       bool no_meter = false;
+
+                       /* this needs a proper K-map
+                        * and should be separated into a function similar to monitoring_state()
+                        * that also handles roll() states in audio_track.cc, midi_track.cc and route.cc
+                        *
+                        * see http://www.oofus.co.uk/ardour/Ardour3MonitorModesV3.pdf
+                        */
+                       if (!auto_input && !track_rec) {
+                               no_meter=true;
+                       }
+                       else if (tape_machine_mode && !track_rec && auto_input) {
+                               no_meter=true;
+                       }
+                       else if (!software_monitor && tape_machine_mode && !track_rec) {
+                               no_meter=true;
                        }
                        else if (!software_monitor && !tape_machine_mode && !track_rec && !auto_input) {
-                               _meter->reset();
+                               no_meter=true;
+                       }
+
+                       if (no_meter) {
+                               BufferSet& bufs (_session.get_silent_buffers (n_process_buffers()));
+                               _meter->run (bufs, 0, 0, nframes, true);
                                _input->process_input (boost::shared_ptr<Processor>(), start_frame, end_frame, nframes);
                        } else {
                                _input->process_input (_meter, start_frame, end_frame, nframes);
@@ -431,7 +451,7 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
 
        } else {
 
-               BufferSet& bufs = _session.get_scratch_buffers (n_process_buffers());
+               BufferSet& bufs = _session.get_route_buffers (n_process_buffers());
                
                fill_buffers_with_input (bufs, _input, nframes);
 
@@ -476,7 +496,7 @@ Track::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /*
 
        framecnt_t playback_distance;
 
-       BufferSet& bufs (_session.get_silent_buffers (n_process_buffers()));
+       BufferSet& bufs (_session.get_route_buffers (n_process_buffers(), true));
 
        int const dret = _diskstream->process (bufs, _session.transport_frame(), nframes, playback_distance, false);
        need_butler = _diskstream->commit (playback_distance);