You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
elseif(Morphic.WindowsNative.OsVersion.OsVersion.IsEqualOrNewerThanVersion(WindowsNative.OsVersion.WindowsVersion.Win11_v23H2,4037/* not required in build 22631.3447, but required in build 22631.4037 */)==true)
339
339
{
340
-
// Windows 11 v24H2+
340
+
// Windows 11 v23H2 revision 4037+, Windows 11 v24H2+
341
341
342
342
// capture changes to system dark theme (triggering our this.InverseSettingOnChanged event handler)
Debug.Assert(false,"Could not create speech synthesizer stream; ex: "+ex.Message);
42
+
returnMorphicResult.ErrorResult();
43
+
}
44
+
//
45
+
try
46
+
{
47
+
// NOTE: we cannot use the speech synthesizer directly using SpeakAsync/SpeakAsyncCancelAll because Windows.Speech.SpeechSynthesis and these corresponding methods are not supported in .NET 5 (i.e. only in .NET Framework)
48
+
_speechPlayer.Stream=stream.AsStream();
33
49
34
-
// NOTE: we cannot use the speech synthesizer directly using SpeakAsync/SpeakAsyncCancelAll because Windows.Speech.SpeechSynthesis and these corresponding methods are not supported in .NET 5 (i.e. only in .NET Framework)
35
-
_speechPlayer.Stream=stream.AsStream();
36
-
37
-
// NOTE: Play() loads and plays the sound in a new thread asynchronously; we could await on LoadAsync and then call Play, but that could create a contention if
38
-
// Stop() was called before the LoadAsync callback completed and therefore before Play() got called
39
-
_speechPlayer.Play();
50
+
// NOTE: Play() loads and plays the sound in a new thread asynchronously; we could await on LoadAsync and then call Play, but that could create a contention if
51
+
// Stop() was called before the LoadAsync callback completed and therefore before Play() got called
52
+
_speechPlayer.Play();
53
+
}
54
+
catch(Exceptionex)
55
+
{
56
+
Debug.Assert(false,"Could not capture/play text stream; ex: "+ex.Message);
57
+
returnMorphicResult.ErrorResult();
58
+
}
59
+
finally
60
+
{
61
+
// NOTE: this 'always manually dispose' pattern may or may not be required; this is being kept based on the original design of this class.
62
+
stream.Dispose();
63
+
}
64
+
}
65
+
finally
66
+
{
67
+
// NOTE: this 'always manually dispose' pattern may or may not be required; this is being kept based on the original design of this class.
if(Morphic.WindowsNative.OsVersion.OsVersion.IsEqualOrNewerThanVersion(WindowsNative.OsVersion.WindowsVersion.Win11_v23H2,4037/* not required in build 22631.3447, but required in build 22631.4037 */)==true)
351
351
{
352
+
// Windows 11 v23H2 revision 4037+, Windows 11 v24H2+
if(Morphic.WindowsNative.OsVersion.OsVersion.IsEqualOrNewerThanVersion(WindowsNative.OsVersion.WindowsVersion.Win11_v23H2,4037/* not required in build 22631.3447, but required in build 22631.4037 */)==true)
389
393
{
390
-
// Windows 11 24H2+
394
+
// Windows 11 v23H2 revision 4037+, Windows 11 v24H2+
0 commit comments