Skip to content
Merged
Changes from 1 commit
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
7 changes: 3 additions & 4 deletions source/nvwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
c_void_p,
CFUNCTYPE,
c_float,
string_at,
c_char_p,
cast,
)
from comtypes import HRESULT
from comtypes.hresult import E_INVALIDARG
Expand Down Expand Up @@ -339,12 +340,10 @@ def feed(
# turn off trimming temporarily.
if self._purpose is AudioPurpose.SPEECH and self._isLeadingSilenceInserted:
self.startTrimmingLeadingSilence(False)
if not isinstance(data, bytes):
data = string_at(data, size)
try:
NVDAHelper.localLib.wasPlay_feed(
self._player,
data,
cast(data, c_char_p),
Comment thread
seanbudd marked this conversation as resolved.
Outdated
size if size is not None else len(data),
Comment thread
seanbudd marked this conversation as resolved.
byref(feedId) if onDone else None,
)
Expand Down
Loading