Chromium Code Reviews| Index: remoting/host/audio_capturer.cc |
| diff --git a/remoting/host/audio_capturer.cc b/remoting/host/audio_capturer.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3c073520d91ac0f42020fd316b3dae7886d39b75 |
| --- /dev/null |
| +++ b/remoting/host/audio_capturer.cc |
| @@ -0,0 +1,22 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "remoting/host/audio_capturer.h" |
| + |
| +#include "remoting/proto/audio.pb.h" |
| + |
| +namespace remoting { |
| + |
| +bool AudioCapturer::IsValidSampleRate(int sample_rate) { |
| + switch (sample_rate) { |
| + case AudioPacket::SAMPLING_RATE_44100: |
| + // Intentional fall-through. |
|
Sergey Ulanov
2012/07/26 03:40:24
it would be more readable without this comment. Su
kxing
2012/07/26 22:47:17
Done.
|
| + case AudioPacket::SAMPLING_RATE_48000: |
| + return true; |
| + default: |
| + return false; |
| + } |
| +} |
| + |
| +} // namespace remoting |