diff options
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 776af75a36..7a87033a56 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -124,12 +124,12 @@ Playlist::Playlist (const Playlist& other, string namestr, bool hide) } -Playlist::Playlist (const Playlist& other, jack_nframes_t start, jack_nframes_t cnt, string str, bool hide) +Playlist::Playlist (const Playlist& other, nframes_t start, nframes_t cnt, string str, bool hide) : _name (str), _session (other._session), _orig_diskstream_id(other._orig_diskstream_id) { RegionLock rlock2 (&((Playlist&)other)); - jack_nframes_t end = start + cnt - 1; + nframes_t end = start + cnt - 1; init (hide); @@ -137,9 +137,9 @@ Playlist::Playlist (const Playlist& other, jack_nframes_t start, jack_nframes_t boost::shared_ptr<Region> region; boost::shared_ptr<Region> new_region; - jack_nframes_t offset = 0; - jack_nframes_t position = 0; - jack_nframes_t len = 0; + nframes_t offset = 0; + nframes_t position = 0; + nframes_t len = 0; string new_name; OverlapType overlap; @@ -454,7 +454,7 @@ Playlist::flush_notifications () *************************************************************/ void -Playlist::add_region (boost::shared_ptr<Region> region, jack_nframes_t position, float times, bool with_save) +Playlist::add_region (boost::shared_ptr<Region> region, nframes_t position, float times, bool with_save) { RegionLock rlock (this); @@ -462,7 +462,7 @@ Playlist::add_region (boost::shared_ptr<Region> region, jack_nframes_t position, int itimes = (int) floor (times); - jack_nframes_t pos = position; + nframes_t pos = position; if (itimes >= 1) { add_region_internal (region, pos, true); @@ -487,7 +487,7 @@ Playlist::add_region (boost::shared_ptr<Region> region, jack_nframes_t position, } if (floor (times) != times) { - jack_nframes_t length = (jack_nframes_t) floor (region->length() * (times - floor (times))); + nframes_t length = (nframes_t) floor (region->length() * (times - floor (times))); string name; _session.region_name (name, region->name(), false); boost::shared_ptr<Region> sub = RegionFactory::create (region, 0, length, name, region->layer(), region->flags()); @@ -500,10 +500,10 @@ Playlist::add_region (boost::shared_ptr<Region> region, jack_nframes_t position, } void -Playlist::add_region_internal (boost::shared_ptr<Region> region, jack_nframes_t position, bool delay_sort) +Playlist::add_region_internal (boost::shared_ptr<Region> region, nframes_t position, bool delay_sort) { RegionSortByPosition cmp; - jack_nframes_t old_length = 0; + nframes_t old_length = 0; if (!holding_state()) { old_length = _get_maximum_extent(); @@ -536,7 +536,7 @@ Playlist::add_region_internal (boost::shared_ptr<Region> region, jack_nframes_t } void -Playlist::replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, jack_nframes_t pos) +Playlist::replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, nframes_t pos) { RegionLock rlock (this); @@ -567,7 +567,7 @@ int Playlist::remove_region_internal (boost::shared_ptr<Region>region, bool delay_sort) { RegionList::iterator i; - jack_nframes_t old_length = 0; + nframes_t old_length = 0; // cerr << "removing region " << region->name() << endl; @@ -622,7 +622,7 @@ Playlist::get_region_list_equivalent_regions (boost::shared_ptr<Region> other, v } void -Playlist::partition (jack_nframes_t start, jack_nframes_t end, bool just_top_level) +Playlist::partition (nframes_t start, nframes_t end, bool just_top_level) { RegionList thawlist; @@ -636,7 +636,7 @@ Playlist::partition (jack_nframes_t start, jack_nframes_t end, bool just_top_lev } void -Playlist::partition_internal (jack_nframes_t start, jack_nframes_t end, bool cutting, RegionList& thawlist) +Playlist::partition_internal (nframes_t start, nframes_t end, bool cutting, RegionList& thawlist) { RegionLock rlock (this); boost::shared_ptr<Region> region; @@ -644,7 +644,7 @@ Playlist::partition_internal (jack_nframes_t start, jack_nframes_t end, bool cut string new_name; RegionList::iterator tmp; OverlapType overlap; - jack_nframes_t pos1, pos2, pos3, pos4; + nframes_t pos1, pos2, pos3, pos4; RegionList new_regions; in_partition = true; @@ -818,11 +818,11 @@ Playlist::partition_internal (jack_nframes_t start, jack_nframes_t end, bool cut } Playlist* -Playlist::cut_copy (Playlist* (Playlist::*pmf)(jack_nframes_t, jack_nframes_t,bool), list<AudioRange>& ranges, bool result_is_hidden) +Playlist::cut_copy (Playlist* (Playlist::*pmf)(nframes_t, nframes_t,bool), list<AudioRange>& ranges, bool result_is_hidden) { Playlist* ret; Playlist* pl; - jack_nframes_t start; + nframes_t start; if (ranges.empty()) { return 0; @@ -862,19 +862,19 @@ Playlist::cut_copy (Playlist* (Playlist::*pmf)(jack_nframes_t, jack_nframes_t,bo Playlist* Playlist::cut (list<AudioRange>& ranges, bool result_is_hidden) { - Playlist* (Playlist::*pmf)(jack_nframes_t,jack_nframes_t,bool) = &Playlist::cut; + Playlist* (Playlist::*pmf)(nframes_t,nframes_t,bool) = &Playlist::cut; return cut_copy (pmf, ranges, result_is_hidden); } Playlist* Playlist::copy (list<AudioRange>& ranges, bool result_is_hidden) { - Playlist* (Playlist::*pmf)(jack_nframes_t,jack_nframes_t,bool) = &Playlist::copy; + Playlist* (Playlist::*pmf)(nframes_t,nframes_t,bool) = &Playlist::copy; return cut_copy (pmf, ranges, result_is_hidden); } Playlist * -Playlist::cut (jack_nframes_t start, jack_nframes_t cnt, bool result_is_hidden) +Playlist::cut (nframes_t start, nframes_t cnt, bool result_is_hidden) { Playlist *the_copy; RegionList thawlist; @@ -902,7 +902,7 @@ Playlist::cut (jack_nframes_t start, jack_nframes_t cnt, bool result_is_hidden) } Playlist * -Playlist::copy (jack_nframes_t start, jack_nframes_t cnt, bool result_is_hidden) +Playlist::copy (nframes_t start, nframes_t cnt, bool result_is_hidden) { char buf[32]; @@ -916,10 +916,10 @@ Playlist::copy (jack_nframes_t start, jack_nframes_t cnt, bool result_is_hidden) } int -Playlist::paste (Playlist& other, jack_nframes_t position, float times) +Playlist::paste (Playlist& other, nframes_t position, float times) { times = fabs (times); - jack_nframes_t old_length; + nframes_t old_length; { RegionLock rl1 (this); @@ -928,8 +928,8 @@ Playlist::paste (Playlist& other, jack_nframes_t position, float times) old_length = _get_maximum_extent(); int itimes = (int) floor (times); - jack_nframes_t pos = position; - jack_nframes_t shift = other._get_maximum_extent(); + nframes_t pos = position; + nframes_t shift = other._get_maximum_extent(); layer_t top_layer = regions.size(); while (itimes--) { @@ -964,13 +964,13 @@ Playlist::paste (Playlist& other, jack_nframes_t position, float times) void -Playlist::duplicate (boost::shared_ptr<Region> region, jack_nframes_t position, float times) +Playlist::duplicate (boost::shared_ptr<Region> region, nframes_t position, float times) { times = fabs (times); RegionLock rl (this); int itimes = (int) floor (times); - jack_nframes_t pos = position; + nframes_t pos = position; while (itimes--) { boost::shared_ptr<Region> copy = RegionFactory::create (region); @@ -979,7 +979,7 @@ Playlist::duplicate (boost::shared_ptr<Region> region, jack_nframes_t position, } if (floor (times) != times) { - jack_nframes_t length = (jack_nframes_t) floor (region->length() * (times - floor (times))); + nframes_t length = (nframes_t) floor (region->length() * (times - floor (times))); string name; _session.region_name (name, region->name(), false); boost::shared_ptr<Region> sub = RegionFactory::create (region, 0, length, name, region->layer(), region->flags()); @@ -990,7 +990,7 @@ Playlist::duplicate (boost::shared_ptr<Region> region, jack_nframes_t position, } void -Playlist::split_region (boost::shared_ptr<Region> region, jack_nframes_t playlist_position) +Playlist::split_region (boost::shared_ptr<Region> region, nframes_t playlist_position) { RegionLock rl (this); @@ -1005,8 +1005,8 @@ Playlist::split_region (boost::shared_ptr<Region> region, jack_nframes_t playlis boost::shared_ptr<Region> left; boost::shared_ptr<Region> right; - jack_nframes_t before; - jack_nframes_t after; + nframes_t before; + nframes_t after; string before_name; string after_name; @@ -1210,7 +1210,7 @@ Playlist::clear (bool with_save) **********************************************************************/ Playlist::RegionList * -Playlist::regions_at (jack_nframes_t frame) +Playlist::regions_at (nframes_t frame) { RegionLock rlock (this); @@ -1218,7 +1218,7 @@ Playlist::regions_at (jack_nframes_t frame) } boost::shared_ptr<Region> -Playlist::top_region_at (jack_nframes_t frame) +Playlist::top_region_at (nframes_t frame) { RegionLock rlock (this); @@ -1236,7 +1236,7 @@ Playlist::top_region_at (jack_nframes_t frame) } Playlist::RegionList * -Playlist::find_regions_at (jack_nframes_t frame) +Playlist::find_regions_at (nframes_t frame) { RegionList *rlist = new RegionList; @@ -1250,7 +1250,7 @@ Playlist::find_regions_at (jack_nframes_t frame) } Playlist::RegionList * -Playlist::regions_touched (jack_nframes_t start, jack_nframes_t end) +Playlist::regions_touched (nframes_t start, nframes_t end) { RegionLock rlock (this); RegionList *rlist = new RegionList; @@ -1266,17 +1266,17 @@ Playlist::regions_touched (jack_nframes_t start, jack_nframes_t end) boost::shared_ptr<Region> -Playlist::find_next_region (jack_nframes_t frame, RegionPoint point, int dir) +Playlist::find_next_region (nframes_t frame, RegionPoint point, int dir) { RegionLock rlock (this); boost::shared_ptr<Region> ret; - jack_nframes_t closest = max_frames; + nframes_t closest = max_frames; for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - jack_nframes_t distance; + nframes_t distance; boost::shared_ptr<Region> r = (*i); - jack_nframes_t pos = 0; + nframes_t pos = 0; switch (point) { case Start: @@ -1445,19 +1445,19 @@ Playlist::empty() const return regions.empty(); } -jack_nframes_t +nframes_t Playlist::get_maximum_extent () const { RegionLock rlock (const_cast<Playlist *>(this)); return _get_maximum_extent (); } -jack_nframes_t +nframes_t Playlist::_get_maximum_extent () const { RegionList::const_iterator i; - jack_nframes_t max_extent = 0; - jack_nframes_t end = 0; + nframes_t max_extent = 0; + nframes_t end = 0; for (i = regions.begin(); i != regions.end(); ++i) { if ((end = (*i)->position() + (*i)->length()) > max_extent) { @@ -1694,10 +1694,10 @@ Playlist::move_region_to_layer (layer_t target_layer, boost::shared_ptr<Region> } void -Playlist::nudge_after (jack_nframes_t start, jack_nframes_t distance, bool forwards) +Playlist::nudge_after (nframes_t start, nframes_t distance, bool forwards) { RegionList::iterator i; - jack_nframes_t new_pos; + nframes_t new_pos; bool moved = false; _nudging = true; |