send.py "underrun occurred"
construidor opened this issue · comments
The same failure occurs randomly repeatedly, inside the call "stream.write(sample)".
"ALSA lib pcm.c: 7843: (snd_pcm_recover) underrun occurred"
If a wave file is created, it will play (and receive) perfectly.
https://github.com/construidor/quietnet/blob/master/file.py
Hmm unfortunately that's inside of pyaudio. But "underrun" sounds like we aren't giving it enough samples. How long is your sample wave file and how small where the messages you were trying to send?
He stopped to work after 1° input, some times the 1° not work.
Exemple:
$ python2 send.py
Welcome to quietnet. Use ctrl-c to exitaa
aaa
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
a
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
aaa
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred$ python2 send.py
Welcome to quietnet. Use ctrl-c to exit11111
123456
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
.....The message repeat
Problem Solved,
https://github.com/construidor/quietnet/commit/32fa491ea12bf5e12083081860a4362af95751fa
The message keep appearing, but work.
I will make a pull request.