diff options
author | Hans Fugal <hans@fugal.net> | 2006-08-04 02:18:45 +0000 |
---|---|---|
committer | Hans Fugal <hans@fugal.net> | 2006-08-04 02:18:45 +0000 |
commit | 79986643c0c904f6574bb5323e2233a43a9e622e (patch) | |
tree | 859323dbb096ac1658359881e7d11415b6588caa /gtk2_ardour/editor_timefx.cc | |
parent | b0b723445816bc968a6a183c6619fccc61e82859 (diff) |
r269@gandalf: fugalh | 2006-08-03 20:18:05 -0600
Trunk merge conflicts resolved
git-svn-id: svn://localhost/ardour2/branches/undo@756 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_timefx.cc')
-rw-r--r-- | gtk2_ardour/editor_timefx.cc | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc index 27fa6c9651..3fe0023d07 100644 --- a/gtk2_ardour/editor_timefx.cc +++ b/gtk2_ardour/editor_timefx.cc @@ -29,7 +29,7 @@ #include "editor.h" #include "audio_time_axis.h" -#include "regionview.h" +#include "audio_region_view.h" #include "region_selection.h" #include <ardour/session.h> @@ -101,7 +101,7 @@ Editor::TimeStretchDialog::delete_timestretch_in_progress (GdkEventAny* ev) } int -Editor::run_timestretch (AudioRegionSelection& regions, float fraction) +Editor::run_timestretch (RegionSelection& regions, float fraction) { pthread_t thread; @@ -158,39 +158,42 @@ Editor::run_timestretch (AudioRegionSelection& regions, float fraction) void Editor::do_timestretch (TimeStretchDialog& dialog) { - AudioTrack* at; + Track* t; Playlist* playlist; - AudioRegion* new_region; + Region* new_region; - for (AudioRegionSelection::iterator i = dialog.regions.begin(); i != dialog.regions.end(); ) { + for (RegionSelection::iterator i = dialog.regions.begin(); i != dialog.regions.end(); ) { + AudioRegionView* arv = dynamic_cast<AudioRegionView*>(*i); + if (!arv) + continue; - AudioRegion& aregion ((*i)->region); - TimeAxisView* tv = &(*i)->get_time_axis_view(); - AudioTimeAxisView* atv; - AudioRegionSelection::iterator tmp; + AudioRegion& region (arv->audio_region()); + TimeAxisView* tv = &(arv->get_time_axis_view()); + RouteTimeAxisView* rtv; + RegionSelection::iterator tmp; - cerr << "stretch " << aregion.name() << endl; + cerr << "stretch " << region.name() << endl; tmp = i; ++tmp; - if ((atv = dynamic_cast<AudioTimeAxisView*> (tv)) == 0) { + if ((rtv = dynamic_cast<RouteTimeAxisView*> (tv)) == 0) { i = tmp; continue; } - if ((at = dynamic_cast<AudioTrack*> (&atv->route())) == 0) { + if ((t = dynamic_cast<Track*> (rtv->route().get())) == 0) { i = tmp; continue; } - if ((playlist = at->disk_stream().playlist()) == 0) { + if ((playlist = t->diskstream().playlist()) == 0) { i = tmp; continue; } - dialog.request.region = &aregion; + dialog.request.region = ®ion; if (!dialog.request.running) { /* we were cancelled */ @@ -205,7 +208,7 @@ Editor::do_timestretch (TimeStretchDialog& dialog) } XMLNode &before = playlist->get_state(); - playlist->replace_region (aregion, *new_region, aregion.position()); + playlist->replace_region (region, *new_region, region.position()); XMLNode &after = playlist->get_state(); session->add_command (new MementoCommand<Playlist>(*playlist, before, after)); |