Fix: service startup-volume re-punching on every restart + misleading suspend log
Ed reported the service pulling his volume to 20% repeatedly. Diagnosis from the service logs: NOT a runaway timer - one service process ran untouched for 36 hours, proving there's no periodic restart. The volume-to-20 punches came from GENUINE service restarts (deploys, the one self-update, profile saves, handovers during active use), each re-applying because the mode was "every service restart". Two real faults found and fixed: 1. Re-apply burst guard. "Every service restart" (and boot-only as belt-and-braces) now skips a re-apply within ReapplyCooldown (5 min) of the last successful apply, persisted as startup-volume-last.txt. This kills the double-apply we saw in the log at 08:20:48 then 08:21:02 (a self-update restart immediately followed by a follow-on start, 14s apart, both punching the volume), and any rapid churn from self-update / profile-save / deploy. ShouldApply gains lastApplied+now params; future-dated stamp (clock moved back) can't wedge it. 2. Misleading log. ServiceSendHost.Suspend() hard-coded "interactive app present" on EVERY suspend, including plain shutdown - which sent this very investigation chasing phantom app-handovers. Suspend now takes a reason; the run-loop-ending path says so, only a real app yield says "interactive app present". readme: recommend "first start after boot" as the set-and-forget mode and explain that "every restart" also fires on routine internal restarts (and is now burst- guarded). Self-test extended: cooldown skip in both modes, 14s double-apply guard, future-stamp safety. Gate 71/71 + 7 relay tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1417,7 +1417,7 @@ RemSound.exe --connect 192.168.1.42
|
||||
<h3>Setting it up</h3>
|
||||
<p>Everything lives in the <strong>Service</strong> menu on the menu bar:</p>
|
||||
<ol>
|
||||
<li><strong>Configure service profile…</strong> — opens a small window with two tabs (Connectivity and Audio send) where you choose who to send to (plus a password) and what to send. On the Audio send tab, the first output choice is <strong>Use Windows default audio device, follows Windows changes</strong> — tick that to send whatever this machine is currently playing and keep following the Windows default if it later changes, rather than pinning one named card. (You can still pick specific devices, or a specific application, exactly as in the normal app.) There is no “send my audio” switch because the service always sends, and there is no audio-quality tab to fiddle with: the service always uses the settings that work best for live streaming (the Opus live-latency codec, small packets, locked to the audio clock), so it just sounds right. This is a separate profile from your normal ones and does not appear in the usual profile list. The <strong>Additional options</strong> button holds two extras. First, a switch for the service's own log. Second, <strong>Set the machine's volume when the service starts</strong>: tick it, pick a volume percent, and the service unmutes the machine and sets its Windows volume to that level when it starts — handy for an unattended PC that booted muted or was left turned down, so it's audible again with nobody at the keyboard. The <strong>When</strong> list chooses between <em>Only the first start after each boot</em> (the default — a mid-day service restart then leaves the volume alone while someone's using the machine) and <em>Every time the service starts</em>. Changes take effect from the service's next start, no reinstall needed. (The service itself never plays sounds — it streams silently in the background — so there are no cue options here.)</li>
|
||||
<li><strong>Configure service profile…</strong> — opens a small window with two tabs (Connectivity and Audio send) where you choose who to send to (plus a password) and what to send. On the Audio send tab, the first output choice is <strong>Use Windows default audio device, follows Windows changes</strong> — tick that to send whatever this machine is currently playing and keep following the Windows default if it later changes, rather than pinning one named card. (You can still pick specific devices, or a specific application, exactly as in the normal app.) There is no “send my audio” switch because the service always sends, and there is no audio-quality tab to fiddle with: the service always uses the settings that work best for live streaming (the Opus live-latency codec, small packets, locked to the audio clock), so it just sounds right. This is a separate profile from your normal ones and does not appear in the usual profile list. The <strong>Additional options</strong> button holds two extras. First, a switch for the service's own log. Second, <strong>Set the machine's volume when the service starts</strong>: tick it, pick a volume percent, and the service unmutes the machine and sets its Windows volume to that level when it starts — handy for an unattended PC that booted muted or was left turned down, so it's audible again with nobody at the keyboard. The <strong>When</strong> list chooses between <em>Only the first start after each boot</em> and <em>Every time the service starts</em>. <strong>First start after boot is the recommended, set-and-forget choice</strong>: it sets the volume once when the machine boots and never touches it again, so it won't fight you while you're using the machine. <em>Every time the service starts</em> re-applies on every service start — useful if you deliberately restart the service to reset the volume, but be aware the service also restarts by itself for routine reasons (installing a RemSound update, saving the service profile), and this mode re-applies on those too. To stop it ever machine-gunning your volume, either mode skips a re-apply if the volume was already set within the last few minutes. Changes take effect from the service's next start, no reinstall needed. (The service itself never plays sounds — it streams silently in the background — so there are no cue options here.)</li>
|
||||
<li><strong>Install service</strong> — registers it with Windows so it starts automatically at every boot. Windows asks for administrator permission (one prompt). Do this once. Straight after installing, RemSound asks whether you'd like to <strong>start it now</strong> (otherwise it waits until the next reboot). (When you first install RemSound on a PC, the app installer also offers to set the service up — and start it — for you, so you may have done this already.)</li>
|
||||
<li><strong>Start service</strong> / <strong>Stop service</strong> — run or halt it now without waiting for a reboot.</li>
|
||||
<li><strong>Uninstall service</strong> — removes it entirely.</li>
|
||||
|
||||
Reference in New Issue
Block a user