Fix various issues when the engine disconnects:
[ardour.git] / libs / ardour / panner_shell.cc
index a3b7de287ae67166102dc4fd8d4b773cfed9cbc6..d99e5068c155a2cce7ed036df31400236bf99d8c 100644 (file)
@@ -340,7 +340,7 @@ PannerShell::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, pf
 }
 
 void
-PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes)
+PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes)
 {
        if (inbufs.count().n_audio() == 0) {
                /* Input has no audio buffers (e.g. Aux Send in a MIDI track at a
@@ -382,7 +382,7 @@ PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame,
 
        // If we shouldn't play automation defer to distribute_no_automation
 
-       if (!(as & Play || ((as & Touch) && !_panner->touching()))) {
+       if (!((as & Play) || ((as & (Touch | Latch)) && !_panner->touching()))) {
 
                distribute_no_automation (inbufs, outbufs, nframes, 1.0);
 
@@ -395,7 +395,7 @@ PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame,
                        i->silence(nframes);
                }
 
-               _panner->distribute_automated (inbufs, outbufs, start_frame, end_frame, nframes, _session.pan_automation_buffer());
+               _panner->distribute_automated (inbufs, outbufs, start_sample, end_sample, nframes, _session.pan_automation_buffer());
        }
 }