From 05ab7a46b5cf4482ca999625da7405d47fd700a6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 1 Oct 2017 03:03:44 +0200 Subject: Fix recording MIDI - Fix API call to add region(midi_region) -- set count to "1" - Forward DataRecorded() signal - remove botched merge/rebase" a4a87f56 accidentally brought back code from old-destructive API which was removed in af103cf3 and 08c13007 There is no per track NonLayered record mode anymore, it's session global. - set can_record correctly to not accidentally clear last capture sources for cont'd recording (toggle track's rec-arm) --- libs/ardour/track.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libs/ardour/track.cc') diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 45e4bce9b0..de1cc56bf6 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -91,8 +91,6 @@ Track::init () if (_mode == Destructive && !Profile->get_trx()) { dflags = DiskIOProcessor::Flag (dflags | DiskIOProcessor::Destructive); - } else if (_mode == NonLayered){ - dflags = DiskIOProcessor::Flag(dflags | DiskIOProcessor::NonLayered); } _disk_reader.reset (new DiskReader (_session, name(), dflags)); @@ -1035,9 +1033,9 @@ Track::use_captured_midi_sources (SourceList& srcs, CaptureInfos const & capture continue; /* XXX is this OK? */ } - // cerr << "add new region, buffer position = " << buffer_position << " @ " << (*ci)->start << endl; + cerr << "add new region, len = " << (*ci)->samples << " @ " << (*ci)->start << endl; - pl->add_region (midi_region, (*ci)->start + preroll_off, _disk_writer->non_layered()); + pl->add_region (midi_region, (*ci)->start + preroll_off, 1, _session.config.get_layered_record_mode ()); } pl->thaw (); @@ -1139,7 +1137,7 @@ Track::use_captured_audio_sources (SourceList& srcs, CaptureInfos const & captur continue; /* XXX is this OK? */ } - pl->add_region (region, (*ci)->start + preroll_off, 1, _disk_writer->non_layered()); + pl->add_region (region, (*ci)->start + preroll_off, 1, _session.config.get_layered_record_mode()); pl->set_layer (region, DBL_MAX); buffer_position += (*ci)->samples; -- cgit v1.2.3