Commit 9aecd396 authored by Henrik Grunell's avatar Henrik Grunell Committed by Commit Bot

Drain input audio device buffer completely on Windows.

* Move the code pulling and pushing data to its own function.
* Add a loop that runs until the audio client reports empty buffer.
* Remove unnecessary GetVolume() call; it's overwritten by GetAgcVolume() call later.

Bug: 637558
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ie06d862592143d76508a7d4d709efd42c83a1d9c
Reviewed-on: https://chromium-review.googlesource.com/931554
Commit-Queue: Henrik Grunell <grunell@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538859}
parent 26cf4ce9
...@@ -119,6 +119,9 @@ class MEDIA_EXPORT WASAPIAudioInputStream ...@@ -119,6 +119,9 @@ class MEDIA_EXPORT WASAPIAudioInputStream
// DelegateSimpleThread::Delegate implementation. // DelegateSimpleThread::Delegate implementation.
void Run() override; void Run() override;
// Pulls capture data from the endpoint device and pushes it to the sink.
void PullCaptureDataAndPushToSink();
// Issues the OnError() callback to the |sink_|. // Issues the OnError() callback to the |sink_|.
void HandleError(HRESULT err); void HandleError(HRESULT err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment