#include "util.h"
#include "film.h"
#include "log.h"
+#include "audio_content.h"
+#include "compose.hpp"
#include <iostream>
#include "i18n.h"
{
shared_ptr<ContentAudio> dec;
- _content->film()->log()->log (String::compose ("ADS has request for %1 %2", frame, length), Log::TYPE_DEBUG_DECODE);
+ _content->film()->log()->log (String::compose ("-> ADS has request for %1 %2", frame, length), Log::TYPE_DEBUG_DECODE);
Frame const end = frame + length - 1;
if (_seek_reference) {
/* We've had an accurate seek and now we're seeing some data */
ContentTime const delta = time - _seek_reference.get ();
- Frame const delta_frames = delta.frames (frame_rate);
+ Frame const delta_frames = delta.frames_round (frame_rate);
if (delta_frames > 0) {
/* This data comes after the seek time. Pad the data with some silence. */
shared_ptr<AudioBuffers> padded (new AudioBuffers (data->channels(), data->frames() + delta_frames));
}
if (!_position) {
- _position = time.frames (frame_rate);
+ _position = time.frames_round (frame_rate);
}
DCPOMATIC_ASSERT (_position.get() >= (_decoded.frame + _decoded.audio->frames()));