diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-01-17 22:34:58 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-01-17 22:34:58 +0000 |
| commit | ffb3cf8bfe397c87d0e797eb8732aa6b1f6c5091 (patch) | |
| tree | f291cc5394963a8064db6b4e270512f641d42a19 /src/lib/audio_buffers.cc | |
| parent | d8ded66fccb98bd0145afb2f08cf84aad7002a15 (diff) | |
Debug.debug/shane
Diffstat (limited to 'src/lib/audio_buffers.cc')
| -rw-r--r-- | src/lib/audio_buffers.cc | 8 |
1 files changed, 8 insertions, 0 deletions
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 <cassert> #include <cstring> #include <cmath> @@ -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<const AudioBuffers> 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> AudioBuffers::clone () const { shared_ptr<AudioBuffers> 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<const AudioBuffers> 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(); } |
