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

Unified Diff: webrtc/modules/audio_processing/aecm/aecm_core.cc

Issue 1857153002: Changed AECM to be built using C++ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added external declaration to the delay estimator wrapper inclusion 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/aecm/aecm_core.cc
diff --git a/webrtc/modules/audio_processing/aecm/aecm_core.c b/webrtc/modules/audio_processing/aecm/aecm_core.cc
similarity index 99%
rename from webrtc/modules/audio_processing/aecm/aecm_core.c
rename to webrtc/modules/audio_processing/aecm/aecm_core.cc
index 6bf1cf7f3eff1c55b780545ec1c4878e0b0e073d..5c3db1a29488d384b6764952c9565c493afe1000 100644
--- a/webrtc/modules/audio_processing/aecm/aecm_core.c
+++ b/webrtc/modules/audio_processing/aecm/aecm_core.cc
@@ -14,12 +14,13 @@
#include <stddef.h>
#include <stdlib.h>
+extern "C" {
#include "webrtc/common_audio/ring_buffer.h"
#include "webrtc/common_audio/signal_processing/include/real_fft.h"
#include "webrtc/modules/audio_processing/aecm/echo_control_mobile.h"
#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
-#include "webrtc/system_wrappers/include/compile_assert_c.h"
#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
+}
#include "webrtc/typedefs.h"
#ifdef AEC_DEBUG
@@ -208,7 +209,7 @@ StoreAdaptiveChannel WebRtcAecm_StoreAdaptiveChannel;
ResetAdaptiveChannel WebRtcAecm_ResetAdaptiveChannel;
AecmCore* WebRtcAecm_CreateCore() {
- AecmCore* aecm = malloc(sizeof(AecmCore));
+ AecmCore* aecm = static_cast<AecmCore*>(malloc(sizeof(AecmCore)));
aecm->farFrameBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN,
sizeof(int16_t));
@@ -501,7 +502,7 @@ int WebRtcAecm_InitCore(AecmCore* const aecm, int samplingFreq) {
// Assert a preprocessor definition at compile-time. It's an assumption
// used in assembly code, so check the assembly files before any change.
- COMPILE_ASSERT(PART_LEN % 16 == 0);
+ static_assert(PART_LEN % 16 == 0, "PART_LEN is not a multiple of 16");
// Initialize function pointers.
WebRtcAecm_CalcLinearEnergies = CalcLinearEnergiesC;
« no previous file with comments | « webrtc/modules/audio_processing/aecm/aecm_core.c ('k') | webrtc/modules/audio_processing/aecm/aecm_core_c.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698