Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes to SAPI5 #17622

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/synthDrivers/sapi5.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def IStream_RemoteSeek(
if dwOrigin == 1 and dlibMove.QuadPart == 0:
# SAPI is querying the current position.
if plibNewPosition:
plibNewPosition.QuadPart = self._writtenBytes
plibNewPosition[0].QuadPart = self._writtenBytes
return hresult.S_OK
return hresult.E_NOTIMPL

Expand Down Expand Up @@ -194,13 +194,13 @@ def Bookmark(self, streamNum: int, pos: int, bookmark: str, bookmarkId: int):

def EndStream(self, streamNum: int, pos: int):
synth = self.synthRef()
synth.player.idle()
# trigger all untriggered bookmarks
if streamNum in synth._streamBookmarks:
for bookmark in synth._streamBookmarks[streamNum]:
synthIndexReached.notify(synth=synth, index=bookmark)
del synth._streamBookmarks[streamNum]
synth.isSpeaking = False
synth.player.idle()
synthDoneSpeaking.notify(synth=synth)

def onIndexReached(self, streamNum: int, index: int):
Expand Down
Loading