Skip to content

Commit

Permalink
feat(Core::Reset): Add a mneu item to reset the Windows 10/11 per app…
Browse files Browse the repository at this point in the history
…lication audio settings.

Helps to debug some weird state like not receiving anymore event to the notification client.
  • Loading branch information
Belphemur committed Jun 2, 2023
1 parent 899058b commit a5c07e8
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public void ResetAllSetEndpoint()
{
try
{
_log.Information("Resetting Persisted Application Default Endpoints");
PolicyConfig.ClearAllPersistedApplicationDefaultEndpoints();
}
catch (Exception ex)
Expand Down
10 changes: 9 additions & 1 deletion SoundSwitch/Localization/TrayIconStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions SoundSwitch/Localization/TrayIconStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,7 @@
<data name="forceCheckForUpdate" xml:space="preserve">
<value>Check for update</value>
</data>
<data name="resetAudioDevices" xml:space="preserve">
<value>Reset per app audio</value>
</data>
</root>
12 changes: 11 additions & 1 deletion SoundSwitch/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions SoundSwitch/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,7 @@
<data name="profile-menu-delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\user-times-solid.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="resetAudioDevice" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\resetAudioDevice.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
2 changes: 2 additions & 0 deletions SoundSwitch/UI/Component/TrayIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ private void PopulateSettingsMenu()
(sender, e) => { Process.Start(new ProcessStartInfo("control", "mmsys.cpl sounds")); });
_settingsMenu.Items.Add(TrayIconStrings.mixer, RessourceMixerBitmap,
(sender, e) => { Process.Start(new ProcessStartInfo("sndvol.exe")); });
_settingsMenu.Items.Add(TrayIconStrings.resetAudioDevices, Resources.resetAudioDevice.ToBitmap(),
(sender, e) => { AudioSwitcher.Instance.ResetProcessDeviceConfiguration(); });
_settingsMenu.Items.Add(new ToolStripSeparator());
_settingsMenu.Items.Add(_updateMenuItem);
_settingsMenu.Items.Add(TrayIconStrings.settings, RessourceSettingsSmallBitmap, (sender, e) => ShowSettings());
Expand Down

0 comments on commit a5c07e8

Please sign in to comment.