Source::natural_position API uses samplepos_t

This commit is contained in:
Robin Gareus 2022-01-19 02:00:05 +01:00
parent ddd5b26686
commit 4ec70bbaec
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -161,7 +161,6 @@ Source::set_state (const XMLNode& node, int version)
const CueMarkers old_cues = _cue_markers; const CueMarkers old_cues = _cue_markers;
XMLNodeList nlist = node.children(); XMLNodeList nlist = node.children();
int64_t t; int64_t t;
samplepos_t ts;
XMLNode* sd_node; XMLNode* sd_node;
if (node.name() == X_("Cues")) { if (node.name() == X_("Cues")) {
@ -189,14 +188,12 @@ Source::set_state (const XMLNode& node, int version)
_timestamp = (time_t) t; _timestamp = (time_t) t;
} }
if (node.get_property ("natural-position", ts)) { if (node.get_property ("natural-position", _natural_position)) {
_natural_position = timepos_t (ts);
_have_natural_position = true; _have_natural_position = true;
} else if (node.get_property ("timeline-position", ts)) { } else if (node.get_property ("timeline-position", _natural_position)) {
/* some older versions of ardour might have stored this with /* some older versions of ardour might have stored this with
this property name. this property name.
*/ */
_natural_position = timepos_t (ts);
_have_natural_position = true; _have_natural_position = true;
} }