InvalidWmpVersionException when Hourglass launched without WMP installed
dziemborowicz opened this issue · 2 comments
From a user report via email:
I just downloaded Hourglass version 1.11.0, and each time I open it I receive:
System.Windows.Media.InvalidWmpVersionException: Windows Media Player version 10 or later is required. ---> System.Runtime.InteropServices.COMException: MILAVERR_INVALIDWMPVERSION (Exception from HRESULT: 0x88980507) --- End of inner exception stack trace ---
This did not happen with 1.10.0
This was likely introduced by f8d9b41 when Hourglass started reporting media errors instead of just silently failing to play custom sounds. I would have expected that to be hit only when starting to play a sound, but it looks like it might get hit when initializing things?
Or maybe this was the upgrade to .NET Framework 4.5 in 7ff54f9.
A short-term solution may be to roll back the offending change, but a better long-term solution is to stop depending on WMP for sound playback and switch to something like NAudio.
See also #173.
Confirmed with the reporter that reverting f8d9b41 resolves the issue, so that's probably the thing to do for now until I have time to replace the audio stack.