Skip to content

Commit

Permalink
Small fixes to SAPI5
Browse files Browse the repository at this point in the history
  • Loading branch information
gexgd0419 committed Jan 14, 2025
1 parent be58ca5 commit 2d914b0
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 2d914b0

Please sign in to comment.