This commit is contained in:
devdatt 2025-12-09 19:06:17 +05:30
parent d8c4690b4a
commit b3fdb8fd45
1 changed files with 6 additions and 4 deletions

View File

@ -23,7 +23,7 @@ function adelayFromMs($ms, $channels = 2)
$parts = array_fill(0, $channels, (string)$ms); $parts = array_fill(0, $channels, (string)$ms);
$pattern = implode('|', $parts); $pattern = implode('|', $parts);
return ' -af "adelay=' . $pattern . '" '; return 'adelay=' . $pattern;
} }
@ -161,7 +161,9 @@ function update_service($which_service)
. ' -ar ' . $common_backend_audio_sample_rate . ' -ar ' . $common_backend_audio_sample_rate
. ' ' . $common_backend_extra; . ' ' . $common_backend_extra;
if ($hdmi_delay_audio != "") if ($hdmi_delay_audio != "")
$input .= adelayFromMs($hdmi_delay_audio, 2); $input .= ' -af "volume=' . $common_backend_audio_db_gain . ',' . adelayFromMs($hdmi_delay_audio, 2) . '"';
else
$input .= ' -af "volume=' . $common_backend_audio_db_gain . '"';
$input .= " -f mpegts " $input .= " -f mpegts "
. ' "udp://@239.255.254.254:39000?fifo_size=5000000&overrun_nonfatal=1&localaddr=127.0.0.1&ttl=1"'; . ' "udp://@239.255.254.254:39000?fifo_size=5000000&overrun_nonfatal=1&localaddr=127.0.0.1&ttl=1"';
break; break;