From: Roland Häder Date: Sat, 28 Aug 2021 08:36:15 +0000 (+0200) Subject: Improved some debug lines X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=104cbb42500483c8a20f6364eb1d9e881ff2cea8;p=core.git Improved some debug lines Signed-off-by: Roland Häder --- 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 {