hook up tape region views to peaks ready signal

git-svn-id: svn://localhost/trunk/ardour2@342 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2006-02-21 05:05:59 +00:00
parent 94ba45c057
commit 384c8f26b5
6 changed files with 65 additions and 10 deletions

View file

@ -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);
}

View file

@ -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();
}

View file

@ -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