mirror of
https://github.com/clockworkpi/launcher.git
synced 2026-01-04 21:18:51 +01:00
...
This commit is contained in:
parent
f1961ee5d6
commit
b6c142a2b9
@ -45,16 +45,19 @@ class PIFI(object):
|
||||
rawSamples = os.read(fifoFile,self.sampleSize) # will return empty lines (non-blocking)
|
||||
if len(rawSamples) < 1:
|
||||
# print("Read error")
|
||||
pass
|
||||
if self._samples_buffer != None:
|
||||
data = numpy.fromstring(self._samples_buffer, dtype=numpy.int16)
|
||||
numpy.divide(data,2)
|
||||
else:
|
||||
self._samples_buffer = rawSamples
|
||||
data = numpy.fromstring(self._samples_buffer, dtype=numpy.int16)
|
||||
except Exception,e:
|
||||
pass
|
||||
|
||||
if self._samples_buffer == None:
|
||||
return ""
|
||||
|
||||
data = numpy.fromstring(self._samples_buffer, dtype=numpy.int16)
|
||||
# data = numpy.fromstring(self._samples_buffer, dtype=numpy.int16)
|
||||
|
||||
data = data * numpy.hanning(len(data))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user