| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |