summaryrefslogtreecommitdiff
path: root/libs/ardour/session_timefx.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-15 01:34:54 +0000
committerDavid Robillard <d@drobilla.net>2006-06-15 01:34:54 +0000
commitb5db1f624d347c8865c27fdae23bf4595be372d2 (patch)
tree19d57731a87490c8de9773b64ee7ba76d244dc73 /libs/ardour/session_timefx.cc
parenta8f44b1556e68f4cf28bd52e6de7359581a1ec45 (diff)
Merged with trunk revision 600
git-svn-id: svn://localhost/ardour2/branches/midi@601 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_timefx.cc')
-rw-r--r--libs/ardour/session_timefx.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/libs/ardour/session_timefx.cc b/libs/ardour/session_timefx.cc
index 6351aa9825..ee751b9af7 100644
--- a/libs/ardour/session_timefx.cc
+++ b/libs/ardour/session_timefx.cc
@@ -27,7 +27,6 @@
#include <ardour/session.h>
#include <ardour/audioregion.h>
-#include <ardour/filesource.h>
#include <ardour/sndfilesource.h>
#include "i18n.h"
@@ -80,7 +79,10 @@ Session::tempoize_region (TimeStretchRequest& tsr)
}
try {
- sources.push_back(new FileSource (path, frame_rate(), false, Config->get_native_file_data_format()));
+ sources.push_back (new SndFileSource (path,
+ Config->get_native_file_data_format(),
+ Config->get_native_file_header_format(),
+ frame_rate()));
} catch (failed_constructor& err) {
error << string_compose (_("tempoize: error creating new audio file %1 (%2)"), path, strerror (errno)) << endmsg;
goto out;
@@ -150,13 +152,16 @@ Session::tempoize_region (TimeStretchRequest& tsr)
xnow = localtime (&now);
for (it = sources.begin(); it != sources.end(); ++it) {
- dynamic_cast<FileSource*>(*it)->update_header (tsr.region->position(), *xnow, now);
+ AudioFileSource* afs = dynamic_cast<AudioFileSource*>(*it);
+ if (afs) {
+ afs->update_header (tsr.region->position(), *xnow, now);
+ }
}
region_name = tsr.region->name() + X_(".t");
r = new AudioRegion (sources, 0, sources.front()->length(), region_name,
- 0, AudioRegion::Flag (AudioRegion::DefaultFlags | AudioRegion::WholeFile));
+ 0, AudioRegion::Flag (AudioRegion::DefaultFlags | AudioRegion::WholeFile));
out: