Use PLATFORM_WINDOWS (in preference to WIN32) for consistency with the other libraries
[ardour.git] / libs / ardour / track.cc
index c6a348ddfb1c4d7963b9a29239672f7323d76129..5c95de0c4118fbdd97a87385a9cc1e49eb67c2a2 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;
                }
        }
 
@@ -436,7 +439,8 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
                        }
 
                        if (no_meter) {
-                               _meter->reset();
+                               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);
@@ -447,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);
 
@@ -473,6 +477,10 @@ Track::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /*
 {
        Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
        if (!lm.locked()) {
+               framecnt_t playback_distance = _diskstream->calculate_playback_distance(nframes);
+               if (can_internal_playback_seek(playback_distance)) {
+                       internal_playback_seek(playback_distance);
+               }
                return 0;
        }
 
@@ -492,7 +500,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);
@@ -542,15 +550,15 @@ Track::playlist ()
 }
 
 void
-Track::request_jack_monitors_input (bool m)
+Track::request_input_monitoring (bool m)
 {
-       _diskstream->request_jack_monitors_input (m);
+       _diskstream->request_input_monitoring (m);
 }
 
 void
-Track::ensure_jack_monitors_input (bool m)
+Track::ensure_input_monitoring (bool m)
 {
-       _diskstream->ensure_jack_monitors_input (m);
+       _diskstream->ensure_input_monitoring (m);
 }
 
 bool
@@ -571,10 +579,10 @@ Track::set_capture_offset ()
        _diskstream->set_capture_offset ();
 }
 
-list<boost::shared_ptr<Source> >
-Track::steal_write_sources()
+std::string
+Track::steal_write_source_name()
 {
-        return _diskstream->steal_write_sources ();
+        return _diskstream->steal_write_source_name ();
 }
 
 void