diff options
author | Todd Naugle <toddn@glw.com> | 2011-06-16 19:39:23 +0000 |
---|---|---|
committer | Todd Naugle <toddn@glw.com> | 2011-06-16 19:39:23 +0000 |
commit | 7262fb1a7a17d337615ee5c3ed1b3af3cebc3287 (patch) | |
tree | 432f9c53c4ab5b2ff5d1d28b364fcdba51b1cc35 | |
parent | d27b8db786e1f23299bdaacc8cbfabe859094b3e (diff) |
When importing sources that are using sample rate conversion, the BWF start time has to be converted also
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@9745 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/ardour/resampled_source.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ardour/ardour/resampled_source.h b/libs/ardour/ardour/resampled_source.h index 513fddbb75..cb3805667b 100644 --- a/libs/ardour/ardour/resampled_source.h +++ b/libs/ardour/ardour/resampled_source.h @@ -40,7 +40,9 @@ class ResampledImportableSource : public ImportableSource nframes_t length() const { return source->length(); } nframes_t samplerate() const { return source->samplerate(); } void seek (nframes_t pos) { source->seek (pos); } - nframes_t natural_position() const { return source->natural_position(); } + + /*Convert start time so that imported file still lands at the correct timecode*/ + nframes_t natural_position() const { return (source->natural_position() * ratio()); } static const uint32_t blocksize; |