Jelajahi Sumber

Ensure interpolation is properly cast

Graham Northup 7 tahun lalu
induk
melakukan
cdb4bba35a
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      client.py

+ 1 - 1
client.py

@@ -352,7 +352,7 @@ if options.numpy:
 
     def resample(samps, amt):
         samps = numpy.frombuffer(samps, numpy.int32)
-        return numpy.interp(numpy.linspace(0, samps.shape[0], amt, False), numpy.linspace(0, samps.shape[0], samps.shape[0], False), samps).tobytes()
+        return numpy.interp(numpy.linspace(0, samps.shape[0], amt, False), numpy.linspace(0, samps.shape[0], samps.shape[0], False), samps).astype(numpy.int32).tobytes()
 
 else:
     def lin_seq(frm, to, cnt):