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

Side by Side Diff: webrtc/modules/audio_processing/aecm/echo_control_mobile.c

Issue 1856323002: Revert of Moved ring-buffer related files from common_audio to audio_processing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/audio_processing/aecm/echo_control_mobile.h" 11 #include "webrtc/modules/audio_processing/aecm/echo_control_mobile.h"
12 12
13 #ifdef AEC_DEBUG 13 #ifdef AEC_DEBUG
14 #include <stdio.h> 14 #include <stdio.h>
15 #endif 15 #endif
16 #include <stdlib.h> 16 #include <stdlib.h>
17 17
18 #include "webrtc/common_audio/ring_buffer.h"
18 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h" 19 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h"
19 #include "webrtc/modules/audio_processing/aecm/aecm_core.h" 20 #include "webrtc/modules/audio_processing/aecm/aecm_core.h"
20 #include "webrtc/modules/audio_processing/utility/ring_buffer.h"
21 21
22 #define BUF_SIZE_FRAMES 50 // buffer size (frames) 22 #define BUF_SIZE_FRAMES 50 // buffer size (frames)
23 // Maximum length of resampled signal. Must be an integer multiple of frames 23 // Maximum length of resampled signal. Must be an integer multiple of frames
24 // (ceil(1/(1 + MIN_SKEW)*2) + 1)*FRAME_LEN 24 // (ceil(1/(1 + MIN_SKEW)*2) + 1)*FRAME_LEN
25 // The factor of 2 handles wb, and the + 1 is as a safety margin 25 // The factor of 2 handles wb, and the + 1 is as a safety margin
26 #define MAX_RESAMP_LEN (5 * FRAME_LEN) 26 #define MAX_RESAMP_LEN (5 * FRAME_LEN)
27 27
28 static const size_t kBufSizeSamp = BUF_SIZE_FRAMES * FRAME_LEN; // buffer size ( samples) 28 static const size_t kBufSizeSamp = BUF_SIZE_FRAMES * FRAME_LEN; // buffer size ( samples)
29 static const int kSampMsNb = 8; // samples per ms in nb 29 static const int kSampMsNb = 8; // samples per ms in nb
30 // Target suppression levels for nlp modes 30 // Target suppression levels for nlp modes
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 nSampAdd = (int)(WEBRTC_SPL_MAX(((nSampSndCard >> 1) - nSampFar), 637 nSampAdd = (int)(WEBRTC_SPL_MAX(((nSampSndCard >> 1) - nSampFar),
638 FRAME_LEN)); 638 FRAME_LEN));
639 nSampAdd = WEBRTC_SPL_MIN(nSampAdd, maxStuffSamp); 639 nSampAdd = WEBRTC_SPL_MIN(nSampAdd, maxStuffSamp);
640 640
641 WebRtc_MoveReadPtr(aecm->farendBuf, -nSampAdd); 641 WebRtc_MoveReadPtr(aecm->farendBuf, -nSampAdd);
642 aecm->delayChange = 1; // the delay needs to be updated 642 aecm->delayChange = 1; // the delay needs to be updated
643 } 643 }
644 644
645 return 0; 645 return 0;
646 } 646 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/aecm/aecm_core_c.c ('k') | webrtc/modules/audio_processing/audio_processing.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698