-void
-AudioStreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
-{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::remove_region_view), weak_r));
-
- boost::shared_ptr<Region> r (weak_r.lock());
-
- if (!r) {
- return;
- }
-
- if (!_trackview.session().deletion_in_progress()) {
-
- for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
- list<CrossfadeView*>::iterator tmp;
-
- tmp = i;
- ++tmp;
-
- boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(r);
- if (ar && (*i)->crossfade->involves (ar)) {
- delete *i;
- crossfade_views.erase (i);
- }
-
- i = tmp;
- }
- }
-
- StreamView::remove_region_view(r);
-}
-
-void
-AudioStreamView::undisplay_diskstream ()
-{
- StreamView::undisplay_diskstream();
-
- for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
- delete *i;
- }
-
- crossfade_views.clear ();
-}
-
-void
-AudioStreamView::playlist_modified_weak (boost::weak_ptr<Diskstream> ds)
-{
- boost::shared_ptr<Diskstream> sp (ds.lock());
- if (!sp) {
- return;
- }
-
- playlist_modified (sp);
-}
-
-void
-AudioStreamView::playlist_modified (boost::shared_ptr<Diskstream> ds)
-{
- /* we do not allow shared_ptr<T> to be bound to slots */
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::playlist_modified_weak), ds));
-
- StreamView::playlist_modified (ds);
-
- /* make sure xfades are on top and all the regionviews are stacked correctly. */
-
- for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
- (*i)->get_canvas_group()->raise_to_top();
- }
-}
-
-void
-AudioStreamView::playlist_changed (boost::shared_ptr<Diskstream> ds)
-{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::playlist_changed), ds));
-
- StreamView::playlist_changed(ds);
-
- boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(ds->playlist());
- if (apl)
- playlist_connections.push_back (apl->NewCrossfade.connect (mem_fun (*this, &AudioStreamView::add_crossfade)));
-}
-
-void
-AudioStreamView::add_crossfade_weak (boost::weak_ptr<Crossfade> crossfade)