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

Unified Diff: webrtc/modules/audio_processing/ns/noise_suppression_x.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: Addressed review comments Created 5 years, 6 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 | « webrtc/modules/audio_processing/ns/noise_suppression.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/ns/noise_suppression_x.c
diff --git a/webrtc/modules/audio_processing/ns/noise_suppression_x.c b/webrtc/modules/audio_processing/ns/noise_suppression_x.c
index a3b6d0f3bde524aa68949ead52b7bde418e500cb..150fe608dde1f351f4bb451a5562ad5873e66ef1 100644
--- a/webrtc/modules/audio_processing/ns/noise_suppression_x.c
+++ b/webrtc/modules/audio_processing/ns/noise_suppression_x.c
@@ -16,19 +16,12 @@
#include "webrtc/modules/audio_processing/ns/nsx_core.h"
#include "webrtc/modules/audio_processing/ns/nsx_defines.h"
-int WebRtcNsx_Create(NsxHandle** nsxInst) {
+NsxHandle* WebRtcNsx_Create() {
NoiseSuppressionFixedC* self = malloc(sizeof(NoiseSuppressionFixedC));
- *nsxInst = (NsxHandle*)self;
-
- if (self != NULL) {
- WebRtcSpl_Init();
- self->real_fft = NULL;
- self->initFlag = 0;
- return 0;
- } else {
- return -1;
- }
-
+ WebRtcSpl_Init();
+ self->real_fft = NULL;
+ self->initFlag = 0;
+ return (NsxHandle*)self;
}
void WebRtcNsx_Free(NsxHandle* nsxInst) {
« no previous file with comments | « webrtc/modules/audio_processing/ns/noise_suppression.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698