summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfilesource.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-31 18:08:16 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-31 18:08:16 +0000
commit1987df571c861e89fa96dd1622bdc9908d0d768d (patch)
tree4b84b575c35d9fec0e67f47b7c0b0d80808313c5 /libs/ardour/sndfilesource.cc
parent8856a12bb89d78461b3d9ae384e9efc1bc64e4d6 (diff)
support for old-school automation loading
git-svn-id: svn://localhost/ardour2/trunk@1039 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r--libs/ardour/sndfilesource.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index 5e6f512e53..cb4334c7cb 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -507,14 +507,10 @@ SndFileSource::set_header_timeline_position ()
nframes_t
SndFileSource::write_float (Sample* data, nframes_t frame_pos, nframes_t cnt)
{
- nframes_t where;
-
- where = sf_seek (sf, frame_pos, SEEK_SET|SFM_WRITE);
-
- if (where != frame_pos) {
+ if (sf_seek (sf, frame_pos, SEEK_SET|SFM_WRITE) < 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
- error << string_compose (_("%1: cannot seek to %2, now at %3 (libsndfile error: %4"), _path, frame_pos, where, errbuf) << endmsg;
+ error << string_compose (_("%1: cannot seek to %2 (libsndfile error: %3"), _path, frame_pos, errbuf) << endmsg;
return 0;
}