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/audio_decoder.cc | |
| parent | f385ef03e5ea27519a31c0839447735a7fba0602 (diff) | |
Test filling of stuff with black.
Diffstat (limited to 'src/lib/audio_decoder.cc')
| -rw-r--r-- | src/lib/audio_decoder.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index 9b8d15bf1..bbd4ced6c 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -27,6 +27,7 @@ using std::stringstream; using std::list; using std::pair; +using std::cout; using boost::optional; using boost::shared_ptr; @@ -151,7 +152,16 @@ AudioDecoder::audio (shared_ptr<const AudioBuffers> data, Time time) } Audio (dcp_mapped, time); + cout << "bumping n.a. by " << data->frames() << " ie " << film->audio_frames_to_time(data->frames()) << "\n"; _next_audio = time + film->audio_frames_to_time (data->frames()); } - +bool +AudioDecoder::audio_done () const +{ + shared_ptr<const Film> film = _film.lock (); + assert (film); + + return (_audio_content->length() - _next_audio) < film->audio_frames_to_time (1); +} + |
