diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-31 17:21:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-31 17:21:35 +0100 |
| commit | f45cbb73068321d857249aaa21f770b87493c7c2 (patch) | |
| tree | 9e98c39274a47c0906a79dbb18f067fc9963fb62 /src/lib/silence_decoder.cc | |
| parent | f385ef03e5ea27519a31c0839447735a7fba0602 (diff) | |
Test filling of stuff with black.
Diffstat (limited to 'src/lib/silence_decoder.cc')
| -rw-r--r-- | src/lib/silence_decoder.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/silence_decoder.cc b/src/lib/silence_decoder.cc index 6cf91b41f..c8aa5c632 100644 --- a/src/lib/silence_decoder.cc +++ b/src/lib/silence_decoder.cc @@ -22,6 +22,7 @@ #include "audio_buffers.h" using std::min; +using std::cout; using boost::shared_ptr; SilenceDecoder::SilenceDecoder (shared_ptr<const Film> f, shared_ptr<NullContent> c) @@ -36,8 +37,9 @@ SilenceDecoder::pass () { shared_ptr<const Film> film = _film.lock (); assert (film); - + Time const this_time = min (_audio_content->length() - _next_audio, TIME_HZ / 2); + cout << "silence emit " << this_time << " from " << _audio_content->length() << "\n"; shared_ptr<AudioBuffers> data (new AudioBuffers (film->dcp_audio_channels(), film->time_to_audio_frames (this_time))); data->make_silent (); audio (data, _next_audio); @@ -76,3 +78,10 @@ SilenceDecoder::next () const { return _next_audio; } + +bool +SilenceDecoder::done () const +{ + return audio_done (); +} + |
