Extract check_certificates() method.
[dcpomatic.git] / src / lib / audio_decoder.cc
index f7f147bd92e9b80f58cc46f5bd91c34fb551d6fd..2d02043b5948d1071d0de18982e14abfcf03c12e 100644 (file)
@@ -18,6 +18,7 @@
 
 */
 
+
 #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 std::shared_ptr;
 using std::make_shared;
 using boost::optional;
 using namespace dcpomatic;
 
+
 AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, bool fast)
        : DecoderPart (parent)
        , _content (content)
@@ -48,6 +49,7 @@ AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> cont
        }
 }
 
+
 /** @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)
@@ -97,7 +99,7 @@ AudioDecoder::emit (shared_ptr<const Film> film, AudioStreamPtr stream, shared_p
 
        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) {
@@ -128,6 +130,7 @@ AudioDecoder::emit (shared_ptr<const Film> film, AudioStreamPtr stream, shared_p
        _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
@@ -137,6 +140,7 @@ AudioDecoder::stream_position (shared_ptr<const Film> film, AudioStreamPtr strea
        return ContentTime::from_frames (i->second, _content->resampled_frame_rate(film));
 }
 
+
 boost::optional<ContentTime>
 AudioDecoder::position (shared_ptr<const Film> film) const
 {
@@ -151,6 +155,7 @@ AudioDecoder::position (shared_ptr<const Film> film) const
        return p;
 }
 
+
 void
 AudioDecoder::seek ()
 {
@@ -164,6 +169,7 @@ AudioDecoder::seek ()
        }
 }
 
+
 void
 AudioDecoder::flush ()
 {
@@ -181,6 +187,7 @@ AudioDecoder::flush ()
        }
 }
 
+
 void
 AudioDecoder::silence (int milliseconds)
 {