*/
+
#include "audio_decoder.h"
#include "audio_buffers.h"
#include "audio_content.h"
#include "i18n.h"
+
using std::cout;
using std::map;
using std::pair;
using boost::optional;
using namespace dcpomatic;
+
AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, bool fast)
: DecoderPart (parent)
, _content (content)
}
}
+
/** @param time_already_delayed true if the delay should not be added to time */
void
AudioDecoder::emit (shared_ptr<const Film> film, AudioStreamPtr stream, shared_ptr<const AudioBuffers> data, ContentTime time, bool time_already_delayed)
shared_ptr<Resampler> resampler;
auto i = _resamplers.find(stream);
- if (i != _resamplers.end ()) {
+ if (i != _resamplers.end()) {
resampler = i->second;
} else {
if (stream->frame_rate() != resampled_rate) {
_positions[stream] += data->frames();
}
+
/** @return Time just after the last thing that was emitted from a given stream */
ContentTime
AudioDecoder::stream_position (shared_ptr<const Film> film, AudioStreamPtr stream) const
return ContentTime::from_frames (i->second, _content->resampled_frame_rate(film));
}
+
boost::optional<ContentTime>
AudioDecoder::position (shared_ptr<const Film> film) const
{
return p;
}
+
void
AudioDecoder::seek ()
{
}
}
+
void
AudioDecoder::flush ()
{
}
}
+
void
AudioDecoder::silence (int milliseconds)
{