13
0

framecnt -> framepos for extents, as I think it makes slightly more sense.

git-svn-id: svn://localhost/ardour2/branches/3.0@7836 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-09-23 22:55:51 +00:00
parent 8202e6cfbb
commit 6a67194735
2 changed files with 7 additions and 7 deletions

View File

@ -118,7 +118,7 @@ public:
bool hidden() const { return _hidden; }
bool empty() const;
uint32_t n_regions() const;
std::pair<framecnt_t, framecnt_t> get_extent () const;
std::pair<framepos_t, framepos_t> get_extent () const;
layer_t top_layer() const;
EditMode get_edit_mode() const { return _edit_mode; }
@ -340,7 +340,7 @@ public:
void copy_regions (RegionList&) const;
void partition_internal (framepos_t start, framepos_t end, bool cutting, RegionList& thawlist);
std::pair<framecnt_t, framecnt_t> _get_extent() const;
std::pair<framepos_t, framepos_t> _get_extent() const;
boost::shared_ptr<Playlist> cut_copy (boost::shared_ptr<Playlist> (Playlist::*pmf)(framepos_t, framecnt_t, bool),
std::list<AudioRange>& ranges, bool result_is_hidden);

View File

@ -544,7 +544,7 @@ Playlist::notify_region_added (boost::shared_ptr<Region> r)
/* the length change might not be true, but we have to act
as though it could be.
*/
if (holding_state()) {
pending_adds.insert (r);
pending_contents_change = true;
@ -2308,20 +2308,20 @@ Playlist::n_regions() const
return regions.size();
}
pair<framecnt_t, framecnt_t>
pair<framepos_t, framepos_t>
Playlist::get_extent () const
{
RegionLock rlock (const_cast<Playlist *>(this), false);
return _get_extent ();
}
pair<framecnt_t, framecnt_t>
pair<framepos_t, framepos_t>
Playlist::_get_extent () const
{
pair<framecnt_t, framecnt_t> ext (max_framepos, 0);
pair<framepos_t, framepos_t> ext (max_framepos, 0);
for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) {
pair<framecnt_t, framecnt_t> const e ((*i)->position(), (*i)->position() + (*i)->length());
pair<framepos_t, framepos_t> const e ((*i)->position(), (*i)->position() + (*i)->length());
if (e.first < ext.first) {
ext.first = e.first;
}