Hand-apply e30fd8d; resurrect JSON server code.
[dcpomatic.git] / src / lib / analyse_audio_job.cc
index 347cc0a0fb362f95b55686ad3fb76744e746ff8f..079fe884e762f76980f1b08799f659363ed9ef8b 100644 (file)
@@ -49,6 +49,12 @@ AnalyseAudioJob::name () const
        return _("Analyse audio");
 }
 
+string
+AnalyseAudioJob::json_name () const
+{
+       return N_("analyse_audio");
+}
+
 void
 AnalyseAudioJob::run ()
 {
@@ -60,6 +66,7 @@ AnalyseAudioJob::run ()
        shared_ptr<Playlist> playlist (new Playlist);
        playlist->add (content);
        shared_ptr<Player> player (new Player (_film, playlist));
+       player->set_ignore_video ();
        
        int64_t const len = _film->length().frames (_film->audio_frame_rate());
        _samples_per_point = max (int64_t (1), len / _num_points);
@@ -87,7 +94,7 @@ AnalyseAudioJob::analyse (shared_ptr<const AudioBuffers> b)
                for (int j = 0; j < b->channels(); ++j) {
                        float s = b->data(j)[i];
                        if (fabsf (s) < 10e-7) {
-                               /* stringstream can't serialise and recover inf or -inf, so prevent such
+                               /* SafeStringStream can't serialise and recover inf or -inf, so prevent such
                                   values by replacing with this (140dB down) */
                                s = 10e-7;
                        }