From 9a4ac7184c746994d23bd102bec30f0d000fddbe Mon Sep 17 00:00:00 2001 From: Chris Dziemborowicz Date: Tue, 28 Sep 2021 01:20:20 -0700 Subject: [PATCH 1/2] Resolve #210: InvalidWmpVersionException on start when no WMP installed This is a partial revert of f8d9b419e37f0990aafbc2ce81556705da456c76. That change introduced reporting errors for custom sound playback, which is done via a Windows Media Player (WMP) dependency. Unfortunatley, it reports errors on startup instead of just when attempting to play a custom sound. It's better to fail silently to play custom sounds than to show an error message for all users who don't have WMP installed, since use of custom sounds is rare. We'll fix playback of custom sounds as part of #173 by removing the WMP dependency. --- Hourglass/Windows/SoundPlayer.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Hourglass/Windows/SoundPlayer.cs b/Hourglass/Windows/SoundPlayer.cs index fe1b3f6..0034a12 100644 --- a/Hourglass/Windows/SoundPlayer.cs +++ b/Hourglass/Windows/SoundPlayer.cs @@ -9,7 +9,7 @@ namespace Hourglass.Windows using System; using System.Windows.Media; using System.Windows.Threading; - using Hourglass.Managers; + using Hourglass.Timing; /// @@ -58,7 +58,6 @@ public SoundPlayer() // File sound player this.mediaPlayer = new MediaPlayer(); this.mediaPlayer.MediaEnded += this.MediaPlayerOnMediaEnded; - this.mediaPlayer.MediaFailed += this.MediaPlayerOnMediaFailed; } #endregion @@ -335,16 +334,6 @@ private void MediaPlayerOnMediaEnded(object sender, EventArgs e) } } - /// - /// Invoked when an error is encountered in the . - /// - /// The . - /// The event data. - private void MediaPlayerOnMediaFailed(object sender, ExceptionEventArgs e) - { - ErrorManager.Instance.ReportError(e.ErrorException.ToString()); - } - #endregion } } From fcb3f7ddca04b5b22784891f039fe969360c6148 Mon Sep 17 00:00:00 2001 From: Chris Dziemborowicz Date: Tue, 28 Sep 2021 01:22:55 -0700 Subject: [PATCH 2/2] Bump version --- Hourglass.Bundle/Bundle.wxs | 2 +- Hourglass.Setup/Product.wxs | 2 +- Hourglass.Test/Properties/AssemblyInfo.cs | 4 ++-- Hourglass/Properties/App.manifest | 2 +- Hourglass/Properties/AssemblyInfo.cs | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Hourglass.Bundle/Bundle.wxs b/Hourglass.Bundle/Bundle.wxs index da7e72c..254ac38 100644 --- a/Hourglass.Bundle/Bundle.wxs +++ b/Hourglass.Bundle/Bundle.wxs @@ -3,7 +3,7 @@ diff --git a/Hourglass.Setup/Product.wxs b/Hourglass.Setup/Product.wxs index 524430c..e477afd 100644 --- a/Hourglass.Setup/Product.wxs +++ b/Hourglass.Setup/Product.wxs @@ -1,7 +1,7 @@ - + diff --git a/Hourglass.Test/Properties/AssemblyInfo.cs b/Hourglass.Test/Properties/AssemblyInfo.cs index 2b65926..161ea23 100644 --- a/Hourglass.Test/Properties/AssemblyInfo.cs +++ b/Hourglass.Test/Properties/AssemblyInfo.cs @@ -17,5 +17,5 @@ [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("002a4be7-7323-4bf9-ab08-5fc8978d9eb0")] -[assembly: AssemblyVersion("1.11.0.0")] -[assembly: AssemblyFileVersion("1.11.0.0")] +[assembly: AssemblyVersion("1.12.0.0")] +[assembly: AssemblyFileVersion("1.12.0.0")] diff --git a/Hourglass/Properties/App.manifest b/Hourglass/Properties/App.manifest index 501df5b..2787107 100644 --- a/Hourglass/Properties/App.manifest +++ b/Hourglass/Properties/App.manifest @@ -1,6 +1,6 @@  - + diff --git a/Hourglass/Properties/AssemblyInfo.cs b/Hourglass/Properties/AssemblyInfo.cs index 5d28e95..ac3c929 100644 --- a/Hourglass/Properties/AssemblyInfo.cs +++ b/Hourglass/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ [assembly: AssemblyCopyright("Copyright © 2021 Chris Dziemborowicz")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("1.11.0.0")] -[assembly: AssemblyFileVersion("1.11.0.0")] +[assembly: AssemblyVersion("1.12.0.0")] +[assembly: AssemblyFileVersion("1.12.0.0")] [assembly: NeutralResourcesLanguageAttribute("en-US")] [assembly: Guid("83DBAA61-6193-4288-BBB7-BEAEC33FE321")] [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]