diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-14 14:24:14 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-14 14:24:14 +0000 |
commit | 29f6f0cf05893371a64fb14f8868a3e0e4effd39 (patch) | |
tree | 959fb35622fc07932fdc6711ee7e1da64ffcd10f /libs/ardour/sndfilesource.cc | |
parent | 0641df0ccd0c993d05a75793af9de571d3ce4725 (diff) |
no more peak building thread; don't print config var stores, but it possible to do it again without another complete recompile
git-svn-id: svn://localhost/ardour2/trunk@1588 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r-- | libs/ardour/sndfilesource.cc | 50 |
1 files changed, 3 insertions, 47 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index b47e0acb42..2f4c575883 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -396,28 +396,7 @@ SndFileSource::nondestructive_write_unlocked (Sample *data, nframes_t cnt) update_length (oldlen, cnt); if (_build_peakfiles) { - PeakBuildRecord *pbr = 0; - - if (pending_peak_builds.size()) { - pbr = pending_peak_builds.back(); - } - - if (pbr && pbr->frame + pbr->cnt == oldlen) { - - /* the last PBR extended to the start of the current write, - so just extend it again. - */ - pbr->cnt += cnt; - } else { - pending_peak_builds.push_back (new PeakBuildRecord (oldlen, cnt)); - } - - _peaks_built = false; - } - - - if (_build_peakfiles) { - queue_for_peaks (shared_from_this (), false); + compute_and_write_peaks (data, frame_pos, cnt, false); } _write_data_count = cnt; @@ -507,32 +486,12 @@ SndFileSource::destructive_write_unlocked (Sample* data, nframes_t cnt) old_file_pos = file_pos; update_length (file_pos, cnt); - file_pos += cnt; if (_build_peakfiles) { - PeakBuildRecord *pbr = 0; - - if (pending_peak_builds.size()) { - pbr = pending_peak_builds.back(); - } - - 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. - */ - - pbr->cnt += cnt; - } else { - pending_peak_builds.push_back (new PeakBuildRecord (old_file_pos, cnt)); - } - - _peaks_built = false; + compute_and_write_peaks (data, file_pos, cnt, false); } - if (_build_peakfiles) { - queue_for_peaks (shared_from_this (), true); - } + file_pos += cnt; return cnt; } @@ -627,9 +586,6 @@ SndFileSource::set_header_timeline_position () delete _broadcast_info; _broadcast_info = 0; } - - - } nframes_t |