From c4038149a8b561ec72fd7f36de01772afa9737bc Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 20 May 2021 17:07:55 -0500 Subject: [PATCH] Remove a conditional that blocked playback in some circumstances on the WinRT backend. --- src/backends/winrt/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/backends/winrt/mod.rs b/src/backends/winrt/mod.rs index 9b2d0f0..af9ca34 100644 --- a/src/backends/winrt/mod.rs +++ b/src/backends/winrt/mod.rs @@ -11,7 +11,7 @@ use bindings::Windows::{ Foundation::TypedEventHandler, Media::{ Core::MediaSource, - Playback::{MediaPlaybackState, MediaPlayer, MediaPlayerAudioCategory}, + Playback::{MediaPlayer, MediaPlayerAudioCategory}, SpeechSynthesis::SpeechSynthesizer, }, }; @@ -181,9 +181,7 @@ impl Backend for WinRt { utterances.push_back(utterance); } } - if no_utterances - && self.player.PlaybackSession()?.PlaybackState()? != MediaPlaybackState::Playing - { + if no_utterances { self.synth.Options()?.SetSpeakingRate(self.rate.into())?; self.synth.Options()?.SetAudioPitch(self.pitch.into())?; self.synth.Options()?.SetAudioVolume(self.volume.into())?;