diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-09-06 01:05:01 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-09-07 20:04:46 +0200 |
| commit | 2eb55062247296a06d4324018cda46b6a578e33e (patch) | |
| tree | d8b6896481599684fb35088ad682672ff258ecd5 | |
| parent | 0eadbd860d04cc2322d18046f69e7a9b2cb437f4 (diff) | |
Respect audio delay option in the player (#3083).
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 344b47711..32c6c980b 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -38,6 +38,7 @@ #include "wx/wx_signal_manager.h" #include "wx/wx_util.h" #include "wx/wx_variant.h" +#include "lib/audio_content.h" #include "lib/config.h" #include "lib/constants.h" #include "lib/cross.h" @@ -529,6 +530,8 @@ public: } } + set_audio_delay_from_config(); + auto old = _cpl_menu->GetMenuItems(); for (auto const& i: old) { _cpl_menu->Remove (i); @@ -577,6 +580,19 @@ public: _controls->set_film (_film); } + void set_audio_delay_from_config() + { + if (!_film) { + return; + } + + for (auto i: _film->content()) { + if (i->audio) { + i->audio->set_delay(Config::instance()->player_audio_delay()); + } + } + } + void load_stress_script (boost::filesystem::path path) { _stress.load_script (path); @@ -1190,6 +1206,8 @@ private: dcpomatic_log = make_shared<NullLog>(); } } + + set_audio_delay_from_config(); } void set_menu_sensitivity () |
