diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/player.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index f5a9d7b17..569806d83 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -767,6 +767,12 @@ Player::audio_transform (shared_ptr<AudioContent> content, AudioStreamPtr stream content_audio.audio = _audio_processor->run (content_audio.audio, _film->audio_channels ()); } + /* Pad any gap which may be caused by audio delay */ + + if (_last_audio_time) { + fill_audio (DCPTimePeriod (*_last_audio_time, time)); + } + /* Push */ _audio_merger.push (content_audio.audio, time); @@ -803,11 +809,6 @@ Player::audio (weak_ptr<Piece> wp, AudioStreamPtr stream, ContentAudio content_a /* And the end of this block in the DCP */ DCPTime end = time + DCPTime::from_frames(content_audio.audio->frames(), content->resampled_frame_rate()); - /* Pad any gap which may be caused by audio delay */ - if (_last_audio_time) { - fill_audio (DCPTimePeriod (*_last_audio_time, time)); - } - /* Remove anything that comes before the start or after the end of the content */ if (time < piece->content->position()) { pair<shared_ptr<AudioBuffers>, DCPTime> cut = discard_audio (content_audio.audio, time, piece->content->position()); |
