blob: 452d84360fc47f3322b636eee8985bce2e0b9d5a [file] [log] [blame]
andrew@webrtc.org60730cf2014-01-07 17:45:09 +00001/*
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
14static const int kChunkSizeMs = 10;
15static const webrtc::AudioProcessing::Error kNoErr =
16 webrtc::AudioProcessing::kNoError;
17
18static 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}