/*
- Copyright (C) 2000-2003 Paul Davis
+ Copyright (C) 2000-2003 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
#include <string>
#include <climits>
-#include <sigc++/bind.h>
#include "pbd/failed_constructor.h"
#include "pbd/stl_delete.h"
#include "pbd/xml++.h"
#include "pbd/stacktrace.h"
+#include "ardour/debug.h"
#include "ardour/playlist.h"
#include "ardour/session.h"
#include "ardour/region.h"
#include "ardour/region_factory.h"
#include "ardour/playlist_factory.h"
#include "ardour/transient_detector.h"
+#include "ardour/session_playlists.h"
#include "i18n.h"
struct ShowMeTheList {
ShowMeTheList (boost::shared_ptr<Playlist> pl, const string& n) : playlist (pl), name (n) {}
- ~ShowMeTheList () {
- cerr << ">>>>" << name << endl; playlist->dump(); cerr << "<<<<" << name << endl << endl;
+ ~ShowMeTheList () {
+ cerr << ">>>>" << name << endl; playlist->dump(); cerr << "<<<<" << name << endl << endl;
};
boost::shared_ptr<Playlist> playlist;
string name;
struct RegionSortByLayerWithPending {
bool operator () (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
-
+
double p = a->layer ();
if (a->pending_explicit_relayer()) {
p += 0.5;
}
-
+
double q = b->layer ();
if (b->pending_explicit_relayer()) {
q += 0.5;
}
-
+
return p < q;
}
};
init (hide);
first_set_state = false;
_name = nom;
-
+
}
Playlist::Playlist (Session& sess, const XMLNode& node, DataType type, bool hide)
}
Playlist::Playlist (boost::shared_ptr<const Playlist> other, string namestr, bool hide)
- : SessionObject(other->_session, namestr), _type(other->_type), _orig_diskstream_id(other->_orig_diskstream_id)
+ : SessionObject(other->_session, namestr)
+ , _type(other->_type)
+ , _orig_diskstream_id(other->_orig_diskstream_id)
{
init (hide);
RegionList tmp;
other->copy_regions (tmp);
-
+
in_set_state++;
for (list<boost::shared_ptr<Region> >::iterator x = tmp.begin(); x != tmp.end(); ++x) {
subcnt = 0;
_read_data_count = 0;
_frozen = other->_frozen;
-
+
layer_op_counter = other->layer_op_counter;
freeze_length = other->freeze_length;
}
Playlist::Playlist (boost::shared_ptr<const Playlist> other, nframes_t start, nframes_t cnt, string str, bool hide)
- : SessionObject(other->_session, str), _type(other->_type), _orig_diskstream_id(other->_orig_diskstream_id)
+ : SessionObject(other->_session, str)
+ , _type(other->_type)
+ , _orig_diskstream_id(other->_orig_diskstream_id)
{
RegionLock rlock2 (const_cast<Playlist*> (other.get()));
add_region_internal (new_region, position);
}
-
+
in_set_state--;
first_set_state = false;
Playlist::release ()
{
if (_refcnt > 0) {
- _refcnt--;
+ _refcnt--;
}
if (_refcnt == 0) {
freeze_length = 0;
_explicit_relayering = false;
- Modified.connect (mem_fun (*this, &Playlist::mark_session_dirty));
+ Modified.connect_same_thread (*this, boost::bind (&Playlist::mark_session_dirty, this));
}
Playlist::~Playlist ()
{
+ DEBUG_TRACE (DEBUG::Destruction, string_compose ("Playlist %1 destructor\n", _name));
+
{
RegionLock rl (this);
/***********************************************************************
CHANGE NOTIFICATION HANDLING
-
+
Notifications must be delayed till the region_lock is released. This
is necessary because handlers for the signals may need to acquire
the lock (e.g. to read from the playlist).
void
Playlist::release_notifications ()
{
- if (g_atomic_int_dec_and_test (&block_notifications)) {
+ if (g_atomic_int_dec_and_test (&block_notifications)) {
flush_notifications ();
- }
+ }
}
void
Playlist::notify_region_moved (boost::shared_ptr<Region> r)
{
Evoral::RangeMove<nframes_t> const move (r->last_position (), r->length (), r->position ());
-
+
if (holding_state ()) {
pending_range_moves.push_back (move);
-
+
} else {
list< Evoral::RangeMove<nframes_t> > m;
/* we have no idea what order the regions ended up in pending
bounds (it could be based on selection order, for example).
- so, to preserve layering in the "most recently moved is higher"
+ so, to preserve layering in the "most recently moved is higher"
model, sort them by existing layer, then timestamp them.
*/
*************************************************************/
void
-Playlist::add_region (boost::shared_ptr<Region> region, nframes_t position, float times, bool auto_partition)
+Playlist::add_region (boost::shared_ptr<Region> region, nframes_t position, float times, bool auto_partition)
{
RegionLock rlock (this);
times = fabs (times);
-
+
int itimes = (int) floor (times);
nframes_t pos = position;
- if(times == 1 && auto_partition){
+ if (times == 1 && auto_partition){
partition(pos, (nframes_t) (pos + region->length()), true);
}
-
+
if (itimes >= 1) {
add_region_internal (region, pos);
pos += region->length();
--itimes;
}
-
-
+
+
/* note that itimes can be zero if we being asked to just
insert a single fraction of the region.
*/
add_region_internal (copy, pos);
pos += region->length();
}
-
+
nframes_t length = 0;
if (floor (times) != times) {
}
RegionSortByPosition cmp;
-
+
nframes_t old_length = 0;
if (!holding_state()) {
if (!first_set_state) {
boost::shared_ptr<Playlist> foo (shared_from_this());
region->set_playlist (boost::weak_ptr<Playlist>(foo));
- }
+ }
region->set_position (position, this);
/* we need to notify the existence of new region before checking dependents. Ick. */
notify_region_added (region);
-
+
if (!holding_state ()) {
check_dependents (region, false);
}
}
- region_state_changed_connections.push_back (
- region->StateChanged.connect (sigc::bind (mem_fun (this, &Playlist::region_changed_proxy),
- boost::weak_ptr<Region> (region)))
- );
+ region->StateChanged.connect_same_thread (region_state_changed_connections, boost::bind (&Playlist::region_changed_proxy, this, _1, boost::weak_ptr<Region> (region)));
return true;
}
if (!holding_state ()) {
relayer ();
remove_dependents (region);
-
+
if (old_length != _get_maximum_extent()) {
notify_length_changed ();
}
RegionList::iterator tmp;
OverlapType overlap;
nframes_t pos1, pos2, pos3, pos4;
-
+
in_partition = true;
-
+
/* need to work from a copy, because otherwise the regions we add during the process
get operated on as well.
*/
-
+
RegionList copy = regions;
-
+
for (RegionList::iterator i = copy.begin(); i != copy.end(); i = tmp) {
tmp = i;
++tmp;
-
+
current = *i;
if (current->first_frame() >= start && current->last_frame() < end) {
continue;
}
-
+
/* coverage will return OverlapStart if the start coincides
with the end point. we do not partition such a region,
so catch this special case.
pos2 = start;
pos3 = end;
pos4 = current->last_frame();
-
+
if (overlap == OverlapInternal) {
/* split: we need 3 new regions, the front, middle and end.
cut: we need 2 regions, the front and end.
*/
-
+
/*
start end
---------------*************************------------
---------------*****++++++++++++++++====------------
CUT
---------------*****----------------====------------
-
+
*/
if (!cutting) {
/* "middle" ++++++ */
-
+
_session.region_name (new_name, current->name(), false);
region = RegionFactory::create (current, pos2 - pos1, pos3 - pos2, new_name,
regions.size(), Region::Flag(current->flags()|Region::Automatic|Region::LeftOfSplit|Region::RightOfSplit));
add_region_internal (region, start);
new_regions.push_back (region);
}
-
+
/* "end" ====== */
-
+
_session.region_name (new_name, current->name(), false);
- region = RegionFactory::create (current, pos3 - pos1, pos4 - pos3, new_name,
+ region = RegionFactory::create (current, pos3 - pos1, pos4 - pos3, new_name,
regions.size(), Region::Flag(current->flags()|Region::Automatic|Region::RightOfSplit));
add_region_internal (region, end);
new_regions.push_back (region);
-
+
/* "front" ***** */
-
+
current->freeze ();
thawlist.push_back (current);
current->trim_end (pos2, this);
start end
---------------*************************------------
P1 P2 P4 P3
- SPLIT:
+ SPLIT:
---------------**************+++++++++++------------
- CUT:
+ CUT:
---------------**************-----------------------
*/
-
+
if (!cutting) {
/* end +++++ */
-
+
_session.region_name (new_name, current->name(), false);
region = RegionFactory::create (current, pos2 - pos1, pos4 - pos2, new_name, (layer_t) regions.size(),
Region::Flag(current->flags()|Region::Automatic|Region::LeftOfSplit));
add_region_internal (region, start);
new_regions.push_back (region);
}
-
+
/* front ****** */
-
+
current->freeze ();
thawlist.push_back (current);
current->trim_end (pos2, this);
/* split: we need 2 regions: the front and the end.
cut: just trim current to skip the cut area
*/
-
+
/*
start end
---------------*************************------------
- P2 P1 P3 P4
+ P2 P1 P3 P4
SPLIT:
---------------****+++++++++++++++++++++------------
CUT:
-------------------*********************------------
-
+
*/
if (!cutting) {
add_region_internal (region, pos1);
new_regions.push_back (region);
- }
-
+ }
+
/* end */
-
+
current->freeze ();
thawlist.push_back (current);
current->trim_front (pos3, this);
/* split: no split required.
cut: remove the region.
*/
-
+
/*
start end
---------------*************************------------
- P2 P1 P3 P4
+ P2 P1 P3 P4
SPLIT:
---------------*************************------------
CUT:
----------------------------------------------------
-
+
*/
-
+
if (cutting) {
remove_region_internal (current);
}
for (list<AudioRange>::iterator i = ranges.begin(); i != ranges.end(); ++i) {
pl = (this->*pmf)((*i).start, (*i).length(), result_is_hidden);
-
+
if (i == ranges.begin()) {
ret = pl;
} else {
-
+
/* paste the next section into the nascent playlist,
offset to reflect the start of the first range we
chopped.
Playlist::copy (nframes_t start, nframes_t cnt, bool result_is_hidden)
{
char buf[32];
-
+
snprintf (buf, sizeof (buf), "%" PRIu32, ++subcnt);
string new_name = _name;
new_name += '.';
RegionLock rl2 (other.get());
old_length = _get_maximum_extent();
-
+
int itimes = (int) floor (times);
nframes_t pos = position;
nframes_t shift = other->_get_maximum_extent();
/* put these new regions on top of all existing ones, but preserve
the ordering they had in the original playlist.
*/
-
+
copy_of_region->set_layer (copy_of_region->layer() + top_layer);
add_region_internal (copy_of_region, copy_of_region->position() + pos);
}
notify_length_changed ();
}
-
+
}
return 0;
/* too early */
continue;
}
-
+
if (at > (*r)->first_frame() && at < (*r)->last_frame()) {
/* intersected region */
if (!move_intersected) {
continue;
}
}
-
+
/* do not move regions glued to music time - that
has to be done separately.
*/
string after_name;
/* split doesn't change anything about length, so don't try to splice */
-
+
bool old_sp = _splicing;
_splicing = true;
before = playlist_position - region->position();
after = region->length() - before;
-
+
_session.region_name (before_name, region->name(), false);
left = RegionFactory::create (region, 0, before, before_name, region->layer(), Region::Flag (region->flags()|Region::LeftOfSplit));
(*i)->set_last_layer_op( (*i)->last_layer_op() + 1 );
}
}
-
+
left->set_last_layer_op ( orig_layer_op );
right->set_last_layer_op ( orig_layer_op + 1);
layer_op_counter++;
finalize_split_region (region, left, right);
-
+
remove_region_internal (region);
_splicing = old_sp;
new_pos = 0;
} else if (new_pos >= max_frames - (*i)->length()) {
new_pos = max_frames - (*i)->length();
- }
-
+ }
+
(*i)->set_position (new_pos, this);
}
}
/* remove it from the list then add it back in
the right place again.
*/
-
+
RegionSortByPosition cmp;
RegionList::iterator i = find (regions.begin(), regions.end(), region);
-
+
if (i == regions.end()) {
warning << string_compose (_("%1: bounds changed received for region (%2)not in playlist"),
_name, region->name())
}
if (what_changed & Change (ARDOUR::PositionChanged|ARDOUR::LengthChanged)) {
-
+
nframes64_t delta = 0;
-
+
if (what_changed & ARDOUR::PositionChanged) {
delta = (nframes64_t) region->position() - (nframes64_t) region->last_position();
- }
-
+ }
+
if (what_changed & ARDOUR::LengthChanged) {
delta += (nframes64_t) region->length() - (nframes64_t) region->last_length();
- }
+ }
if (delta) {
possibly_splice (region->last_position() + region->last_length(), delta, region);
/* it moved or changed length, so change the timestamp */
timestamp_layer_op (region);
}
-
+
notify_length_changed ();
relayer ();
check_dependents (region, false);
return;
}
-
/* this makes a virtual call to the right kind of playlist ... */
region_changed (what_changed, region);
region_bounds_changed (what_changed, region);
save = !(_splicing || _nudging);
}
-
- if ((what_changed & our_interests) &&
+
+ if ((what_changed & our_interests) &&
!(what_changed & Change (ARDOUR::PositionChanged|ARDOUR::LengthChanged))) {
check_dependents (region, false);
}
if (what_changed & Change (ARDOUR::PositionChanged)) {
notify_region_moved (region);
}
-
+
if (what_changed & our_interests) {
save = true;
}
{
RegionLock rl (this);
- for (
- std::list<sigc::connection>::iterator i = region_state_changed_connections.begin ();
- i != region_state_changed_connections.end ();
- ++i
- ) {
- i->disconnect ();
- }
-
+ region_state_changed_connections.drop_connections ();
+
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
pending_removes.insert (*i);
}
{
RegionLock rlock (this);
return find_regions_at (frame);
-}
+}
boost::shared_ptr<Region>
Playlist::top_region_at (nframes_t frame)
RegionLock rlock (this);
RegionList *rlist = find_regions_at (frame);
boost::shared_ptr<Region> region;
-
+
+ if (rlist->size()) {
+ RegionSortByLayer cmp;
+ rlist->sort (cmp);
+ region = rlist->back();
+ }
+
+ delete rlist;
+ return region;
+}
+
+boost::shared_ptr<Region>
+Playlist::top_unmuted_region_at (nframes_t frame)
+
+{
+ RegionLock rlock (this);
+ RegionList *rlist = find_regions_at (frame);
+
+ for (RegionList::iterator i = rlist->begin(); i != rlist->end(); ) {
+
+ RegionList::iterator tmp = i;
+ ++tmp;
+
+ if ((*i)->muted()) {
+ rlist->erase (i);
+ }
+
+ i = tmp;
+ }
+
+ boost::shared_ptr<Region> region;
+
if (rlist->size()) {
RegionSortByLayer cmp;
rlist->sort (cmp);
region = rlist->back();
- }
+ }
delete rlist;
return region;
-}
+}
Playlist::RegionList*
Playlist::regions_to_read (nframes_t start, nframes_t end)
if (covering.size() == 1) {
rlist->push_back (covering.front());
-
+
} else {
-
+
for (set<nframes_t>::iterator t = to_check.begin(); t != to_check.end(); ++t) {
-
+
here.clear ();
-
+
for (RegionList::iterator x = covering.begin(); x != covering.end(); ++x) {
-
+
if ((*x)->covers (*t)) {
here.push_back (*x);
}
}
-
+
RegionSortByLayer cmp;
here.sort (cmp);
-
+
/* ... and get the top/transparent regions at "here" */
-
+
for (RegionList::reverse_iterator c = here.rbegin(); c != here.rend(); ++c) {
-
+
unique.insert (*c);
-
+
if ((*c)->opaque()) {
-
+
/* the other regions at this position are hidden by this one */
-
+
break;
}
}
}
-
+
for (set<boost::shared_ptr<Region> >::iterator s = unique.begin(); s != unique.end(); ++s) {
rlist->push_back (*s);
}
if (rlist->size() > 1) {
/* now sort by time order */
-
+
RegionSortByPosition cmp;
rlist->sort (cmp);
}
(*i)->get_transients (these_points);
/* add first frame, just, err, because */
-
+
these_points.push_back ((*i)->first_frame());
-
+
points.insert (points.end(), these_points.begin(), these_points.end());
these_points.clear ();
}
-
+
if (points.empty()) {
return -1;
}
TransientDetector::cleanup_transients (points, _session.frame_rate(), 3.0);
bool reached = false;
-
+
if (dir > 0) {
for (AnalysisFeatureList::iterator x = points.begin(); x != points.end(); ++x) {
if ((*x) >= from) {
reached = true;
}
-
+
if (reached && (*x) > from) {
return *x;
}
if ((*x) <= from) {
reached = true;
}
-
+
if (reached && (*x) < from) {
return *x;
}
break;
default: /* backwards */
-
+
if (pos < frame) {
if ((distance = frame - pos) < closest) {
closest = distance;
boost::shared_ptr<Region> r = (*i);
nframes64_t distance;
-
+
if (r->first_frame() > frame) {
distance = r->first_frame() - frame;
-
+
if (distance < closest) {
ret = r->first_frame();
closest = distance;
}
if (r->last_frame () > frame) {
-
+
distance = r->last_frame () - frame;
-
+
if (distance < closest) {
ret = r->last_frame ();
closest = distance;
} else {
for (RegionList::reverse_iterator i = regions.rbegin(); i != regions.rend(); ++i) {
-
+
boost::shared_ptr<Region> r = (*i);
nframes64_t distance;
if (r->last_frame() < frame) {
distance = frame - r->last_frame();
-
+
if (distance < closest) {
ret = r->last_frame();
closest = distance;
}
if (r->first_frame() < frame) {
-
+
distance = frame - r->first_frame();
if (distance < closest) {
}
int
-Playlist::set_state (const XMLNode& node)
+Playlist::set_state (const XMLNode& node, int version)
{
XMLNode *child;
XMLNodeList nlist;
for (piter = plist.begin(); piter != plist.end(); ++piter) {
prop = *piter;
-
+
if (prop->name() == X_("name")) {
_name = prop->value();
} else if (prop->name() == X_("orig_diskstream_id")) {
_orig_diskstream_id = prop->value ();
} else if (prop->name() == X_("frozen")) {
- _frozen = (prop->value() == X_("yes"));
+ _frozen = string_is_affirmative (prop->value());
}
}
clear (false);
-
+
nlist = node.children();
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
child = *niter;
-
+
if (child->name() == "Region") {
if ((prop = child->property ("id")) == 0) {
error << _("region state node has no ID, ignored") << endmsg;
continue;
}
-
+
ID id = prop->value ();
-
+
if ((region = region_by_id (id))) {
Change what_changed = Change (0);
- if (region->set_live_state (*child, what_changed, true)) {
+ if (region->set_live_state (*child, version, what_changed, true)) {
error << _("Playlist: cannot reset region state from XML") << endmsg;
continue;
}
// So that layer_op ordering doesn't get screwed up
region->set_last_layer_op( region->layer());
- }
+ }
}
-
+
notify_modified ();
thaw ();
- /* update dependents, which was not done during add_region_internal
- due to in_set_state being true
+ /* update dependents, which was not done during add_region_internal
+ due to in_set_state being true
*/
for (RegionList::iterator r = regions.begin(); r != regions.end(); ++r) {
{
XMLNode *node = new XMLNode (X_("Playlist"));
char buf[64];
-
+
node->add_property (X_("name"), _name);
node->add_property (X_("type"), _type.to_string());
return max_extent;
}
-string
+string
Playlist::bump_name (string name, Session &session)
{
string newname = name;
do {
newname = bump_name_once (newname);
- } while (session.playlist_by_name (newname)!=NULL);
+ } while (session.playlists->by_name (newname)!=NULL);
return newname;
}
layer_t
Playlist::top_layer() const
{
- RegionLock rlock (const_cast<Playlist *> (this));
+ RegionLock rlock (const_cast<Playlist *> (this));
layer_t top = 0;
for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) {
/* don't send multiple Modified notifications
when multiple regions are relayered.
*/
-
+
freeze ();
/* Build up a new list of regions on each layer, stored in a set of lists
}
/* hence the size of each time division */
- double const division_size = (end - start) / divisions;
+ double const division_size = (end - start) / double (divisions);
vector<vector<RegionList> > layers;
layers.push_back (vector<RegionList> (divisions));
} else if (_session.config.get_layer_model() == MoveAddHigher || _session.config.get_layer_model() == AddHigher) {
copy.sort (RegionSortByLastLayerOp ());
-
+
}
for (RegionList::iterator i = copy.begin(); i != copy.end(); ++i) {
end_division--;
}
+ assert (end_division < divisions);
+
/* find the lowest layer that this region can go on */
size_t j = layers.size();
while (j > 0) {
/* overlap, so we must use layer j */
break;
}
-
+
--j;
}
{
RegionLock rlock (const_cast<Playlist *> (this));
-
+
for (i = regions.begin(); i != regions.end(); ++i) {
-
+
if (region == *i) {
continue;
}
/* region is moving up, move all regions on intermediate layers
down 1
*/
-
+
if ((*i)->layer() > region->layer() && (*i)->layer() <= target_layer) {
dest = (*i)->layer() - 1;
} else {
}
LayerInfo newpair;
-
+
newpair.first = *i;
newpair.second = dest;
-
+
layerinfo.push_back (newpair);
- }
+ }
}
/* now reset the layers without holding the region lock */
for (list<LayerInfo>::iterator x = layerinfo.begin(); x != layerinfo.end(); ++x) {
check_dependents (x->first, false);
}
-
+
check_dependents (region, false);
#endif
-
+
return 0;
}
{
RegionLock rlock (const_cast<Playlist *> (this));
-
+
for (i = regions.begin(); i != regions.end(); ++i) {
if ((*i)->position() >= start) {
} else {
new_pos = (*i)->position() + distance;
}
-
+
} else {
-
+
if ((*i)->position() > distance) {
new_pos = (*i)->position() - distance;
} else {
}
return boost::shared_ptr<Region> ();
}
-
+
void
Playlist::dump () const
{
for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) {
r = *i;
- cerr << " " << r->name() << " ["
- << r->start() << "+" << r->length()
- << "] at "
+ cerr << " " << r->name() << " ["
+ << r->start() << "+" << r->length()
+ << "] at "
<< r->position()
<< " on layer "
<< r->layer ()
{
RegionLock rlock (const_cast<Playlist*> (this));
-
-
+
+
if (dir > 0) {
-
+
RegionList::iterator next;
- for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
+ for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
if ((*i) == region) {
next = i;
++next;
}
}
} else {
-
+
RegionList::iterator prev = regions.end();
-
- for (RegionList::iterator i = regions.begin(); i != regions.end(); prev = i, ++i) {
+
+ for (RegionList::iterator i = regions.begin(); i != regions.end(); prev = i, ++i) {
if ((*i) == region) {
if (prev != regions.end()) {
region->set_position ((*prev)->position(), this);
(*prev)->set_position (new_pos, this);
-
+
/* avoid a full sort */
regions.erase (i); // remove region
relayer ();
check_dependents (region, false);
-
+
notify_modified();
}
}
bool
-Playlist::region_is_shuffle_constrained (boost::shared_ptr<Region>)
+Playlist::region_is_shuffle_constrained (boost::shared_ptr<Region>)
{
RegionLock rlock (const_cast<Playlist*> (this));
-
+
if (regions.size() > 1) {
return true;
}
RegionList copy (regions);
freeze ();
-
- for (RegionList::iterator i = copy.begin(); i != copy.end(); ++i) {
+
+ for (RegionList::iterator i = copy.begin(); i != copy.end(); ++i) {
(*i)->update_position_after_tempo_map_change ();
}
}
void
-Playlist::foreach_region (sigc::slot<void, boost::shared_ptr<Region> > s)
+Playlist::foreach_region (boost::function<void(boost::shared_ptr<Region>)> s)
{
RegionLock rl (this, false);
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
_explicit_relayering = e;
}
+
+
+bool
+Playlist::has_region_at (nframes64_t const p) const
+{
+ RegionLock (const_cast<Playlist *> (this));
+
+ RegionList::const_iterator i = regions.begin ();
+ while (i != regions.end() && !(*i)->covers (p)) {
+ ++i;
+ }
+
+ return (i != regions.end());
+}