#include <ctime>
#include <sigc++/bind.h>
-#include <pbd/stl_delete.h>
-#include <pbd/xml++.h>
-#include <pbd/enumwriter.h>
+#include "pbd/stl_delete.h"
+#include "pbd/xml++.h"
+#include "pbd/enumwriter.h"
-#include <ardour/location.h>
-#include <ardour/session.h>
-#include <ardour/audiofilesource.h>
+#include "ardour/location.h"
+#include "ardour/session.h"
+#include "ardour/audiofilesource.h"
#include "i18n.h"
using namespace PBD;
Location::Location (const Location& other)
- : _name (other._name),
+ : StatefulDestructible(),
+ _name (other._name),
_start (other._start),
_end (other._end),
_flags (other._flags)
}
int
-Location::set_start (nframes_t s)
+Location::set_start (nframes64_t s)
{
if (_locked) {
return -1;
}
int
-Location::set_end (nframes_t e)
+Location::set_end (nframes64_t e)
{
if (_locked) {
return -1;
}
int
-Location::set (nframes_t start, nframes_t end)
+Location::set (nframes64_t start, nframes64_t end)
{
if (_locked) {
return -1;
}
int
-Location::move_to (nframes_t pos)
+Location::move_to (nframes64_t pos)
{
if (_locked) {
return -1;
id().print (buf, sizeof (buf));
node->add_property("id", buf);
node->add_property ("name", name());
- snprintf (buf, sizeof (buf), "%u", start());
+ snprintf (buf, sizeof (buf), "%" PRId64, start());
node->add_property ("start", buf);
- snprintf (buf, sizeof (buf), "%u", end());
+ snprintf (buf, sizeof (buf), "%" PRId64, end());
node->add_property ("end", buf);
node->add_property ("flags", enum_2_string (_flags));
node->add_property ("locked", (_locked ? "yes" : "no"));
may make the value of _start illegal.
*/
- _start = atoi (prop->value().c_str());
-
+ sscanf (prop->value().c_str(), "%" PRId64, &_start);
+
if ((prop = node.property ("end")) == 0) {
error << _("XML node for Location has no end information") << endmsg;
return -1;
}
- _end = atoi (prop->value().c_str());
+ sscanf (prop->value().c_str(), "%" PRId64, &_end);
if ((prop = node.property ("flags")) == 0) {
error << _("XML node for Location has no flags information") << endmsg;
}
void
-Locations::location_changed (Location* loc)
+Locations::location_changed (Location* /*loc*/)
{
changed (); /* EMIT SIGNAL */
}
};
Location *
-Locations::first_location_before (nframes_t frame, bool include_special_ranges)
+Locations::first_location_before (nframes64_t frame, bool include_special_ranges)
{
LocationList locs;
}
Location *
-Locations::first_location_after (nframes_t frame, bool include_special_ranges)
+Locations::first_location_after (nframes64_t frame, bool include_special_ranges)
{
LocationList locs;
return 0;
}
-nframes_t
-Locations::first_mark_before (nframes_t frame, bool include_special_ranges)
+nframes64_t
+Locations::first_mark_before (nframes64_t frame, bool include_special_ranges)
{
LocationList locs;
return 0;
}
-nframes_t
-Locations::first_mark_after (nframes_t frame, bool include_special_ranges)
+nframes64_t
+Locations::first_mark_after (nframes64_t frame, bool include_special_ranges)
{
LocationList locs;