- _analysis.reset (new AudioAnalysis (_film->audio_channels()));
-
- while (!player->pass()) {
- set_progress (float (_done) / _film->audio_length ());
+ _analysis.reset (new AudioAnalysis (_film->audio_channels ()));
+
+ _done = 0;
+ DCPTime const block = DCPTime::from_seconds (1.0 / 8);
+ for (DCPTime t; t < _film->length(); t += block) {
+ analyse (player->get_audio (t, block, false));
+ set_progress (t.seconds() / _film->length().seconds());