latency: cache profile writes; docs: data2 resolved, latency and fade measurements
This commit is contained in:
+19
-6
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user