X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Flocation.h;h=149a559d850904714d72a0768c3e09c4c5ce7f47;hb=1f2a518ee20a9e011f75fa2d961fd14f018445c0;hp=b008a62f18412ecab985d64bf123b94e69b932f8;hpb=88beef2e93d26d28467fe151f5ef2972d0ca9169;p=ardour.git diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index b008a62f18..149a559d85 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2000 Paul Davis + Copyright (C) 2000 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,8 +31,8 @@ #include #include "pbd/undo.h" -#include "pbd/stateful.h" -#include "pbd/statefuldestructible.h" +#include "pbd/stateful.h" +#include "pbd/statefuldestructible.h" #include "ardour/ardour.h" @@ -53,16 +53,16 @@ class Location : public PBD::StatefulDestructible }; Location (nframes64_t sample_start, - nframes64_t sample_end, - const std::string &name, - Flags bits = Flags(0)) - + nframes64_t sample_end, + const std::string &name, + Flags bits = Flags(0)) + : _name (name), _start (sample_start), _end (sample_end), _flags (bits), _locked (false) { } - + Location () { _start = 0; _end = 0; @@ -77,7 +77,7 @@ class Location : public PBD::StatefulDestructible bool locked() const { return _locked; } void lock() { _locked = true; changed (this); } void unlock() { _locked = false; changed (this); } - + nframes64_t start() const { return _start; } nframes64_t end() const { return _end; } nframes64_t length() const { return _end - _start; } @@ -118,14 +118,14 @@ class Location : public PBD::StatefulDestructible /* this is sent only when both start&end change at the same time */ sigc::signal changed; - + /* CD Track / CD-Text info */ std::map cd_info; XMLNode& cd_info_node (const std::string &, const std::string &); XMLNode& get_state (void); - int set_state (const XMLNode&); + int set_state (const XMLNode&, int version); private: std::string _name; @@ -145,7 +145,7 @@ class Locations : public PBD::StatefulDestructible Locations (); ~Locations (); - + const LocationList& list() { return locations; } void add (Location *, bool make_current = false); @@ -155,7 +155,7 @@ class Locations : public PBD::StatefulDestructible void clear_ranges (); XMLNode& get_state (void); - int set_state (const XMLNode&); + int set_state (const XMLNode&, int version); Location *get_location_by_id(PBD::ID); Location* auto_loop_location () const; @@ -172,8 +172,7 @@ class Locations : public PBD::StatefulDestructible Location *first_location_before (nframes64_t, bool include_special_ranges = false); Location *first_location_after (nframes64_t, bool include_special_ranges = false); - nframes64_t first_mark_before (nframes64_t, bool include_special_ranges = false); - nframes64_t first_mark_after (nframes64_t, bool include_special_ranges = false); + void marks_either_side (nframes64_t const, nframes64_t &, nframes64_t &) const; void find_all_between (nframes64_t start, nframes64_t, LocationList&, Location::Flags);