andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
| 21 | namespace webrtc |
| 22 | { |
| 23 | |
| 24 | class Module; |
| 25 | |
| 26 | namespace voe |
| 27 | { |
| 28 | |
| 29 | class Utility |
| 30 | { |
| 31 | public: |
| 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 |