diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-02-21 05:05:59 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-02-21 05:05:59 +0000 |
commit | 384c8f26b59773a74b2c970179c0f34e8bb2e3fa (patch) | |
tree | f2d61e909da397be1b8ffc4d46bab50074cbe432 /libs/ardour | |
parent | 94ba45c0571e6822268edf0ea3279901d0b93e63 (diff) |
hook up tape region views to peaks ready signal
git-svn-id: svn://localhost/trunk/ardour2@342 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/destructive_filesource.cc | 10 | ||||
-rw-r--r-- | libs/ardour/filesource.cc | 2 | ||||
-rw-r--r-- | libs/ardour/source.cc | 1 |
3 files changed, 5 insertions, 8 deletions
diff --git a/libs/ardour/destructive_filesource.cc b/libs/ardour/destructive_filesource.cc index 9081fc9b38..8604d5d84e 100644 --- a/libs/ardour/destructive_filesource.cc +++ b/libs/ardour/destructive_filesource.cc @@ -264,7 +264,7 @@ DestructiveFileSource::write (Sample* data, jack_nframes_t cnt, char * workbuf) { LockMonitor lm (_lock, __LINE__, __FILE__); - jack_nframes_t oldlen; + jack_nframes_t old_file_pos; if (_capture_start && _capture_end) { _capture_start = false; @@ -321,7 +321,7 @@ DestructiveFileSource::write (Sample* data, jack_nframes_t cnt, char * workbuf) } } - oldlen = _length; + old_file_pos = file_pos; if (file_pos + cnt > _length) { _length = file_pos + cnt; } @@ -336,7 +336,7 @@ DestructiveFileSource::write (Sample* data, jack_nframes_t cnt, char * workbuf) pbr = pending_peak_builds.back(); } - if (pbr && pbr->frame + pbr->cnt == oldlen) { + if (pbr && pbr->frame + pbr->cnt == old_file_pos) { /* the last PBR extended to the start of the current write, so just extend it again. @@ -344,15 +344,13 @@ DestructiveFileSource::write (Sample* data, jack_nframes_t cnt, char * workbuf) pbr->cnt += cnt; } else { - pending_peak_builds.push_back (new PeakBuildRecord (oldlen, cnt)); + pending_peak_builds.push_back (new PeakBuildRecord (old_file_pos, cnt)); } _peaks_built = false; } - } - if (_build_peakfiles) { queue_for_peaks (*this); } diff --git a/libs/ardour/filesource.cc b/libs/ardour/filesource.cc index 3451239d3b..7661f8f3f5 100644 --- a/libs/ardour/filesource.cc +++ b/libs/ardour/filesource.cc @@ -1020,7 +1020,7 @@ FileSource::write (Sample *data, jack_nframes_t cnt, char * workbuf) if (_build_peakfiles) { PeakBuildRecord *pbr = 0; - + if (pending_peak_builds.size()) { pbr = pending_peak_builds.back(); } diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc index ee918375f6..f707dc44e5 100644 --- a/libs/ardour/source.cc +++ b/libs/ardour/source.cc @@ -700,7 +700,6 @@ Source::build_peaks () pending_peak_builds.clear (); } - #ifdef DEBUG_PEAK_BUILD cerr << "build peaks with " << pending_peak_builds.size() << " requests pending\n"; #endif |