summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfilesource.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-12-23 04:37:36 +0000
committerRobin Gareus <robin@gareus.org>2012-12-23 04:37:36 +0000
commit076542f3177f2d1def04785fd52f5a5084ef0e27 (patch)
tree65d07c04bb7619f3991fc966b84f204b7eb281c0 /libs/ardour/sndfilesource.cc
parent76d85fb411127ead58155085b9b7d4c08d895113 (diff)
fix "import at file position" when copying or channel-splitting files on import.
git-svn-id: svn://localhost/ardour2/branches/3.0@13711 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r--libs/ardour/sndfilesource.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index ca2544054c..3dfec0bab6 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -221,6 +221,13 @@ SndFileSource::open ()
bool bwf_info_exists = _broadcast_info->load_from_file (sf);
+ if (_file_is_new && _length == 0 && writable() && !bwf_info_exists) {
+ /* newly created files will not have a BWF header at this point in time.
+ * Import will have called Source::set_timeline_position() if one exists
+ * in the original. */
+ header_position_offset = _timeline_position;
+ }
+
/* Set our timeline position to either the time reference from a BWF header or the current
start of the session.
*/