summaryrefslogtreecommitdiff
path: root/voice_engine/utility.h
diff options
context:
space:
mode:
authorandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2012-10-22 18:19:23 +0000
committerandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2012-10-22 18:19:23 +0000
commitb015cbede88899f67a53fbbe581b02ce8e327949 (patch)
tree530a64a3cfdbbabacab974c183326517d49e761e /voice_engine/utility.h
downloadwebrtc-b015cbede88899f67a53fbbe581b02ce8e327949.tar.gz
Move src/ -> webrtc/
TBR=niklas.enbom@webrtc.org Review URL: https://webrtc-codereview.appspot.com/915006 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/utility.h')
-rw-r--r--voice_engine/utility.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/voice_engine/utility.h b/voice_engine/utility.h
new file mode 100644
index 00000000..a8af8bde
--- /dev/null
+++ b/voice_engine/utility.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+/*
+ * Contains functions often used by different parts of VoiceEngine.
+ */
+
+#ifndef WEBRTC_VOICE_ENGINE_UTILITY_H
+#define WEBRTC_VOICE_ENGINE_UTILITY_H
+
+#include "typedefs.h"
+#include "voice_engine_defines.h"
+
+namespace webrtc
+{
+
+class Module;
+
+namespace voe
+{
+
+class Utility
+{
+public:
+ static void MixWithSat(WebRtc_Word16 target[],
+ int target_channel,
+ const WebRtc_Word16 source[],
+ int source_channel,
+ int source_len);
+
+ static void MixSubtractWithSat(WebRtc_Word16 target[],
+ const WebRtc_Word16 source[],
+ WebRtc_UWord16 len);
+
+ static void MixAndScaleWithSat(WebRtc_Word16 target[],
+ const WebRtc_Word16 source[],
+ float scale,
+ WebRtc_UWord16 len);
+
+ static void Scale(WebRtc_Word16 vector[], float scale, WebRtc_UWord16 len);
+
+ static void ScaleWithSat(WebRtc_Word16 vector[],
+ float scale,
+ WebRtc_UWord16 len);
+};
+
+} // namespace voe
+
+} // namespace webrtc
+
+#endif // WEBRTC_VOICE_ENGINE_UTILITY_H