latency: cache profile writes; docs: data2 resolved, latency and fade measurements

This commit is contained in:
Fisto
2026-09-16 12:57:05 +02:00
parent 928218bd9c
commit f9f1c454d5
4 changed files with 60 additions and 15 deletions
+19 -6
View File
@@ -233,13 +233,26 @@ if [ -n "$SPEAKER_GUID" ]; then
exit 1
fi
if ! command -v "$MICROSLOP_WINE" >/dev/null 2>&1; then
echo "wine is required to set the Flextalk profile" >&2
exit 1
# Skip the wine round-trip when this voice's profile was already applied.
# The cache lives inside the prefix, so recreating the prefix invalidates
# it automatically.
PROFILE_CACHE="$WINEPREFIX/.microslopsam-profile$SPEAKER_GUID.reg"
if [ -f "$PROFILE_CACHE" ] && cmp -s "$TMP/profile.reg" "$PROFILE_CACHE"; then
PROFILE_APPLIED=1
else
PROFILE_APPLIED=0
fi
if ! "$MICROSLOP_WINE" reg import "$TMP/profile.reg" >/dev/null 2>&1; then
echo "could not write the Flextalk profile" >&2
exit 1
if [ "$PROFILE_APPLIED" != "1" ]; then
if ! command -v "$MICROSLOP_WINE" >/dev/null 2>&1; then
echo "wine is required to set the Flextalk profile" >&2
exit 1
fi
if ! "$MICROSLOP_WINE" reg import "$TMP/profile.reg" >/dev/null 2>&1; then
echo "could not write the Flextalk profile" >&2
exit 1
fi
cp -f "$TMP/profile.reg" "$PROFILE_CACHE" 2>/dev/null || true
fi
fi