diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-07-01 23:37:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-07-01 23:37:55 +0100 |
| commit | 4bf5a8794cf1ed6411e085b35c11777c3508f82e (patch) | |
| tree | 2e0390a371a9fe828307b6d11313726299f232e3 /src/lib/analyse_audio_job.cc | |
| parent | 92b6430402753a572c33d594ba0745a4e461edf4 (diff) | |
Restore short-cutting of analysis gain updates.
If we have an analysis of one piece of content and
the gain changes we don't re-run the analysis, instead
applying a suitable `correction' in the UI.
Diffstat (limited to 'src/lib/analyse_audio_job.cc')
| -rw-r--r-- | src/lib/analyse_audio_job.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/analyse_audio_job.cc b/src/lib/analyse_audio_job.cc index 1cec15c2a..2f48d12a9 100644 --- a/src/lib/analyse_audio_job.cc +++ b/src/lib/analyse_audio_job.cc @@ -89,6 +89,16 @@ AnalyseAudioJob::run () } _analysis->set_peak (_overall_peak, DCPTime::from_frames (_overall_peak_frame, _film->audio_frame_rate ())); + + if (_playlist->content().size() == 1) { + /* If there was only one piece of content in this analysis we may later need to know what its + gain was when we analysed it. + */ + shared_ptr<const AudioContent> ac = dynamic_pointer_cast<const AudioContent> (_playlist->content().front ()); + DCPOMATIC_ASSERT (ac); + _analysis->set_analysis_gain (ac->audio_gain ()); + } + _analysis->write (_film->audio_analysis_path (_playlist)); set_progress (1); |
