From 104cbb42500483c8a20f6364eb1d9e881ff2cea8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 28 Aug 2021 10:36:15 +0200 Subject: [PATCH] Improved some debug lines MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- contrib/audio.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/audio.php b/contrib/audio.php index 40508f14..7118af6a 100644 --- a/contrib/audio.php +++ b/contrib/audio.php @@ -35,17 +35,17 @@ function analyzeForNoiseOnly ($data) { if (!$GLOBALS['options']['keep_noise'] && !$GLOBALS['options']['ignore_noise'] && count($GLOBALS['analysis']['breakdown']) == 2 && isset($GLOBALS['analysis']['breakdown'][127]) && isset($GLOBALS['analysis']['breakdown'][128])) { if ($GLOBALS['options']['analyze_input']) { - //echo 'NOISE1!' . PHP_EOL; + //* NOISY: */ echo 'NOISE1!' . PHP_EOL; } return NULL; } elseif (!$GLOBALS['options']['keep_noise'] && !$GLOBALS['options']['ignore_noise'] && count($GLOBALS['analysis']['breakdown']) == 1 && isset($GLOBALS['analysis']['breakdown'][127])) { if ($GLOBALS['options']['analyze_input']) { - //echo 'NOISE2!' . PHP_EOL; + //* NOISY: */ echo 'NOISE2!' . PHP_EOL; } return NULL; } elseif (!$GLOBALS['options']['keep_noise'] && $GLOBALS['options']['ignore_noise'] && count($GLOBALS['analysis']['breakdown']) < 2) { if ($GLOBALS['options']['analyze_input']) { - //echo 'NOISE3!' . PHP_EOL; + //* NOISY: */ echo 'NOISE3!' . PHP_EOL; } return NULL; } @@ -64,7 +64,7 @@ while (TRUE) { $data = trim(fread($pcm, $GLOBALS['options']['buffer_size'])); if ((empty($data)) || ($data == $empty)) { if ($GLOBALS['options']['analyze_input']) { - //echo 'EMPTY!' . PHP_EOL; + //* NOISY: */ echo 'EMPTY!' . PHP_EOL; } continue; } @@ -76,7 +76,7 @@ while (TRUE) { if (empty($data)) { // Skip this continue; - } // END - if + } $GLOBALS['analysis']['average'] = floor($GLOBALS['analysis']['average'] / strlen($data)); @@ -103,7 +103,7 @@ while (TRUE) { if (empty($out)) { // Skip this continue; - } // END - if + } echo $out; } else { -- 2.39.5