mirror of
https://github.com/romanz/amodem.git
synced 2026-02-24 16:18:12 +08:00
fixup! add file streaming support
This commit is contained in:
@@ -3,7 +3,7 @@ import common
|
||||
import wave
|
||||
|
||||
|
||||
class FileBuffer(object):
|
||||
class Reader(object):
|
||||
|
||||
SAMPLES = 4096
|
||||
BUFSIZE = int(SAMPLES * wave.bytes_per_sample)
|
||||
|
||||
@@ -4,7 +4,7 @@ import wave
|
||||
|
||||
def test():
|
||||
p = wave.record('-', stdout=wave.sp.PIPE)
|
||||
f = stream.FileBuffer(p.stdout)
|
||||
f = stream.Reader(p.stdout)
|
||||
|
||||
result = zip(range(10), f)
|
||||
p.stop()
|
||||
|
||||
Reference in New Issue
Block a user