diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-04-08 21:32:44 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-04-08 21:32:44 +0200 |
| commit | 3339d3bce70afe9ae2ca10e9fcfc4b54b748fbf4 (patch) | |
| tree | 9cac355432ba25cc3d43017382d73e0640f50996 /src/lib/audio_decoder.cc | |
| parent | 00762c2d9a4240d016150cd7555aee3dad8542ae (diff) | |
Assorted C++11/formatting cleanups.
Diffstat (limited to 'src/lib/audio_decoder.cc')
| -rw-r--r-- | src/lib/audio_decoder.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index f7f147bd9..77c9b0695 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -18,6 +18,7 @@ */ + #include "audio_decoder.h" #include "audio_buffers.h" #include "audio_content.h" @@ -29,6 +30,7 @@ #include "i18n.h" + using std::cout; using std::map; using std::pair; @@ -37,6 +39,7 @@ 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 +51,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 +101,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 +132,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 +142,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 +157,7 @@ AudioDecoder::position (shared_ptr<const Film> film) const return p; } + void AudioDecoder::seek () { @@ -164,6 +171,7 @@ AudioDecoder::seek () } } + void AudioDecoder::flush () { @@ -181,6 +189,7 @@ AudioDecoder::flush () } } + void AudioDecoder::silence (int milliseconds) { |
