initial checkin from subversion

This commit is contained in:
Tretter
2017-02-07 20:08:04 +00:00
commit 7d64984591
2 changed files with 18 additions and 0 deletions

BIN
NoiseRec.db Normal file

Binary file not shown.

18
NoiseTracker.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
#DB Table format:
#CREATE TABLE data (datum datetime, level int);
interval=60 # sample length in seconds to evaluate maximum on...
exec 2>/dev/null # no default error output
while true; do
rec out.wav &
sleep $interval
kill -KILL %1
max_level="$(sox out.wav -n stats -b 16 2>&1|awk '/^Max\ level/ {print int($3)}')"
echo -e "insert into data (datum,level) values (datetime('now', 'localtime'),$max_level);" | sqlite3 NoiseRec.db
rm out.wav
done