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

Side by Side Diff: media/audio/win/audio_device_listener_win.cc

Issue 419323002: clang/win: Fix a few warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/nacl/nacl_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/win/audio_device_listener_win.h" 5 #include "media/audio/win/audio_device_listener_win.h"
6 6
7 #include <Audioclient.h> 7 #include <Audioclient.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 EDataFlow flow, ERole role, LPCWSTR new_default_device_id) { 139 EDataFlow flow, ERole role, LPCWSTR new_default_device_id) {
140 // Only listen for console and communication device changes. 140 // Only listen for console and communication device changes.
141 if ((role != eConsole && role != eCommunications) || 141 if ((role != eConsole && role != eCommunications) ||
142 (flow != eRender && flow != eCapture)) { 142 (flow != eRender && flow != eCapture)) {
143 return S_OK; 143 return S_OK;
144 } 144 }
145 145
146 // Grab a pointer to the appropriate ID member. 146 // Grab a pointer to the appropriate ID member.
147 // Note that there are three "?:"'s here to select the right ID. 147 // Note that there are three "?:"'s here to select the right ID.
148 std::string* current_device_id = 148 std::string* current_device_id =
149 role == eRender ? ( 149 role == eConsole ? (
tommi (sloooow) - chröme 2014/07/28 22:48:38 ehm, thanks for fixing this. Sadly (mea culpa) I'm
150 flow == eConsole ? 150 flow == eRender ?
151 &default_render_device_id_ : 151 &default_render_device_id_ :
152 &default_communications_render_device_id_ 152 &default_communications_render_device_id_
153 ) : ( 153 ) : (
154 flow == eConsole ? 154 flow == eRender ?
155 &default_capture_device_id_ : 155 &default_capture_device_id_ :
156 &default_communications_capture_device_id_ 156 &default_communications_capture_device_id_
157 ); 157 );
158 158
159 // If no device is now available, |new_default_device_id| will be NULL. 159 // If no device is now available, |new_default_device_id| will be NULL.
160 std::string new_device_id; 160 std::string new_device_id;
161 if (new_default_device_id) 161 if (new_default_device_id)
162 new_device_id = base::WideToUTF8(new_default_device_id); 162 new_device_id = base::WideToUTF8(new_default_device_id);
163 163
164 VLOG(1) << "OnDefaultDeviceChanged() " 164 VLOG(1) << "OnDefaultDeviceChanged() "
(...skipping 11 matching lines...) Expand all
176 return S_OK; 176 return S_OK;
177 177
178 // Store the new id in the member variable (that current_device_id points to). 178 // Store the new id in the member variable (that current_device_id points to).
179 *current_device_id = new_device_id; 179 *current_device_id = new_device_id;
180 listener_cb_.Run(); 180 listener_cb_.Run();
181 181
182 return S_OK; 182 return S_OK;
183 } 183 }
184 184
185 } // namespace media 185 } // namespace media
OLDNEW
« no previous file with comments | « chrome/test/nacl/nacl_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698