Add priority mode + always-on network packet priority
Priority mode (per-profile toggle, Audio profile tab, Alt+U): - Bundled PROCESS_POWER_THROTTLING_STATE with EXECUTION_SPEED and IGNORE_TIMER_RESOLUTION flags (keeps CPU at full clock + 1 ms quantum pinned regardless of OS idle decisions) - PowerSetRequest(EXECUTION_REQUIRED) + SetThreadExecutionState so the system can't decide we're idle and downclock - timeBeginPeriod(1) for 1 ms scheduler quantum - ProcessPriorityClass.High, ProcessMemoryPriority normal, working-set minimum locked via SetProcessWorkingSetSizeEx(HARDWS_MIN_ENABLE) - Fully reversed on toggle-off and on form close - Off by default (battery cost on laptops); explicit opt-in per profile MMCSS thread priority on hot threads bumped from High to Critical (network listener, mix loop, render thread) — always on. Network packet priority (always on, no toggle): - qWAVE flow on the outbound UDP socket at QOS_TRAFFIC_TYPE_VOICE with QOS_NON_ADAPTIVE_FLOW (Voice priority, DSCP 46/EF, WMM Voice on Wi-Fi) - Silent fallback if qwave.dll missing or QoS service disabled - Sender + receiver kernel UDP buffers bumped to 1 MB each (was 256 KB send / 512 KB receive) for resilience against ~30 ms stalls Bug fix: PreferencesDialog logging toggle no longer flags the profile as dirty. Logging is a machine-local AppConfig setting; the spurious ChangedAnyProfileSetting flag was triggering the unsaved-changes prompt on exit after toggling logs alone. Manual updated: new "Use CPU and Windows performance settings in high priority mode (Alt+U)" subsection on the Audio profile tab, new "Network packet priority (qWAVE / Voice / WMM)" subsection in the network chapter, Alt+U row added to keyboard-shortcuts table. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
146e76c6e6
commit
768875cebb
+43
-1
@@ -260,7 +260,35 @@ ul, ol { padding-left: 1.4em; }
|
||||
|
||||
<h2 id="tab-profile">8. Audio profile tab</h2>
|
||||
|
||||
<p>Everything that shapes the audio quality / latency trade-off lives here. The tab is split into two NVDA-announced groups: <strong>Audio send parameters</strong> at the top, <strong>Audio receive parameters</strong> below. As you tab through, NVDA announces which group you’ve entered.</p>
|
||||
<p>Everything that shapes the audio quality / latency trade-off lives here. The first thing you land on when you Tab into the tab is the <em>Priority mode</em> checkbox — kept ungrouped at the top because it's the single biggest knob for cold-start audio feel. Below that, two NVDA-announced groups: <strong>Audio send parameters</strong> first, <strong>Audio receive parameters</strong> below. As you tab through, NVDA announces which group you’ve entered.</p>
|
||||
|
||||
<h3>Use CPU and Windows performance settings in high priority mode (Alt+U)</h3>
|
||||
|
||||
<p>The first control on the tab. When ticked, RemSound asks Windows for high-priority treatment across the board, the entire time RemSound is open under this profile. Specifically:</p>
|
||||
|
||||
<ul>
|
||||
<li>No automatic CPU downclock when the machine looks idle.</li>
|
||||
<li>No migration of audio threads onto efficiency cores on hybrid CPUs (12th-gen Intel and later).</li>
|
||||
<li>No deep CPU-sleep idle states.</li>
|
||||
<li>1 ms scheduler quantum honoured even when other apps haven’t asked for it.</li>
|
||||
<li>High process priority class.</li>
|
||||
<li>Process memory priority asserted as normal, so Windows doesn’t demote our pages under memory pressure.</li>
|
||||
<li>Working-set minimum locked at 32 MB so the OS’s idle-time trimmer can’t page out our hot code and audio buffers.</li>
|
||||
<li>MMCSS Pro Audio thread priority bumped one notch from the default High to Critical on every hot thread (network listener, mix loop, render).</li>
|
||||
</ul>
|
||||
|
||||
<p>Net effect: the cold-start “first few seconds sound terrible, then it warms up” behaviour goes away. Nothing in the OS coasts while RemSound is sitting between bursts of activity.</p>
|
||||
|
||||
<p>It’s a <strong>per-profile</strong> setting, so you can have one profile for live sessions where this is on and another for casual background-listening profiles where it stays off. Toggling marks the profile as having unsaved changes; save the profile to keep the choice.</p>
|
||||
|
||||
<table>
|
||||
<tr><th>When to tick it</th><th>When to leave it off</th></tr>
|
||||
<tr><td>Live music collaboration. Anything where the first few seconds matter. Pro-audio setups using ASIO at very low latency targets (sub-15 ms). Sessions where the CPU sits idle between brief bursts of activity (one person presses Push-To-Talk on the other end).</td><td>Battery-powered laptop, especially when running long. Background listening over hours. A passive monitoring profile that doesn’t need responsive cold starts.</td></tr>
|
||||
</table>
|
||||
|
||||
<p>Cost on a desktop: a couple of watts more while RemSound is open. Cost on a laptop on battery: more aggressive battery drain over the session because the cores park in a higher power state instead of dropping to deep idle — RemSound’s actual CPU usage doesn’t change, the cores just don’t sleep. The override is automatically reversed when RemSound closes (or when you untick it), so leaving the app running with the box on for a session is fine — turning it off mid-session also works.</p>
|
||||
|
||||
<p>None of the other apps on your machine are affected. RemSound only asks Windows to keep <em>itself</em> at high priority; the OS keeps throttling everything else normally, so your screen reader, browser and background services still get the usual power-saving treatment.</p>
|
||||
|
||||
<h3>Audio send parameters</h3>
|
||||
|
||||
@@ -370,6 +398,19 @@ Audient USB Audio ASIO Driver — Pair 3 (channels 5/6): Loop-back 1 (L) / L
|
||||
|
||||
<p>Heartbeat packets ride on the same UDP port as audio, so if your audio reaches the peer, your heartbeat does too — one firewall rule covers both.</p>
|
||||
|
||||
<h3>Network packet priority (qWAVE / Voice / WMM)</h3>
|
||||
|
||||
<p>RemSound asks Windows’ built-in Quality-of-Service service (<strong>qWAVE</strong> — Quality Windows Audio/Video Experience) to mark its outbound audio packets as <strong>Voice priority</strong> (DSCP 46, Expedited Forwarding). This happens automatically on every launch — there’s no toggle — and falls back silently if the service is unavailable (some stripped-down Windows images).</p>
|
||||
|
||||
<p>What it buys you, in order of how much you’ll actually notice:</p>
|
||||
<ul>
|
||||
<li><strong>Wi-Fi:</strong> the DSCP marking maps to <strong>WMM Voice access category</strong>, the shortest medium-contention window the Wi-Fi standard defines. On a busy access point with other clients fighting for airtime (someone streaming, downloading, video-calling), RemSound’s packets get to transmit first. This is the biggest real-world win.</li>
|
||||
<li><strong>Local NIC scheduling:</strong> the Windows network stack sends RemSound’s packets ahead of best-effort traffic from the same machine (browser downloads, OS background transfers, cloud-sync uploads). When the upstream is saturated, audio still goes out cleanly.</li>
|
||||
<li><strong>Wired LAN switches and routers that honour DSCP:</strong> most consumer kit does, on the local side at least. The marking can give RemSound’s packets priority through the home network.</li>
|
||||
</ul>
|
||||
|
||||
<p>What it <em>doesn’t</em> buy you: priority across the public internet. Most ISPs strip or rewrite DSCP markings at the network edge, so the qWAVE bits rarely survive past your local ISP’s first hop. LAN and same-house Wi-Fi: tangible benefit. Across the internet: neutral — no harm, no help. RemSound also requests <strong>1 MB kernel send and receive buffers</strong> on its UDP sockets so a momentary stall (GC, scheduler hiccup) up to roughly 30 ms doesn’t cause the kernel to drop datagrams on either side.</p>
|
||||
|
||||
<h3>LAN — same Wi-Fi or Ethernet</h3>
|
||||
<p>On a normal home network, discovery and heartbeat both work without configuration. Launch RemSound on two machines and they’ll see each other within a second or two via the discovery broadcast. No firewall changes are usually needed because UDP broadcast is allowed by default.</p>
|
||||
|
||||
@@ -536,6 +577,7 @@ Audient USB Audio ASIO Driver — Pair 3 (channels 5/6): Loop-back 1 (L) / L
|
||||
|
||||
<table>
|
||||
<tr><th>Key</th><th>Action</th></tr>
|
||||
<tr><td>Alt+U</td><td>Toggle Use CPU and Windows performance settings in high priority mode (for this profile)</td></tr>
|
||||
<tr><td>Alt+C</td><td>Focus Audio codec</td></tr>
|
||||
<tr><td>Alt+P</td><td>Focus Packet size</td></tr>
|
||||
<tr><td>Alt+K</td><td>Toggle Lock to audio clock</td></tr>
|
||||
|
||||
Reference in New Issue
Block a user