diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-10-09 15:50:44 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-10-09 15:50:44 +0000 |
commit | 0d0f71ee92fb7ce53fbcb8c7b0cd93b1cdf3529f (patch) | |
tree | ae37075200040cbbd430b98ee3cbce59eaef51ca /libs/ardour/sndfilesource.cc | |
parent | 8011cbf5f8e4181ac39e4140e681fcad531f4a7c (diff) |
fix abort-capture path, including many subtle issues with shared_ptr<>; remove old automation feedback code; make new automation feedback code slightly configurable ; fix zoom focus options for playhead + edit cursor ; prevent zoom < 2 samples per pixel to avoid crashes ; peak building now uses shared_ptr<Source> not Source*
git-svn-id: svn://localhost/ardour2/trunk@959 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r-- | libs/ardour/sndfilesource.cc | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index 340dd1fb08..c30b1af2a4 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -43,14 +43,6 @@ SndFileSource::SndFileSource (Session& s, const XMLNode& node) if (open()) { throw failed_constructor (); } - - if (_build_peakfiles) { - if (initialize_peakfile (false, _path)) { - sf_close (sf); - sf = 0; - throw failed_constructor (); - } - } } SndFileSource::SndFileSource (Session& s, string idstr, Flag flags) @@ -62,14 +54,6 @@ SndFileSource::SndFileSource (Session& s, string idstr, Flag flags) if (open()) { throw failed_constructor (); } - - if (!(_flags & NoPeakFile) && _build_peakfiles) { - if (initialize_peakfile (false, _path)) { - sf_close (sf); - sf = 0; - throw failed_constructor (); - } - } } SndFileSource::SndFileSource (Session& s, string idstr, SampleFormat sfmt, HeaderFormat hf, nframes_t rate, Flag flags) @@ -79,6 +63,12 @@ SndFileSource::SndFileSource (Session& s, string idstr, SampleFormat sfmt, Heade init (idstr); + /* this constructor is used to construct new files, not open + existing ones. + */ + + file_is_new = true; + switch (hf) { case CAF: fmt = SF_FORMAT_CAF; @@ -171,14 +161,6 @@ SndFileSource::SndFileSource (Session& s, string idstr, SampleFormat sfmt, Heade } } - - if (!(_flags & NoPeakFile) && _build_peakfiles) { - if (initialize_peakfile (true, _path)) { - sf_close (sf); - sf = 0; - throw failed_constructor (); - } - } } void @@ -413,7 +395,7 @@ SndFileSource::write_unlocked (Sample *data, nframes_t cnt) if (_build_peakfiles) { - queue_for_peaks (this); + queue_for_peaks (shared_from_this ()); } _write_data_count = cnt; |