#include "audio_buffers.h"
#include "dcpomatic_assert.h"
+#include "dcpomatic_log.h"
#include <cassert>
#include <cstring>
#include <cmath>
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);
}
deallocate ();
allocate (other._channels, other._frames);
+ LOG_GENERAL_NC("copy_from #7");
copy_from (&other, other._frames, 0, 0);
return *this;
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);
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;
}
{
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();
}