瀏覽代碼

audio: auxiliary pauses should be harmless now, place them back just in case

Dmitry Fedorov 4 年之前
父節點
當前提交
a27a8edf88
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      qubes/tests/integ/vm_qrexec_gui.py

+ 3 - 0
qubes/tests/integ/vm_qrexec_gui.py

@@ -551,11 +551,14 @@ class TC_00_AppVMMixin(object):
                 'parecord --raw --format=float32le --rate=44100 \
                             --channels=1 audio_rec.raw'))
         # give it time to start recording
+        self.loop.run_until_complete(asyncio.sleep(0.5))
         p = subprocess.Popen(['sudo', '-E', '-u', local_user,
             'paplay', '--raw', '--format=float32le',
                     '--rate=44100', '--channels=1'],
             stdin=subprocess.PIPE)
         p.communicate(audio_in.astype(np.float32).tobytes())
+        # wait for possible parecord buffering
+        self.loop.run_until_complete(asyncio.sleep(1))
         self.loop.run_until_complete(
             self.testvm1.run_for_stdio('pkill parecord || :'))
         _, record_stderr = self.loop.run_until_complete(record.communicate())