alter API for playlist ripple callback, to provide required information
This commit is contained in:
parent
0e2bd5383c
commit
815abed5c5
@ -191,7 +191,7 @@ public:
|
||||
|
||||
void shuffle (boost::shared_ptr<Region>, int dir);
|
||||
|
||||
typedef boost::function<void (Playlist&)> RippleCallback;
|
||||
typedef boost::function<void (Playlist&, samplepos_t, samplecnt_t)> RippleCallback;
|
||||
|
||||
void ripple (samplepos_t at, samplecnt_t distance, RegionList* exclude, RippleCallback ripple_callback);
|
||||
void ripple (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> exclude, RippleCallback ripple_callback)
|
||||
|
@ -878,7 +878,7 @@ Playlist::remove_gaps (samplepos_t gap_threshold, samplepos_t leave_gap, boost::
|
||||
RegionList::iterator i;
|
||||
RegionList::iterator nxt (regions.end());
|
||||
bool closed = false;
|
||||
boost::function<void (Playlist&)> null_ripple_callback;
|
||||
RippleCallback null_ripple_callback;
|
||||
|
||||
if (regions.size() < 2) {
|
||||
return;
|
||||
@ -1653,6 +1653,12 @@ Playlist::splice_unlocked (samplepos_t at, samplecnt_t distance, boost::shared_p
|
||||
notify_contents_changed ();
|
||||
}
|
||||
|
||||
void
|
||||
Playlist::ripple (samplepos_t at, samplecnt_t distance, RegionList* exclude, RippleCallback ripple_callback)
|
||||
{
|
||||
ripple_locked (at, distance, exclude, ripple_callback);
|
||||
}
|
||||
|
||||
void
|
||||
Playlist::ripple_locked (samplepos_t at, samplecnt_t distance, RegionList* exclude, RippleCallback ripple_callback)
|
||||
{
|
||||
@ -1694,7 +1700,7 @@ Playlist::ripple_unlocked (samplepos_t at, samplecnt_t distance, RegionList* exc
|
||||
|
||||
_rippling = false;
|
||||
|
||||
ripple_callback (*this);
|
||||
ripple_callback (*this, at, distance);
|
||||
|
||||
if (notify) {
|
||||
notify_contents_changed ();
|
||||
@ -3024,12 +3030,6 @@ Playlist::region_is_shuffle_constrained (boost::shared_ptr<Region>)
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
Playlist::ripple (samplepos_t at, samplecnt_t distance, RegionList* exclude, RippleCallback ripple_callback)
|
||||
{
|
||||
ripple_locked (at, distance, exclude, ripple_callback);
|
||||
}
|
||||
|
||||
void
|
||||
Playlist::update_after_tempo_map_change ()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user