void mark_immutable_except_write();
void mark_nonremovable ();
- const std::string& take_id () const { return _take_id; }
bool within_session () const { return _within_session; }
uint16_t channel() const { return _channel; }
float gain() const { return _gain; }
void set_within_session_from_path (const std::string&);
std::string _path;
- std::string _take_id;
bool _file_is_new;
uint16_t _channel;
bool _within_session;
virtual samplecnt_t length (samplepos_t pos) const = 0;
virtual void update_length (samplecnt_t cnt) = 0;
+ void set_take_id (std::string id) { _take_id =id; }
+ const std::string& take_id () const { return _take_id; }
+
virtual samplepos_t natural_position() const { return 0; }
void mark_for_remove();
DataType _type;
Flag _flags;
time_t _timestamp;
+ std::string _take_id;
samplepos_t _timeline_position;
bool _analysed;
std::string _ancestor_name;
private:
+
void fix_writable_flags ();
};
as->set_captured_for (_name.val());
as->mark_immutable ();
+ char buf[128];
+ strftime (buf, sizeof(buf), "%F %H.%M.%S", &when);
+ as->set_take_id ( buf );
+
if (Config->get_auto_analyse_audio()) {
Analyser::queue_source_for_analysis (as, true);
}
_midi_write_source->set_timeline_position (capture_info.front()->start);
_midi_write_source->set_captured_for (_name);
+ char buf[128];
+ strftime (buf, sizeof(buf), "%F %H.%M.%S", &when);
+ _midi_write_source->set_take_id ( buf );
+
/* set length in beats to entire capture length */
BeatsSamplesConverter converter (_session.tempo_map(), capture_info.front()->start);
XMLNode *node = new XMLNode ("Source");
node->set_property ("name", name());
+ node->set_property ("take-id", take_id());
node->set_property ("type", _type);
node->set_property (X_("flags"), _flags);
node->set_property ("id", id());
if (!node.get_property (X_("flags"), _flags)) {
_flags = Flag (0);
}
+
+ if (!node.get_property (X_("take-id"), _take_id)) {
+ _take_id = "";
+ }
/* old style, from the period when we had DestructiveFileSource */
if (node.get_property (X_("destructive"), str)) {