Wait for the first streamed word before playing

This commit is contained in:
Fisto
2026-09-21 12:43:44 +02:00
parent baaaba3dcd
commit 7701664bc6
4 changed files with 34 additions and 5 deletions
+3
View File
@@ -602,6 +602,9 @@ if [ "$STREAM_WORDS" = "1" ]; then
fi
cat "$TMP/sw$INDEX.raw" >> "$OUT" 2>/dev/null || { echo "stream write failed" >&2; exit 1; }
# The player waits for this marker so it does not start on the bare header.
if [ "$INDEX" = "1" ]; then : > "$OUT.ready"; fi
if [ "$GAP" -gt 0 ] && [ "$INDEX" -lt "$WORD_COUNT" ]; then
if "$MICROSLOP_FFMPEG" -hide_banner -loglevel error -y -f lavfi -i "anullsrc=r=48000:cl=mono" \
-t "$(awk -v g="$GAP" 'BEGIN{printf "%.3f", g/1000}')" \