summaryrefslogtreecommitdiff
path: root/libs/ardour/resampled_source.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-09-16 16:11:26 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-09-16 16:11:26 +0000
commit8e00b86ebb0b6e3fd489b4cac58863d7c16465db (patch)
tree27e602cbd16a9c948728b578df112b78f0d62c12 /libs/ardour/resampled_source.cc
parent084dda86a7c4391aba4e9f37f752af4846ded15d (diff)
make resampled sources (during import) report their "natural position" (i.e. BWF timecode) using the samplerate of the session, not the original source, for correct positioning; minor frame{pos,cnt}_t cleanup
git-svn-id: svn://localhost/ardour2/branches/3.0@7785 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/resampled_source.cc')
-rw-r--r--libs/ardour/resampled_source.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/resampled_source.cc b/libs/ardour/resampled_source.cc
index 675a0e426d..7379aa74af 100644
--- a/libs/ardour/resampled_source.cc
+++ b/libs/ardour/resampled_source.cc
@@ -134,3 +134,8 @@ ResampledImportableSource::seek (nframes_t pos)
src_data.end_of_input = 0;
}
+framepos_t
+ResampledImportableSource::natural_position () const
+{
+ return source->natural_position() * ratio ();
+}