diff options
Diffstat (limited to 'libs/ardour/audiosource.cc')
-rw-r--r-- | libs/ardour/audiosource.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 25e1d2222d..de6c5edfec 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -252,8 +252,14 @@ AudioSource::initialize_peakfile (bool newfile, string audio_path) int err = stat (audio_path.c_str(), &stat_file); if (err) { - _peaks_built = false; - _peak_byte_max = 0; + + /* no audio path - nested source or we can't + read it or ... whatever, use the peakfile as-is. + */ + + _peaks_built = true; + _peak_byte_max = statbuf.st_size; + } else { /* allow 6 seconds slop on checking peak vs. file times because of various @@ -996,6 +1002,8 @@ AudioSource::ensure_buffers_for_level_locked (uint32_t level, framecnt_t frame_r _mixdown_buffers.clear (); _gain_buffers.clear (); + cerr << "Allocating nested buffers for level " << level << endl; + while (_mixdown_buffers.size() < level) { _mixdown_buffers.push_back (boost::shared_ptr<Sample> (new Sample[nframes])); _gain_buffers.push_back (boost::shared_ptr<gain_t> (new gain_t[nframes])); |