andrew@webrtc.org | 60730cf | 2014-01-07 17:45:09 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 12 | #include "webrtc/modules/interface/module_common_types.h" |
| 13 | |
| 14 | static const int kChunkSizeMs = 10; |
| 15 | static const webrtc::AudioProcessing::Error kNoErr = |
| 16 | webrtc::AudioProcessing::kNoError; |
| 17 | |
| 18 | static void SetFrameSampleRate(webrtc::AudioFrame* frame, int sample_rate_hz) { |
| 19 | frame->sample_rate_hz_ = sample_rate_hz; |
| 20 | frame->samples_per_channel_ = kChunkSizeMs * sample_rate_hz / 1000; |
| 21 | } |