Follow-up CL on https://codereview.webrtc.org/2788883002/ where I add a new
test which has to be enabled manually (will not run by default on bots).
Measures loopback latency and reports the min, max and average values for
a full duplex audio session.
The latency is measured like so:
- Insert impulses periodically on the output side.
- Detect the impulses on the input side.
- Measure the time difference between the transmit time and receive time.
- Store time differences in a vector and calculate min, max and average.
This test needs the '--gtest_also_run_disabled_tests' flag to run and also
some sort of audio feedback loop. E.g. a headset where the mic is placed
close to the speaker to ensure highest possible echo. It is also recommended
to run the test at highest possible output volume.
How to run:
./out/Debug/modules_unittests --gtest_filter=AudioDeviceMeasureLoopbackLatency --gtest_also_run_disabled_tests
Example output (on Linux machine):
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from AudioDeviceTest
[ RUN ] AudioDeviceTest.DISABLED_MeasureLoopbackLatency
[..........]
[..........] [min, max, avg]=[59, 67, 64] ms
[ OK ] AudioDeviceTest.DISABLED_MeasureLoopbackLatency (10034 ms)
[----------] 1 test from AudioDeviceTest (10034 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (10036 ms total)
[ PASSED ] 1 test.
BUG=webrtc:7273
Review-Url: https://codereview.webrtc.org/2826073002
Cr-Commit-Position: refs/heads/master@{#17791}