Release v3.2: update sound cue + single-instance bring-to-front fix

- New "Update sound" cue (CueId.Update / update.wav). Plays just before an
  update starts installing, on every path (manual, background-silent,
  startup-silent), so a silent background update gives an audible heads-up
  before RemSound closes to restart. Per-profile mute + custom-sound override
  in Preferences, same infrastructure as the other cues:
    * Profile.EnableUpdateCue + RemSoundSettingsStore Load/Save + round-trip
    * MainForm updateSound field, TryLoadCueSound, play in InstallUpdateAsync
      gated by LoadEnableUpdateCue
    * PreferencesDialog "Update sound" CueRow + ResolveCueFilePath mapping
    * update.wav shipped in sounds\ via csproj Content
- Single-instance "switch to the running copy" now actually brings the window
  to the front. The second copy grants the running copy foreground rights via
  AllowSetForegroundWindow before signalling, and lingers briefly so it can
  raise itself before we exit — without this, Windows' foreground lock left
  the running window only flashing in the taskbar (Ed's report).
- Docs: About box v3.2 block, RELEASE_NOTES.md, manual cue section (now seven
  cues, with the update cue described), MANUAL.md regenerated.
- Version bumped 3.1.3 -> 3.2.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ednunp
2026-05-31 17:58:25 +01:00
co-authored by Claude Opus 4.8
parent 9ab0a1a20a
commit cdcac859c4
11 changed files with 130 additions and 27 deletions
+12
View File
@@ -326,6 +326,7 @@ public sealed class MainForm : Form
// Save As; Profile fires immediately after a profile finishes loading in MainForm.
private System.Media.SoundPlayer? saveSound;
private System.Media.SoundPlayer? profileSwitchSound;
private System.Media.SoundPlayer? updateSound;
// Labels for the three send/receive device lists, captured at layout time so they can be
// re-titled when the user toggles between WASAPI mode (Windows devices) and ASIO mode
// (driver channel pairs). null until BuildLayout has run.
@@ -892,6 +893,7 @@ public sealed class MainForm : Form
TryLoadCueSound(CueId.RecordStop, "record stop.wav", out recordStopSound);
TryLoadCueSound(CueId.Save, "save.wav", out saveSound);
TryLoadCueSound(CueId.ProfileSwitch, "profile.wav", out profileSwitchSound);
TryLoadCueSound(CueId.Update, "update.wav", out updateSound);
LoadAudioDevices();
// Apply persisted ASIO mode from settings — switches sender/receiver backends so the
@@ -2081,6 +2083,14 @@ public sealed class MainForm : Form
}
updateInstallStarted = true;
// Update cue — an audible heads-up that an update is going in, played just before it
// starts. Fires for every install path (manual, background-silent, startup-silent), so
// a silent background update isn't completely silent: the user hears that RemSound is
// about to close and update. Played before the download so it sounds well before the
// app vanishes; the download comfortably outlasts the short cue. Honours the per-profile
// EnableUpdateCue flag set in Preferences.
if (settings.LoadEnableUpdateCue()) updateSound?.Play();
var ok = await updater.DownloadAndStageInstallAsync(info, currentProfileTitle).ConfigureAwait(true);
if (!ok)
{
@@ -5426,6 +5436,7 @@ public sealed class MainForm : Form
public const string RecordStop = "record-stop";
public const string Save = "save";
public const string ProfileSwitch = "profile-switch";
public const string Update = "update";
}
/// <summary>Load one cue sound. Resolution order:
@@ -5487,6 +5498,7 @@ public sealed class MainForm : Form
TryLoadCueSound(CueId.RecordStop, "record stop.wav", out recordStopSound);
TryLoadCueSound(CueId.Save, "save.wav", out saveSound);
TryLoadCueSound(CueId.ProfileSwitch, "profile.wav", out profileSwitchSound);
TryLoadCueSound(CueId.Update, "update.wav", out updateSound);
}
/// <summary>