*/
-#include "pbd/i18n.h"
-
#include "ardour/analyser.h"
#include "ardour/audioengine.h"
#include "ardour/audiofilesource.h"
#include "ardour/session.h"
#include "ardour/smf_source.h"
+#include "pbd/i18n.h"
+
using namespace ARDOUR;
using namespace PBD;
using namespace std;
, _record_enabled (0)
, _record_safe (0)
, capture_start_sample (0)
- , capture_captured (0)
- , was_recording (false)
- , adjust_capture_position (0)
- , _capture_offset (0)
- , first_recordable_sample (max_samplepos)
- , last_recordable_sample (max_samplepos)
- , last_possibly_recording (0)
- , _alignment_style (ExistingMaterial)
- , _alignment_choice (Automatic)
+ , capture_captured (0)
+ , was_recording (false)
+ , adjust_capture_position (0)
+ , _capture_offset (0)
+ , first_recordable_sample (max_samplepos)
+ , last_recordable_sample (max_samplepos)
+ , last_possibly_recording (0)
+ , _alignment_style (ExistingMaterial)
, _num_captured_loops (0)
, _accumulated_capture_offset (0)
, _gui_feed_buffer(AudioEngine::instance()->raw_buffer_size (DataType::MIDI))
}
}
-void
-DiskWriter::set_align_choice (AlignChoice a, bool force)
-{
- if (record_enabled() && _session.actively_recording()) {
- return;
- }
-
- if ((a != _alignment_choice) || force) {
- _alignment_choice = a;
-
- switch (_alignment_choice) {
- case UseExistingMaterial:
- set_align_style (ExistingMaterial);
- break;
- case UseCaptureTime:
- set_align_style (CaptureTime);
- break;
- default:
- error << string_compose (_("programming error: %1"), "DiskWriter: asked to use illegal alignment style") << endmsg;
- break;
- }
- }
-}
-
XMLNode&
DiskWriter::state (bool full)
{
XMLNode& node (DiskIOProcessor::state (full));
node.set_property (X_("type"), X_("diskwriter"));
- node.set_property (X_("capture-alignment"), enum_2_string (_alignment_choice));
node.set_property (X_("record-safe"), (_record_safe ? X_("yes" : "no")));
return node;
}
return -1;
}
- AlignChoice ac;
-
- if (node.get_property (X_("capture-alignment"), ac)) {
- set_align_choice (ac, true);
- } else {
- set_align_choice (Automatic, true);
- }
-
if (!node.get_property (X_("record-safe"), _record_safe)) {
_record_safe = false;
}
/* set length in beats to entire capture length */
BeatsSamplesConverter converter (_session.tempo_map(), capture_info.front()->start);
- const Evoral::Beats total_capture_beats = converter.from (total_capture);
+ const Temporal::Beats total_capture_beats = converter.from (total_capture);
_midi_write_source->set_length_beats (total_capture_beats);
/* flush to disk: this step differs from the audio path,
where all the data is already on disk.
*/
- _midi_write_source->mark_midi_streaming_write_completed (source_lock, Evoral::Sequence<Evoral::Beats>::ResolveStuckNotes, total_capture_beats);
+ _midi_write_source->mark_midi_streaming_write_completed (source_lock, Evoral::Sequence<Temporal::Beats>::ResolveStuckNotes, total_capture_beats);
}
_last_capture_sources.insert (_last_capture_sources.end(), audio_srcs.begin(), audio_srcs.end());