Remove unused rec_monitors_input variables.
[ardour.git] / libs / ardour / audio_diskstream.cc
index cd76e53100fea4c08a8e3594a7d6cfd0638834c4..81fb700d3c87888071447fba711df81bd72d9bf9 100644 (file)
@@ -31,7 +31,6 @@
 #include <sys/mman.h>
 
 #include "pbd/error.h"
-#include <glibmm/thread.h>
 #include "pbd/xml++.h"
 #include "pbd/memento_command.h"
 #include "pbd/enumwriter.h"
@@ -406,7 +405,7 @@ AudioDiskstream::prepare_record_status(framepos_t capture_start_frame)
 }
 
 int
-AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler)
+AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool& need_butler)
 {
        uint32_t n;
        boost::shared_ptr<ChannelList> c = channels.reader();
@@ -521,7 +520,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool ca
        } else {
 
                if (was_recording) {
-                       finish_capture (rec_monitors_input, c);
+                       finish_capture (c);
                }
 
        }
@@ -1022,6 +1021,10 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer)
 
           at higher speeds, just do it because the sync between butler
           and audio thread may not be good enough.
+
+          Note: it is a design assumption that disk_io_chunk_frames is smaller
+          than the playback buffer size, so this check should never trip when
+          the playback buffer is empty.
        */
 
        if ((total_space < disk_io_chunk_frames) && fabs (_actual_speed) < 2.0f) {
@@ -1253,7 +1256,6 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush)
                if (destructive()) {
                        (*chan)->capture_transition_buf->get_read_vector(&transvec);
                        size_t transcount = transvec.len[0] + transvec.len[1];
-                       bool have_start = false;
                        size_t ti;
 
                        for (ti=0; ti < transcount; ++ti) {
@@ -1265,9 +1267,7 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush)
                                        (*chan)->write_source->mark_capture_start (captrans.capture_val);
                                        (*chan)->curr_capture_cnt = 0;
 
-                                       have_start = true;
-                               }
-                               else if (captrans.type == CaptureEnd) {
+                               } else if (captrans.type == CaptureEnd) {
 
                                        // capture end, the capture_val represents total frames in capture
 
@@ -1349,7 +1349,7 @@ AudioDiskstream::transport_stopped_wallclock (struct tm& when, time_t twhen, boo
        uint32_t n = 0;
        bool mark_write_completed = false;
 
-       finish_capture (true, c);
+       finish_capture (c);
 
        /* butler is already stopped, but there may be work to do
           to flush remaining data to disk.
@@ -1548,7 +1548,7 @@ AudioDiskstream::transport_looped (framepos_t transport_frame)
                        }
                }
 
-               finish_capture (true, c);
+               finish_capture (c);
 
                // the next region will start recording via the normal mechanism
                // we'll set the start position to the current transport pos
@@ -1581,7 +1581,7 @@ AudioDiskstream::transport_looped (framepos_t transport_frame)
 }
 
 void
-AudioDiskstream::finish_capture (bool /*rec_monitors_input*/, boost::shared_ptr<ChannelList> c)
+AudioDiskstream::finish_capture (boost::shared_ptr<ChannelList> c)
 {
        was_recording = false;
        first_recordable_frame = max_framepos;