audio.pm: fix loudness error
This commit is contained in:
@@ -33,17 +33,17 @@ sub formatDuration($$$;$) {
|
|||||||
$class = "warn";
|
$class = "warn";
|
||||||
$title = sprintf(
|
$title = sprintf(
|
||||||
qq{file is too long! It should be %d minutes, but is %d},
|
qq{file is too long! It should be %d minutes, but is %d},
|
||||||
($eventDuration+0.5) / 60,
|
($eventDuration+30) / 60,
|
||||||
($audioDuration+0.5) / 60
|
($audioDuration+30) / 60
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $delta < 99.98 ) {
|
if ( $delta < 99.97 ) {
|
||||||
$class = "error";
|
$class = "error";
|
||||||
$title = sprintf(
|
$title = sprintf(
|
||||||
qq{file is too short! should be %d minutes, but is %d},
|
qq{file is too short! should be %d minutes, but is %d},
|
||||||
($eventDuration+0.5) / 60,
|
($eventDuration+30) / 60,
|
||||||
($audioDuration+0.5) / 60
|
($audioDuration+30) / 60
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
no warnings 'redefine';
|
no warnings 'redefine';
|
||||||
|
|
||||||
|
use utf8;
|
||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use URI::Escape();
|
use URI::Escape();
|
||||||
use DateTime();
|
use DateTime();
|
||||||
@@ -1168,7 +1170,7 @@ sub printTableBody {
|
|||||||
$event->{content} .= audio::formatDuration(
|
$event->{content} .= audio::formatDuration(
|
||||||
$event->{duration},
|
$event->{duration},
|
||||||
$event->{event_duration},
|
$event->{event_duration},
|
||||||
sprintf( "%d min", ( $event->{duration} + 0.5 ) / 60 ),
|
sprintf( "%d min", ( $event->{duration} + 30 ) / 60 ),
|
||||||
sprintf( "%d s", $event->{duration} )
|
sprintf( "%d s", $event->{duration} )
|
||||||
)
|
)
|
||||||
. ' '
|
. ' '
|
||||||
|
|||||||
Reference in New Issue
Block a user