Skip to content

Commit 035a921

Browse files
authored
Fix regression in Windows interface
recent versions of numpy.split require an integer argument
1 parent 8f07897 commit 035a921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

soundcard/mediafoundation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ def record(self, numframes=None):
772772
recorded_data.append(chunk)
773773
recorded_frames += len(chunk)
774774
if recorded_frames > required_frames:
775-
to_split = -(recorded_frames-required_frames)
775+
to_split = -int(recorded_frames-required_frames)
776776
recorded_data[-1], self._pending_chunk = numpy.split(recorded_data[-1], [to_split])
777777

778778
data = numpy.reshape(numpy.concatenate(recorded_data), [-1, len(set(self.channelmap))])

0 commit comments

Comments
 (0)