Flow.Launcher
Flow.Launcher copied to clipboard
Add Windows Media Player Warning
What's the PR
-
Fix https://github.com/Flow-Launcher/Flow.Launcher/issues/2682
-
If WMP doesn't exist on your system and can't adjust volume, it will warn and guide you beforehand.
-
Check if the executable of Windows Media Player(Legacy) exists by reading registry and turn it on/off.
- Fallback to use
SoundPlayer
to play sound if there no WMP
- Fallback to use
More Info
- After merging https://github.com/Flow-Launcher/Flow.Launcher/pull/2488, Multiple “sound not playing” issues reported
- I investigated and found that these are users who have uninstalled WMP.
- I looked into it and found that many people were uninstalling wmp. (Many posts offer this as a tip - the system warns you that there may be a problem, but many people ignore it)
- soundplay() is not volume adjustable, and mediaplayer() is WMP-based, so it won't play without WMP.
- I decided this was better than adding a library for WAV playback.
- WMPlib is in system32 and there seems to be a way to utilize it, but I don't want to bother investigating further.
I am upset with the following situation 🤬
- .NET uses WMP for sound play.
- .NET doesn't provide a volume property for soundplay(). Who in the world decides not to put a volume property in a sound play function?
- There are many posts telling people to delete WMP that is utilized in their system.
- Despite the warnings on the system, people delete WMP.
- We are the ones who suffer from all these problems.
Would this be better?
"Windows Media Player is unavailable and is required for sound effects. Please check your installation."
maybe try something like this https://github.com/mobiletechtracker/NetCoreAudio?
Adding a new dependency to play a single sound sounds wrong to me.
- Change to use soundplay to play sound if there no WMP
- Change the warning message to "Windows Media Player is unavailable and is required for volume adjust. Please check your WMP installation".
- Warning is hidden by default. If there is no WMP, it will be visible.
- Add disable the volume control when without WMP
- Disabled only the control, when it should have correctly output as disabling the entire card. Apply this after completing the SPLIT SETTINGS. (I don't know if there is a disable style)
- Issue reporters have reported that this PR is working.
@onesounds do you want to abstract this piece out to a usercontrol?
I am going to enable squash and merge into one commit in case we need to get this out sooner.
@onesounds do you want to abstract this piece out to a usercontrol?
not now.
Need to work on UI to match split setting pr. Will be worked on after split setting merge.