Skip to content

Commit 28d687b

Browse files
authored
Merge pull request #12883 from nanaya/measure-clamp
Limit measured loudness statistics
2 parents ebe2760 + 0b00b85 commit 28d687b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/Models/BeatmapsetArchive.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ private static function getAudioLoudnormFilter(string $srcEscaped, float $start,
185185
$tp = -2;
186186
$offset = \Number::clamp((float) $stats['target_offset'], -99, 99);
187187

188-
$measuredI = (float) $stats['input_i'];
189-
$measuredLra = (float) $stats['input_lra'];
190-
$measuredTp = (float) $stats['input_tp'];
191-
$measuredThresh = (float) $stats['input_thresh'];
188+
$measuredI = \Number::clamp((float) $stats['input_i'], -99, 0);
189+
$measuredLra = \Number::clamp((float) $stats['input_lra'], 1, 50);
190+
$measuredTp = \Number::clamp((float) $stats['input_tp'], -99, 99);
191+
$measuredThresh = \Number::clamp((float) $stats['input_thresh'], -99, 0);
192192

193193
// matches the behavior of the flags
194194
// - auto-lower-loudness-target

0 commit comments

Comments
 (0)