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

Issue 187593004: Hook up AudioDeviceListenerWin to monitor all default device changes. (Closed)

Created:
6 years, 9 months ago by tommi (sloooow) - chröme
Modified:
6 years, 5 months ago
Reviewers:
Nico, DaleCurtis
CC:
chromium-reviews, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, jam, darin-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Hook up AudioDeviceListenerWin to monitor all default device changes. In addition to the current functionality, this adds: * Detection of default capture devices (communication and console). * Detection of changes to the default communication render device. While doing this, I decided to also make 'effects' visible in the media-internals page which was very helpful in tracking down the source of the problem I was running into. BUG=347531 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255687

Patch Set 1 #

Patch Set 2 : Rebase to head #

Patch Set 3 : Remove unused variable (doh!). #

Total comments: 10

Patch Set 4 : Fix whitespace #

Patch Set 5 : Improve readability. #

Patch Set 6 : Fix whitespace again! (not sure how it snuck back in!?) #

Patch Set 7 : Rebase #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -21 lines) Patch
M content/browser/media/media_internals.cc View 1 2 3 chunks +33 lines, -0 lines 0 comments Download
M content/browser/media/media_internals_unittest.cc View 2 chunks +5 lines, -1 line 0 comments Download
M media/audio/win/audio_device_listener_win.h View 1 chunk +3 lines, -0 lines 0 comments Download
M media/audio/win/audio_device_listener_win.cc View 1 2 3 4 5 4 chunks +47 lines, -20 lines 3 comments Download

Messages

