blob: a8af8bdef5d4184ae70a09d988ed094ebb45d9b0 [file] [log] [blame]
andrew@webrtc.orga7b57da2012-10-22 18:19:23 +00001/*
2 * Copyright (c) 2012 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/*
12 * Contains functions often used by different parts of VoiceEngine.
13 */
14
15#ifndef WEBRTC_VOICE_ENGINE_UTILITY_H
16#define WEBRTC_VOICE_ENGINE_UTILITY_H
17
18#include "typedefs.h"
19#include "voice_engine_defines.h"
20
21namespace webrtc
22{
23
24class Module;
25
26namespace voe
27{
28
29class Utility
30{
31public:
32 static void MixWithSat(WebRtc_Word16 target[],
33 int target_channel,
34 const WebRtc_Word16 source[],
35 int source_channel,
36 int source_len);
37
38 static void MixSubtractWithSat(WebRtc_Word16 target[],
39 const WebRtc_Word16 source[],
40 WebRtc_UWord16 len);
41
42 static void MixAndScaleWithSat(WebRtc_Word16 target[],
43 const WebRtc_Word16 source[],
44 float scale,
45 WebRtc_UWord16 len);
46
47 static void Scale(WebRtc_Word16 vector[], float scale, WebRtc_UWord16 len);
48
49 static void ScaleWithSat(WebRtc_Word16 vector[],
50 float scale,
51 WebRtc_UWord16 len);
52};
53
54} // namespace voe
55
56} // namespace webrtc
57
58#endif // WEBRTC_VOICE_ENGINE_UTILITY_H