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

Side by Side Diff: remoting/host/audio_capturer_win.cc

Issue 10911271: Remove CommandLine dependency from the Linux's AudioCapturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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 "remoting/host/audio_capturer_win.h" 5 #include "remoting/host/audio_capturer_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <avrt.h> 8 #include <avrt.h>
9 #include <mmreg.h> 9 #include <mmreg.h>
10 #include <mmsystem.h> 10 #include <mmsystem.h>
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // static 272 // static
273 bool AudioCapturerWin::IsPacketOfSilence( 273 bool AudioCapturerWin::IsPacketOfSilence(
274 const int16* samples, int number_of_samples) { 274 const int16* samples, int number_of_samples) {
275 for (int i = 0; i < number_of_samples; i++) { 275 for (int i = 0; i < number_of_samples; i++) {
276 if (abs(samples[i]) > kSilenceThreshold) 276 if (abs(samples[i]) > kSilenceThreshold)
277 return false; 277 return false;
278 } 278 }
279 return true; 279 return true;
280 } 280 }
281 281
282 bool AudioCapturer::IsSupported() { 282 bool AudioCapturer::IsSupported(ChromotingHostContext* context) {
283 return true; 283 return true;
284 } 284 }
285 285
286 scoped_ptr<AudioCapturer> AudioCapturer::Create() { 286 scoped_ptr<AudioCapturer> AudioCapturer::Create(
287 ChromotingHostContext* context) {
287 return scoped_ptr<AudioCapturer>(new AudioCapturerWin()); 288 return scoped_ptr<AudioCapturer>(new AudioCapturerWin());
288 } 289 }
289 290
290 } // namespace remoting 291 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698