@@ -16,7 +16,7 @@ def __init__(self, filename, chunksize, paudio):
16
16
17
17
filestream = wave .open (filename , "rb" )
18
18
19
- self ._audiostream = paudio .open (format = paudio .get_format_from_width (filestream .getsampwidth (), False ),
19
+ self ._audiostream = paudio .open (format = paudio .get_format_from_width (filestream .getsampwidth ()),
20
20
channels = filestream .getnchannels (),
21
21
rate = filestream .getframerate (),
22
22
output = True )
@@ -50,7 +50,7 @@ def __init__(self, filename, chunksize, paudio):
50
50
51
51
# Copy byte data to integer list
52
52
while (audiodata ):
53
- fmt = self ._endianness + self ._type * int (len (audiodata ) / filestream .getsampwidth ())
53
+ fmt = self ._endianness + self ._type * int (len (audiodata ) / filestream .getsampwidth ())
54
54
data = struct .unpack (fmt , audiodata )
55
55
self ._audiodata .extend (data )
56
56
audiodata = filestream .readframes (chunksize )
@@ -81,5 +81,6 @@ def update(self):
81
81
82
82
fmt = self ._endianness + self ._type * len (subdata )
83
83
audiodata = struct .pack (fmt , * subdata )
84
+ print (audiodata )
84
85
self ._audiostream .write (audiodata )
85
86
self .progress += readout
0 commit comments