Add audio feedback using custom .wav files - #49412
Open
class-Avirup wants to merge 3 commits into
Open
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
class-Avirup
commented
Jul 20, 2026
26 tasks
Contributor
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
|
still broken. Please fix xaml style issue. Run xaml script locally. |
class-Avirup
force-pushed
the
add_audio_feedback_customsounds
branch
from
July 25, 2026 06:58
99dc43c to
7da8555
Compare
Contributor
Author
|
@moooyo please rerun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Adds audible feedback to PowerToys Run: a sound plays when the Run window opens and/or closes. Replaces the earlier system-sound dropdown (Beep/Asterisk/Exclamation/Hand/Question) design with a simpler toggle-based UI and two custom, purpose-recorded
.wavfiles instead of relying on Windows system sounds.open.wav,close.wav) replace the previous Windows system-sound based approach.winmm.dll'sPlaySoundAPI, invoked fromMainWindow.xaml.csonOnVisibilityChanged.PR Checklist
Detailed Description of the Pull Request / Additional comments
Settings model (
PowerLauncherProperties.cs):EnableAudibleFeedback,EnableOpeningSound,EnableClosingSound, each defaulting tofalse.OpeningSound/ClosingSoundstring properties and the associatedSoundOptiondropdown model, since the UI no longer offers a choice of system sounds.ViewModel (
PowerLauncherViewModel.cs):EnableAudibleFeedback,EnableOpeningSound,EnableClosingSound) that propagate changes toPowerLauncherPropertiesand triggerUpdateSettings()/IPC sync, following the existing pattern used by other boolean toggles in this file.Settings UI (
resources.resw+ XAML):SettingsExpandercontaining a top-level toggle and two dependentSettingsCardtoggles, eachIsEnabled-bound to the parent toggle.PowerLauncher_Sound_None/Beep/Asterisk/Exclamation/Hand/Question, preview-button tooltips).Runtime playback (
MainWindow.xaml.cs, PowerLauncher):PlaySoundP/Invoke againstwinmm.dll.PlayAudibleFeedback(bool isOpening)checksEnableAudibleFeedbackand the relevant sub-toggle, then playsopen.wavorclose.wavfrom aSounds/folder next to the executable (resolved viaAppContext.BaseDirectory), guarded by aFile.Existscheck with logging on failure.OnVisibilityChangedfor both the show and hide paths._loadedAtLeastOnceguard so the opening sound doesn't fire on the very first cold-start invocation.Audio assets:
Sounds/open.wavandSounds/close.wav, sourced from freesound.org, added toPowerLauncher.csprojwithCopyToOutputDirectory = PreserveNewest.NOTICE/third-party-notices if the license requires it.Tests (
Settings.UI.UnitTests):PowerLauncherViewModelTest.SoundSettingsShouldUpdateSettings— verifies the three new toggle properties propagate correctly to the underlying settings and fire the expected number of IPC callbacks.OriginalFilesModificationTestto assert the new properties default tofalsewhen loading settings files from versions prior to this feature (backward compatibility).SetSettingCommandTests— addedDataRowentries forEnableAudibleFeedback/EnableOpeningSound/EnableClosingSoundcovering the--settingsCLI path.Validation Steps Performed
PowerLauncher.csprojandPowerToys.Settings.csprojindividually; both succeed.PowerToys.slnx) end-to-end successfully after resolving unrelated pre-existing environment issues (NuGet package source mapping for public runtime packages, classicpackages.configrestore for native C++ projects).Settings.UI.UnitTestscovering the new settings properties; all pass.settings.json..wavfile is temporarily removed from the output directory (fallback logging path).Working ScreenRecording: Click here
Parent PR :#48911