Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(819)

Unified Diff: voice_engine/utility.cc

Issue 3013033002: Remove VoEFile (Closed)
Patch Set: rebase Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « voice_engine/utility.h ('k') | voice_engine/voe_base_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: voice_engine/utility.cc
diff --git a/voice_engine/utility.cc b/voice_engine/utility.cc
index bd9ea8b1e37bb20ec3d2767beb5fab28090122a4..ecc3e223f48d406f883fc1bd9f6315dd018b3af4 100644
--- a/voice_engine/utility.cc
+++ b/voice_engine/utility.cc
@@ -88,41 +88,5 @@ void RemixAndResample(const int16_t* src_data,
}
}
-void MixWithSat(int16_t target[],
- size_t target_channel,
- const int16_t source[],
- size_t source_channel,
- size_t source_len) {
- RTC_DCHECK_GE(target_channel, 1);
- RTC_DCHECK_LE(target_channel, 2);
- RTC_DCHECK_GE(source_channel, 1);
- RTC_DCHECK_LE(source_channel, 2);
-
- if (target_channel == 2 && source_channel == 1) {
- // Convert source from mono to stereo.
- int32_t left = 0;
- int32_t right = 0;
- for (size_t i = 0; i < source_len; ++i) {
- left = source[i] + target[i * 2];
- right = source[i] + target[i * 2 + 1];
- target[i * 2] = WebRtcSpl_SatW32ToW16(left);
- target[i * 2 + 1] = WebRtcSpl_SatW32ToW16(right);
- }
- } else if (target_channel == 1 && source_channel == 2) {
- // Convert source from stereo to mono.
- int32_t temp = 0;
- for (size_t i = 0; i < source_len / 2; ++i) {
- temp = ((source[i * 2] + source[i * 2 + 1]) >> 1) + target[i];
- target[i] = WebRtcSpl_SatW32ToW16(temp);
- }
- } else {
- int32_t temp = 0;
- for (size_t i = 0; i < source_len; ++i) {
- temp = source[i] + target[i];
- target[i] = WebRtcSpl_SatW32ToW16(temp);
- }
- }
-}
-
} // namespace voe
} // namespace webrtc
« no previous file with comments | « voice_engine/utility.h ('k') | voice_engine/voe_base_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698