X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fanalyse_audio_job.cc;h=8186f9de49b9d89baa81c04d7f454f876b8de963;hb=491daf8790f35611052d8954d5d74df275dcda18;hp=9a911669095bdfba9cbb3f31262c7d01f733b6cf;hpb=e5da5518951e91f7bfb80718c9cf546e3ece059c;p=dcpomatic.git diff --git a/src/lib/analyse_audio_job.cc b/src/lib/analyse_audio_job.cc index 9a9116690..8186f9de4 100644 --- a/src/lib/analyse_audio_job.cc +++ b/src/lib/analyse_audio_job.cc @@ -45,12 +45,7 @@ AnalyseAudioJob::AnalyseAudioJob (shared_ptr f, shared_ptr content = _content.lock (); - if (!content) { - return ""; - } - - return String::compose (_("Analyse audio of %1"), content->file().filename()); + return _("Analyse audio"); } void @@ -68,14 +63,15 @@ AnalyseAudioJob::run () player->Audio.connect (bind (&AnalyseAudioJob::audio, this, _1, _2)); - _samples_per_point = max (int64_t (1), _film->time_to_audio_frames (_film->length_without_loop()) / _num_points); + _samples_per_point = max (int64_t (1), _film->time_to_audio_frames (_film->length()) / _num_points); - _current.resize (_film->dcp_audio_channels ()); - _analysis.reset (new AudioAnalysis (_film->dcp_audio_channels ())); + _current.resize (_film->audio_channels ()); + _analysis.reset (new AudioAnalysis (_film->audio_channels ())); _done = 0; + OutputAudioFrame const len = _film->time_to_audio_frames (_film->length ()); while (!player->pass ()) { - set_progress (double (_film->audio_frames_to_time (_done)) / _film->length_without_loop ()); + set_progress (double (_done) / len); } _analysis->write (content->audio_analysis_path ());