diff options
author | Carl Hetherington <carl@carlh.net> | 2012-04-11 15:47:33 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-04-11 15:47:33 +0000 |
commit | 3f647a9dcd6129fdbbb78a10859516bb275648af (patch) | |
tree | 53d19059b75b1c724cda011c52f3c1dbfe03c545 /libs/ardour/sndfilesource.cc | |
parent | 9b6c41c13435755ec092a1d2630bdaa156b85081 (diff) |
Simplify slightly odd update_length() signature.
git-svn-id: svn://localhost/ardour2/branches/3.0@11900 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r-- | libs/ardour/sndfilesource.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index 1732a6f1a6..1f499bc61e 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -393,15 +393,13 @@ SndFileSource::nondestructive_write_unlocked (Sample *data, framecnt_t cnt) return 0; } - framecnt_t oldlen; int32_t frame_pos = _length; if (write_float (data, frame_pos, cnt) != cnt) { return 0; } - oldlen = _length; - update_length (oldlen, cnt); + update_length (_length + cnt); if (_build_peakfiles) { compute_and_write_peaks (data, frame_pos, cnt, false, true); @@ -488,7 +486,7 @@ SndFileSource::destructive_write_unlocked (Sample* data, framecnt_t cnt) } } - update_length (file_pos, cnt); + update_length (file_pos + cnt); if (_build_peakfiles) { compute_and_write_peaks (data, file_pos, cnt, false, true); |