Read WAV files using mmap=True

pull/357/head
nyanpasu64 2018-07-16 18:23:53 -07:00
rodzic af41500266
commit fb7932b952
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -20,8 +20,7 @@ FLOAT = np.double
class Wave:
def __init__(self, wcfg: Optional[WaveConfig], wave_path: str):
self.cfg = wcfg
# TODO mmap
self.smp_s, self.data = wavfile.read(wave_path) # type: int, np.ndarray
self.smp_s, self.data = wavfile.read(wave_path, mmap=True) # type: int, np.ndarray
self.nsamp = len(self.data)
self.trigger: Trigger = None