aaudio_loopback: improve tolerance to noise

Make silence detector less sensitive to noise by setting the
threshold proportional to the measured pulse level.

Make glitch detector less sensitive to noise by setting the
threshold proportional to the measured noise level.

Report signal to noise ratio.

Improved printed messages, show state as text.

Bug: 117834966
Test: aaudio_loopback -pl -tm
Change-Id: I5593cd1ade93ecbcb05f42af07626013d036f29a
4 files changed