Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Issue 2710023010: Fix busy loop in FakeAudioDeviceModule. (Closed)

Created:
3 years, 10 months ago by tommi
Modified:
3 years, 10 months ago
Reviewers:
the sun
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, audio-team_agora.io, sdk-team_agora.io, peah-webrtc, henrika_webrtc
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fix busy loop in FakeAudioDeviceModule. The implementation now has a mechanism that effectively turns off callbacks if used. BUG=webrtc:7237, 695438 TBR=solenberg@webrtc.org Review-Url: https://codereview.webrtc.org/2710023010 Cr-Commit-Position: refs/heads/master@{#16837} Committed: https://chromium.googlesource.com/external/webrtc/+/4af9f962c3a79b97c4b2d85be4c30c9b77ef7a21

Patch Set 1 #

Patch Set 2 : Add some logic to reduce callbacks when appropriate #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -2 lines) Patch
M webrtc/modules/audio_device/include/fake_audio_device.h View 1 2 chunks +18 lines, -2 lines 3 comments Download

Messages

Total messages: 18 (12 generated)
tommi
Add some logic to reduce callbacks when appropriate
3 years, 10 months ago (2017-02-25 15:43:40 UTC) #1
tommi
3 years, 10 months ago (2017-02-25 15:46:25 UTC) #4
tommi
Hej Fredrik - I think I'll tbr this change to see the impact on the ...
3 years, 10 months ago (2017-02-25 16:17:15 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2710023010/20001
3 years, 10 months ago (2017-02-25 17:02:48 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/external/webrtc/+/4af9f962c3a79b97c4b2d85be4c30c9b77ef7a21
3 years, 10 months ago (2017-02-25 17:05:27 UTC) #17
the sun
3 years, 10 months ago (2017-02-25 20:01:08 UTC) #18
Message was sent while issue was closed.
lgtm but see comments for an alternative with less boolean mungery.

https://codereview.webrtc.org/2710023010/diff/20001/webrtc/modules/audio_devi...
File webrtc/modules/audio_device/include/fake_audio_device.h (right):

https://codereview.webrtc.org/2710023010/diff/20001/webrtc/modules/audio_devi...
webrtc/modules/audio_device/include/fake_audio_device.h:48: if
(turn_off_module_callbacks_)
return time_until_next_process_;

https://codereview.webrtc.org/2710023010/diff/20001/webrtc/modules/audio_devi...
webrtc/modules/audio_device/include/fake_audio_device.h:55:
turn_off_module_callbacks_ = uses_default_module_implementation_;
// After first call to Process(), we wait a long time to avoid hogging CPU.
time_until_next_process_ = 7 * 24 * 60 * 60 * 1000;  // call me next week.

https://codereview.webrtc.org/2710023010/diff/20001/webrtc/modules/audio_devi...
webrtc/modules/audio_device/include/fake_audio_device.h:184: bool
uses_default_module_implementation_ = false;
int64_t time_until_next_process_ = 10;

Powered by Google App Engine
This is Rietveld 408576698