diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2016-08-25 16:04:44 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2017-04-19 09:36:48 +1000 |
commit | 02c384d11e18266df2754dd55dd73c1e19d7a55f (patch) | |
tree | 2ff7e39f1d55aeecd33dfdeceac34d37c33136b0 /libs/ardour/midi_diskstream.cc | |
parent | 66add364026558b66ec825811772d18837eb95f0 (diff) |
Use XMLNode::set_property in ARDOUR::MidiDiskstream
Diffstat (limited to 'libs/ardour/midi_diskstream.cc')
-rw-r--r-- | libs/ardour/midi_diskstream.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index cfcfc1c8da..3b276d3fb5 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -1227,7 +1227,6 @@ XMLNode& MidiDiskstream::get_state () { XMLNode& node (Diskstream::get_state()); - char buf[64]; LocaleGuard lg; if (_write_source && _session.get_record_enabled()) { @@ -1236,7 +1235,7 @@ MidiDiskstream::get_state () XMLNode* cs_grandchild; cs_grandchild = new XMLNode (X_("file")); - cs_grandchild->add_property (X_("path"), _write_source->path()); + cs_grandchild->set_property (X_("path"), _write_source->path()); cs_child->add_child_nocopy (*cs_grandchild); /* store the location where capture will start */ @@ -1244,14 +1243,13 @@ MidiDiskstream::get_state () Location* pi; if (_session.preroll_record_punch_enabled ()) { - snprintf (buf, sizeof (buf), "%" PRId64, _session.preroll_record_punch_pos ()); + cs_child->set_property (X_("at"), _session.preroll_record_punch_pos()); } else if (_session.config.get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) { - snprintf (buf, sizeof (buf), "%" PRId64, pi->start()); + cs_child->set_property (X_("at"), pi->start()); } else { - snprintf (buf, sizeof (buf), "%" PRId64, _session.transport_frame()); + cs_child->set_property (X_("at"), _session.transport_frame()); } - cs_child->add_property (X_("at"), buf); node.add_child_nocopy (*cs_child); } |