Improve the reliablity of the audio e2e test.

- Use higher quality resampling.
- Add a longer delay before pacat recording.

TBR=kjellander@webrtc.org
BUG=issue502
TEST=manually

Review URL: https://webrtc-codereview.appspot.com/646005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2374 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org
2012-06-07 04:00:15 +00:00
parent b0bcf13dd4
commit f4c6aa2e81
3 changed files with 10 additions and 4 deletions

View File

@ -7,6 +7,10 @@ arguments, run_audio_test.py expects a pair of sinks named "capture" and
default.pa file in ~/.pulse. Alternately, the "pacmd" commands therein can be
run on the command-line to create the devices.
Similarly, place the provided daemon.conf file in ~/.pulse to use high quality
resampling in PulseAudio. This will reduce the resampling impact on the outcome
of the test.
Build all WebRTC targets as usual (or just the audio_e2e_harness target) to
generate the VoiceEngine harness.

View File

@ -0,0 +1 @@
resample-method = speex-float-9

View File

@ -55,8 +55,9 @@ def main(argv):
#
# We pass the render device for VoiceEngine to select because (for unknown
# reasons) the virtual device is sometimes not used when the default.
retcode = subprocess.call(['pacmd', 'set-default-source',
options.play_sink + '.monitor'], stdout=subprocess.PIPE);
command = ['pacmd', 'set-default-source', options.play_sink + '.monitor']
print ' '.join(command)
retcode = subprocess.call(command, stdout=subprocess.PIPE)
if retcode != 0:
return retcode
@ -65,7 +66,7 @@ def main(argv):
print ' '.join(command)
voe_proc = subprocess.Popen(command)
format_args = ['-n', '--format=s16le', '--rate=' + options.rate,
format_args = ['--format=s16le', '--rate=' + options.rate,
'--channels=' + options.channels, '--raw']
command = (['pacat', '-p', '-d', options.play_sink] + format_args +
[options.input])
@ -75,7 +76,7 @@ def main(argv):
# If recording starts before there is data available, pacat sometimes
# inexplicably adds a large delay to the start of the file. We wait here in
# an attempt to prevent that.
time.sleep(0.2)
time.sleep(2)
command = (['pacat', '-r', '-d', options.rec_sink + '.monitor'] +
format_args + [options.output])
print ' '.join(command)