#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"
}
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();
} else {
if (was_recording) {
- finish_capture (rec_monitors_input, c);
+ finish_capture (c);
}
}
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) {
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) {
(*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
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.
}
}
- 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
}
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;