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);
/* 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());