projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Basic recent files list in the File menu.
[dcpomatic.git]
/
src
/
lib
/
analyse_audio_job.cc
diff --git
a/src/lib/analyse_audio_job.cc
b/src/lib/analyse_audio_job.cc
index df67b37d6144ea48740bd9fe2275de9d3b380072..ab985bdf75468ee557a81f0307d09a919df390e0 100644
(file)
--- a/
src/lib/analyse_audio_job.cc
+++ b/
src/lib/analyse_audio_job.cc
@@
-45,12
+45,7
@@
AnalyseAudioJob::AnalyseAudioJob (shared_ptr<const Film> f, shared_ptr<AudioCont
string
AnalyseAudioJob::name () const
{
string
AnalyseAudioJob::name () const
{
- shared_ptr<AudioContent> content = _content.lock ();
- if (!content) {
- return "";
- }
-
- return String::compose (_("Analyse audio of %1"), content->path());
+ return _("Analyse audio");
}
void
}
void
@@
-74,8
+69,9
@@
AnalyseAudioJob::run ()
_analysis.reset (new AudioAnalysis (_film->audio_channels ()));
_done = 0;
_analysis.reset (new AudioAnalysis (_film->audio_channels ()));
_done = 0;
+ OutputAudioFrame const len = _film->time_to_audio_frames (_film->length ());
while (!player->pass ()) {
while (!player->pass ()) {
- set_progress (double (_
film->audio_frames_to_time (_done)) / _film->length ()
);
+ set_progress (double (_
done) / len
);
}
_analysis->write (content->audio_analysis_path ());
}
_analysis->write (content->audio_analysis_path ());
@@
-91,7
+87,7
@@
AnalyseAudioJob::audio (shared_ptr<const AudioBuffers> b, Time)
for (int j = 0; j < b->channels(); ++j) {
float s = b->data(j)[i];
if (fabsf (s) < 10e-7) {
for (int j = 0; j < b->channels(); ++j) {
float s = b->data(j)[i];
if (fabsf (s) < 10e-7) {
- /*
strings
tream can't serialise and recover inf or -inf, so prevent such
+ /*
SafeStringS
tream can't serialise and recover inf or -inf, so prevent such
values by replacing with this (140dB down) */
s = 10e-7;
}
values by replacing with this (140dB down) */
s = 10e-7;
}