diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-21 21:10:10 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-04-25 00:12:02 +0200 |
| commit | dd3862c76cc158fe7cda50cfb4ef11d07a2483e2 (patch) | |
| tree | e75a99e6f821834dca2d70a82922fdef91d8c516 /src/lib/player.cc | |
| parent | 151f5c81fade29e9bebea9904fd85975351b7b78 (diff) | |
Had a go, gave up.
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 0bdf46f4a..96ca80973 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -20,6 +20,7 @@ #include "atmos_decoder.h" +#include "resampler_manager.h" #include "player.h" #include "film.h" #include "audio_buffers.h" @@ -285,6 +286,15 @@ Player::setup_pieces_unlocked () _black = Empty (_film, playlist(), bind(&have_video, _1), _playback_length); _silent = Empty (_film, playlist(), bind(&have_audio, _1), _playback_length); + _resampler_manager = make_shared<ResamplerManager>(_film); + + for (auto i: _pieces) { + if (i->content->audio) { + _resampler_manager->add (i->content->position(), i->content->end(_film), i->content->audio, i->decoder->audio); + i->decoder->audio->set_resampler_manager (_resampler_manager); + } + } + _last_video_time = boost::optional<dcpomatic::DCPTime>(); _last_video_eyes = Eyes::BOTH; _last_audio_time = boost::optional<dcpomatic::DCPTime>(); |
