Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Silent pulse audio output detection/indication, with bash + arecord
You can "grep" something at /proc or whatever that tells whether there's some sound theoretically being played, but it will give a false positive when "silent sound" is being played.
A clumsy hack along these lines can detect "silent audio" as silence:
The output of the command will be a bunch of "random" characters, but question mark in a diamond (whatever it's called -- apparently "replacement character") will be the predominant character on silent output.
A clumsy hack along these lines can detect "silent audio" as silence:
Code:
while true ; do arecord -d 1 -D pulse > /dev/shm/test-audio 2>&1 cut -c 300- /dev/shm/test-audio | grep -a [[:alpha:]] > /dev/null && echo sound || echo silence done
Total Comments 0