X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_buffers.cc;h=6183ff26e89dfbf6b8face61c12892d9d9b2ba2c;hb=refs%2Fheads%2Fdebug%2Fshane;hp=825c6c2f3219fa8bd6347d7aeddfc97fc005a29b;hpb=d8ded66fccb98bd0145afb2f08cf84aad7002a15;p=dcpomatic.git diff --git a/src/lib/audio_buffers.cc b/src/lib/audio_buffers.cc index 825c6c2f3..6183ff26e 100644 --- a/src/lib/audio_buffers.cc +++ b/src/lib/audio_buffers.cc @@ -20,6 +20,7 @@ #include "audio_buffers.h" #include "dcpomatic_assert.h" +#include "dcpomatic_log.h" #include #include #include @@ -43,12 +44,14 @@ AudioBuffers::AudioBuffers (int channels, int32_t frames) AudioBuffers::AudioBuffers (AudioBuffers const & other) { allocate (other._channels, other._frames); + LOG_GENERAL_NC("copy_from #5"); copy_from (&other, other._frames, 0, 0); } AudioBuffers::AudioBuffers (boost::shared_ptr other) { allocate (other->_channels, other->_frames); + LOG_GENERAL_NC("copy_from #6"); copy_from (other.get(), other->_frames, 0, 0); } @@ -61,6 +64,7 @@ AudioBuffers::operator= (AudioBuffers const & other) deallocate (); allocate (other._channels, other._frames); + LOG_GENERAL_NC("copy_from #7"); copy_from (&other, other._frames, 0, 0); return *this; @@ -186,6 +190,8 @@ AudioBuffers::copy_from (AudioBuffers const * from, int32_t frames_to_copy, int3 return; } + LOG_GENERAL("AudioBuffers::copy_from %1 %2 %3 %4", from->_allocated_frames, frames_to_copy, read_offset, write_offset); + DCPOMATIC_ASSERT (from->channels() == channels()); DCPOMATIC_ASSERT (from); @@ -340,6 +346,7 @@ shared_ptr AudioBuffers::clone () const { shared_ptr b (new AudioBuffers (channels (), frames ())); + LOG_GENERAL_NC("copy_from #3"); b->copy_from (this, frames (), 0, 0); return b; } @@ -350,6 +357,7 @@ AudioBuffers::append (shared_ptr other) { DCPOMATIC_ASSERT (channels() == other->channels()); ensure_size (_frames + other->frames()); + LOG_GENERAL_NC("copy_from #4"); copy_from (other.get(), other->frames(), 0, _frames); _frames += other->frames(); }