mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-30 02:17:49 +01:00
bind() call involving shared_ptr<Crossfade> fixed
git-svn-id: svn://localhost/ardour2/trunk@1741 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4ebea3867e
commit
cc4e4ffe40
2 changed files with 16 additions and 1 deletions
|
|
@ -290,13 +290,27 @@ AudioStreamView::playlist_changed (boost::shared_ptr<Diskstream> ds)
|
|||
playlist_connections.push_back (apl->NewCrossfade.connect (mem_fun (*this, &AudioStreamView::add_crossfade)));
|
||||
}
|
||||
|
||||
void
|
||||
AudioStreamView::add_crossfade_weak (boost::weak_ptr<Crossfade> crossfade)
|
||||
{
|
||||
boost::shared_ptr<Crossfade> sp (crossfade.lock());
|
||||
|
||||
if (!sp) {
|
||||
return;
|
||||
}
|
||||
|
||||
add_crossfade (sp);
|
||||
}
|
||||
|
||||
void
|
||||
AudioStreamView::add_crossfade (boost::shared_ptr<Crossfade> crossfade)
|
||||
{
|
||||
AudioRegionView* lview = 0;
|
||||
AudioRegionView* rview = 0;
|
||||
|
||||
/* we do not allow shared_ptr<T> to be bound to slots */
|
||||
|
||||
ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::add_crossfade), crossfade));
|
||||
ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::add_crossfade_weak), boost::weak_ptr<Crossfade> (crossfade)));
|
||||
|
||||
/* first see if we already have a CrossfadeView for this Crossfade */
|
||||
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ class AudioStreamView : public StreamView
|
|||
void playlist_changed (boost::shared_ptr<ARDOUR::Diskstream>);
|
||||
|
||||
void add_crossfade (boost::shared_ptr<ARDOUR::Crossfade>);
|
||||
void add_crossfade_weak (boost::weak_ptr<ARDOUR::Crossfade>);
|
||||
void remove_crossfade (boost::shared_ptr<ARDOUR::Crossfade>);
|
||||
|
||||
void color_handler (ColorID id, uint32_t val);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue