diff options
author | Hector Fernandez <hector@iatec.biz> | 2020-07-07 14:09:59 +0200 |
---|---|---|
committer | Hector Fernandez <hector@iatec.biz> | 2020-07-07 14:09:59 +0200 |
commit | 9f89f02e7d6e2a3208b0b85d2567ebffd2515e09 (patch) | |
tree | bcf4dee36e9413513eb67a1745160668703a2e81 /test-cli/test/tests/qaudio.py | |
parent | 43f688b414ea182cd9baf06ee83df072c3f563f5 (diff) | |
download | board-9f89f02e7d6e2a3208b0b85d2567ebffd2515e09.zip board-9f89f02e7d6e2a3208b0b85d2567ebffd2515e09.tar.gz board-9f89f02e7d6e2a3208b0b85d2567ebffd2515e09.tar.bz2 |
New way to check preivous state before changing to a new one. Solved some problems with audio test.
Diffstat (limited to 'test-cli/test/tests/qaudio.py')
-rw-r--r-- | test-cli/test/tests/qaudio.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test-cli/test/tests/qaudio.py b/test-cli/test/tests/qaudio.py index 364d8b2..3d2113a 100644 --- a/test-cli/test/tests/qaudio.py +++ b/test-cli/test/tests/qaudio.py @@ -28,7 +28,10 @@ class Qaudio(unittest.TestCase): # analize audio file recordtime = calc_audio_duration("/var/lib/hwtest-files/dtmf-13579.wav") + 0.15 # previous play to estabilise audio lines - sh.aplay("/var/lib/hwtest-files/dtmf-13579.wav") + p1 = sh.aplay("/var/lib/hwtest-files/dtmf-13579.wav", _bg=True) + p2 = sh.arecord("-r", 8000, "-d", recordtime, "/mnt/station_ramdisk/recorded.wav", _bg=True) + p1.wait() + p2.wait() # play and record p1 = sh.aplay("/var/lib/hwtest-files/dtmf-13579.wav", _bg=True) p2 = sh.arecord("-r", 8000, "-d", recordtime, "/mnt/station_ramdisk/recorded.wav", _bg=True) |