X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_merger.cc;h=a422580124ff5ac8b2736e3732b142088ea11e66;hb=refs%2Fheads%2Fdebug%2Fshane;hp=a16c378c67309dac758c90abd27fc275ef7db769;hpb=d8ded66fccb98bd0145afb2f08cf84aad7002a15;p=dcpomatic.git diff --git a/src/lib/audio_merger.cc b/src/lib/audio_merger.cc index a16c378c6..a42258012 100644 --- a/src/lib/audio_merger.cc +++ b/src/lib/audio_merger.cc @@ -23,6 +23,7 @@ #include "audio_merger.h" #include "dcpomatic_time.h" +#include "dcpomatic_log.h" #include using std::pair; @@ -69,6 +70,7 @@ AudioMerger::pull (DCPTime time) shared_ptr audio (new AudioBuffers (i.audio->channels(), frames(DCPTime(time - i.time)))); /* Though time > i.time, audio->frames() could be 0 if the difference in time is less than one frame */ if (audio->frames() > 0) { + LOG_GENERAL("copy_from #1; pulling from %2", to_string(time)); audio->copy_from (i.audio.get(), audio->frames(), 0, 0); out.push_back (make_pair (audio, i.time)); i.audio->trim_start (audio->frames ()); @@ -134,6 +136,7 @@ AudioMerger::push (boost::shared_ptr audio, DCPTime time) /* Get the part of audio that we want to use */ shared_ptr part (new AudioBuffers (audio->channels(), frames(i.to) - frames(i.from))); + LOG_GENERAL_NC("copy_from #2"); part->copy_from (audio.get(), part->frames(), frames(DCPTime(i.from - time)), 0); if (before == _buffers.end() && after == _buffers.end()) {