mirror of
https://github.com/romanz/amodem.git
synced 2026-03-23 10:41:01 +08:00
stream: use async I/O to avoid real-time problems.
This commit is contained in:
@@ -16,7 +16,7 @@ def main():
|
||||
interface = audio.Interface(config=config)
|
||||
with interface.load(args.audio_library):
|
||||
src = interface.recorder()
|
||||
size = config.sample_size * config.samples_per_buffer
|
||||
size = int(config.sample_size * config.Fs) # one second of audio
|
||||
while True:
|
||||
dst.write(src.read(size))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user