diff options
author | Benjamin Schwartz <bens@alum.mit.edu> | 2008-03-22 20:16:18 (GMT) |
---|---|---|
committer | Benjamin Schwartz <bens@alum.mit.edu> | 2008-03-22 20:16:18 (GMT) |
commit | 85a050d6882c56f58ed69120b8a66db882d200a2 (patch) | |
tree | b719b84d0cd6688965b570c817d58756fb9a502d /arange.py | |
parent | 3ca4b89fb4bcb78ee3c8a6c2b40f370cd0a6e3df (diff) |
Increase buffer time to handle system load gracefully
Diffstat (limited to 'arange.py')
-rwxr-xr-x | arange.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -134,7 +134,7 @@ def write_wav(o): return f def play_wav_alsa(fname): - subprocess.call(["/usr/bin/aplay", fname]) + subprocess.call(["/usr/bin/aplay", "--buffer-time=10000000", fname]) play_wav = play_wav_alsa @@ -154,7 +154,7 @@ def record_while_playing(play_name, t): def start_recording_alsa(): fname = os.tempnam() - rec_process = subprocess.Popen(["/usr/bin/arecord", "--file-type=raw", "--channels=1", "--format=S16_LE", "--rate=48000", fname]) + rec_process = subprocess.Popen(["/usr/bin/arecord", "--file-type=raw", "--channels=1", "--format=S16_LE", "--rate=48000", "--buffer-time=10000000", fname]) s = 0 while s <= 0: |