Total messages: 26 (0 generated)
tommi (sloooow) - chröme
6 years, 9 months ago (2014-03-05 15:46:21 UTC) #1
tommi (sloooow) - chröme
Rebase to head
6 years, 9 months ago (2014-03-05 15:55:02 UTC) #2
tommi (sloooow) - chröme
Remove unused variable (doh!).
6 years, 9 months ago (2014-03-05 16:19:08 UTC) #3
DaleCurtis
lgtm https://codereview.chromium.org/187593004/diff/40001/media/audio/win/audio_device_listener_win.cc File media/audio/win/audio_device_listener_win.cc (right): https://codereview.chromium.org/187593004/diff/40001/media/audio/win/audio_device_listener_win.cc#newcode47 media/audio/win/audio_device_listener_win.cc:47: DVLOG(1) << "Failed to retrieve the device id: ...
6 years, 9 months ago (2014-03-06 01:46:32 UTC) #4
tommi (sloooow) - chröme
https://codereview.chromium.org/187593004/diff/40001/media/audio/win/audio_device_listener_win.cc File media/audio/win/audio_device_listener_win.cc (right): https://codereview.chromium.org/187593004/diff/40001/media/audio/win/audio_device_listener_win.cc#newcode47 media/audio/win/audio_device_listener_win.cc:47: DVLOG(1) << "Failed to retrieve the device id: " ...
6 years, 9 months ago (2014-03-06 08:15:21 UTC) #5
tommi (sloooow) - chröme
Fix whitespace
6 years, 9 months ago (2014-03-06 08:15:29 UTC) #6
DaleCurtis
Still looks good, I trust your judgement for commit. https://codereview.chromium.org/187593004/diff/40001/media/audio/win/audio_device_listener_win.cc File media/audio/win/audio_device_listener_win.cc (right): https://codereview.chromium.org/187593004/diff/40001/media/audio/win/audio_device_listener_win.cc#newcode146 media/audio/win/audio_device_listener_win.cc:146: ...
6 years, 9 months ago (2014-03-06 18:47:35 UTC) #7
tommi (sloooow) - chröme
Improve readability.
6 years, 9 months ago (2014-03-06 19:22:09 UTC) #8
tommi (sloooow) - chröme
Improve readability.
6 years, 9 months ago (2014-03-06 19:22:10 UTC) #9
tommi (sloooow) - chröme
Fix whitespace again! (not sure how it snuck back in!?)
6 years, 9 months ago (2014-03-06 19:23:20 UTC) #10
tommi (sloooow) - chröme
Fix whitespace again! (not sure how it snuck back in!?)
6 years, 9 months ago (2014-03-06 19:23:20 UTC) #11
tommi (sloooow) - chröme
https://codereview.chromium.org/187593004/diff/40001/media/audio/win/audio_device_listener_win.cc File media/audio/win/audio_device_listener_win.cc (right): https://codereview.chromium.org/187593004/diff/40001/media/audio/win/audio_device_listener_win.cc#newcode146 media/audio/win/audio_device_listener_win.cc:146: std::string& current_device_id = On 2014/03/06 18:47:36, DaleCurtis wrote: > ...
6 years, 9 months ago (2014-03-06 19:24:13 UTC) #12
tommi (sloooow) - chröme
Rebase
6 years, 9 months ago (2014-03-06 19:34:19 UTC) #13
DaleCurtis
lgtm
6 years, 9 months ago (2014-03-06 19:36:54 UTC) #14
tommi (sloooow) - chröme
The CQ bit was checked by tommi@chromium.org
6 years, 9 months ago (2014-03-06 21:45:47 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommi@chromium.org/187593004/120001
6 years, 9 months ago (2014-03-06 22:21:14 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-06 22:46:48 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 9 months ago (2014-03-06 22:46:49 UTC) #18
tommi (sloooow) - chröme
The CQ bit was checked by tommi@chromium.org
6 years, 9 months ago (2014-03-06 23:00:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommi@chromium.org/187593004/120001
6 years, 9 months ago (2014-03-06 23:03:17 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-07 07:40:58 UTC) #21
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=277014
6 years, 9 months ago (2014-03-07 07:40:59 UTC) #22
tommi (sloooow) - chröme
The CQ bit was checked by tommi@chromium.org
6 years, 9 months ago (2014-03-07 17:25:06 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommi@chromium.org/187593004/120001
6 years, 9 months ago (2014-03-07 17:27:41 UTC) #24
commit-bot: I haz the power
Change committed as 255687
6 years, 9 months ago (2014-03-07 19:42:40 UTC) #25
Nico
6 years, 5 months ago (2014-07-26 04:43:52 UTC) #26
Message was sent while issue was closed.
https://codereview.chromium.org/187593004/diff/120001/media/audio/win/audio_d...
File media/audio/win/audio_device_listener_win.cc (right):

https://codereview.chromium.org/187593004/diff/120001/media/audio/win/audio_d...
media/audio/win/audio_device_listener_win.cc:149: role == eRender ? (
this has to be eConsole,

https://codereview.chromium.org/187593004/diff/120001/media/audio/win/audio_d...
media/audio/win/audio_device_listener_win.cc:150: flow == eConsole ?
and this

https://codereview.chromium.org/187593004/diff/120001/media/audio/win/audio_d...
media/audio/win/audio_device_listener_win.cc:154: flow == eConsole ?
and this should be eRender, right?

(both have the numeric value of 0, and both enums have the same number of
elements, so it shouldn't make a difference in practice, but that's only due to
luck)

found by clang:

..\..\media\audio\win\audio_device_listener_win.cc(149,12) :  warning(clang):
comparison of two values with different enumeration types ('ERole' (aka
'__MIDL___MIDL_itf_mmdeviceapi_0000_0000_0002') and
'__MIDL___MIDL_itf_mmdeviceapi_0000_0000_0001') [-Wenum-compare]
      role == eRender ? (
      ~~~~ ^  ~~~~~~~
..\..\media\audio\win\audio_device_listener_win.cc(150,16) :  warning(clang):
comparison of two values with different enumeration types ('EDataFlow' (aka
'__MIDL___MIDL_itf_mmdeviceapi_0000_0000_0001') and
'__MIDL___MIDL_itf_mmdeviceapi_0000_0000_0002') [-Wenum-compare]
          flow == eConsole ?
          ~~~~ ^  ~~~~~~~~
..\..\media\audio\win\audio_device_listener_win.cc(154,16) :  warning(clang):
comparison of two values with different enumeration types ('EDataFlow' (aka
'__MIDL___MIDL_itf_mmdeviceapi_0000_0000_0001') and
'__MIDL___MIDL_itf_mmdeviceapi_0000_0000_0002') [-Wenum-compare]
          flow == eConsole ?
          ~~~~ ^  ~~~~~~~~
3 warnings generated.

Powered by Google App Engine
This is Rietveld 408576698