Adds AudioDeviceTest.MeasureLoopbackLatency unittest.

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}
1 file changed
tree: 1ec09e156dedea7fca482716819d7d300d14745f
  1. build_overrides/
  2. data/
  3. infra/
  4. resources/
  5. tools-webrtc/
  6. webrtc/
  7. .clang-format
  8. .git-blame-ignore-revs
  9. .gitignore
  10. .gn
  11. AUTHORS
  12. BUILD.gn
  13. check_root_dir.py
  14. cleanup_links.py
  15. codereview.settings
  16. DEPS
  17. LICENSE
  18. license_template.txt
  19. LICENSE_THIRD_PARTY
  20. OWNERS
  21. PATENTS
  22. PRESUBMIT.py
  23. pylintrc
  24. README.md
  25. WATCHLISTS
README.md

WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.

Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.

The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.

Development

See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.

More info