diff --git a/.gitignore b/.gitignore index 2adcf2b..bdd931d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,7 @@ doc/_build/ gh-pages/ build/ dist/ -.vscode/ \ No newline at end of file +.vscode/ +/__pycache__/ +/pyalsaaudio.egg-info/ +*.raw diff --git a/recordtest.py b/recordtest.py index c77646b..6d77518 100755 --- a/recordtest.py +++ b/recordtest.py @@ -53,12 +53,15 @@ if __name__ == '__main__': channels=1, rate=44100, format=alsaaudio.PCM_FORMAT_S16_LE, periodsize=160, device=device) - loops = 1000000 + print(inp.info()) + help(inp.htimestamp) + + loops = 100000 while loops > 0: loops -= 1 # Read data from device l, data = inp.read() - if l: + print(l, inp.htimestamp(), time.time()) f.write(data) time.sleep(.001)