mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 21:55:43 +01:00
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
This commit is contained in:
parent
b0b7234458
commit
79986643c0
372 changed files with 20759 additions and 10250 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue