Katee / quietnet

Simple chat program that communicates using inaudible sounds

Home Page:https://kate.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 exit

aa
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 exit

11111
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.