Chromium Code Reviews

Unified Diff: webrtc/modules/audio_processing/aec/aec_resampler.c

Issue 1175903002: audio_processing: Create now returns a pointer to the object (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: webrtc/modules/audio_processing/aec/aec_resampler.c
diff --git a/webrtc/modules/audio_processing/aec/aec_resampler.c b/webrtc/modules/audio_processing/aec/aec_resampler.c
index 8b07e165849bec68d1947e2135a8a822a4096f52..cef262edc14072e35e26f82919c605307a4d67a8 100644
--- a/webrtc/modules/audio_processing/aec/aec_resampler.c
+++ b/webrtc/modules/audio_processing/aec/aec_resampler.c
@@ -40,14 +40,8 @@ static int EstimateSkew(const int* rawSkew,
int absLimit,
float* skewEst);
-int WebRtcAec_CreateResampler(void** resampInst) {
- AecResampler* obj = malloc(sizeof(AecResampler));
- *resampInst = obj;
- if (obj == NULL) {
- return -1;
- }
-
- return 0;
+void* WebRtcAec_CreateResampler() {
+ return malloc(sizeof(AecResampler));
}
int WebRtcAec_InitResampler(void* resampInst, int deviceSampleRateHz) {

Powered by Google App Engine