| Index: webrtc/modules/audio_processing/aec/echo_cancellation.cc
|
| diff --git a/webrtc/modules/audio_processing/aec/echo_cancellation.cc b/webrtc/modules/audio_processing/aec/echo_cancellation.cc
|
| index 9261632c17d799df935a6fce20926b44d400ddc4..8a038ae3f4d7256683cc2dc8e1b70e7b2968876d 100644
|
| --- a/webrtc/modules/audio_processing/aec/echo_cancellation.cc
|
| +++ b/webrtc/modules/audio_processing/aec/echo_cancellation.cc
|
| @@ -124,19 +124,19 @@ void* WebRtcAec_Create() {
|
| Aec* aecpc = new Aec();
|
|
|
| if (!aecpc) {
|
| - return NULL;
|
| + return nullptr;
|
| }
|
| aecpc->data_dumper.reset(new ApmDataDumper(aecpc->instance_count));
|
|
|
| aecpc->aec = WebRtcAec_CreateAec(aecpc->instance_count);
|
| if (!aecpc->aec) {
|
| WebRtcAec_Free(aecpc);
|
| - return NULL;
|
| + return nullptr;
|
| }
|
| aecpc->resampler = WebRtcAec_CreateResampler();
|
| if (!aecpc->resampler) {
|
| WebRtcAec_Free(aecpc);
|
| - return NULL;
|
| + return nullptr;
|
| }
|
| // Create far-end pre-buffer. The buffer size has to be large enough for
|
| // largest possible drift compensation (kResamplerBufferSize) + "almost" an
|
| @@ -145,7 +145,7 @@ void* WebRtcAec_Create() {
|
| WebRtc_CreateBuffer(PART_LEN2 + kResamplerBufferSize, sizeof(float));
|
| if (!aecpc->far_pre_buf) {
|
| WebRtcAec_Free(aecpc);
|
| - return NULL;
|
| + return nullptr;
|
| }
|
|
|
| aecpc->initFlag = 0;
|
| @@ -157,7 +157,7 @@ void* WebRtcAec_Create() {
|
| void WebRtcAec_Free(void* aecInst) {
|
| Aec* aecpc = reinterpret_cast<Aec*>(aecInst);
|
|
|
| - if (aecpc == NULL) {
|
| + if (aecpc == nullptr) {
|
| return;
|
| }
|
|
|
| @@ -300,7 +300,7 @@ int32_t WebRtcAec_BufferFarend(void* aecInst,
|
| while (WebRtc_available_read(aecpc->far_pre_buf) >= PART_LEN2) {
|
| // We have enough data to pass to the FFT, hence read PART_LEN2 samples.
|
| {
|
| - float* ptmp = NULL;
|
| + float* ptmp = nullptr;
|
| float tmp[PART_LEN2];
|
| WebRtc_ReadBuffer(aecpc->far_pre_buf,
|
| reinterpret_cast<void**>(&ptmp), tmp, PART_LEN2);
|
| @@ -324,7 +324,7 @@ int32_t WebRtcAec_Process(void* aecInst,
|
| Aec* aecpc = reinterpret_cast<Aec*>(aecInst);
|
| int32_t retVal = 0;
|
|
|
| - if (out == NULL) {
|
| + if (out == nullptr) {
|
| return AEC_NULL_POINTER_ERROR;
|
| }
|
|
|
| @@ -393,7 +393,7 @@ int WebRtcAec_set_config(void* handle, AecConfig config) {
|
|
|
| int WebRtcAec_get_echo_status(void* handle, int* status) {
|
| Aec* self = reinterpret_cast<Aec*>(handle);
|
| - if (status == NULL) {
|
| + if (status == nullptr) {
|
| return AEC_NULL_POINTER_ERROR;
|
| }
|
| if (self->initFlag != initCheck) {
|
| @@ -414,10 +414,10 @@ int WebRtcAec_GetMetrics(void* handle, AecMetrics* metrics) {
|
| Stats erle;
|
| Stats a_nlp;
|
|
|
| - if (handle == NULL) {
|
| + if (handle == nullptr) {
|
| return -1;
|
| }
|
| - if (metrics == NULL) {
|
| + if (metrics == nullptr) {
|
| return AEC_NULL_POINTER_ERROR;
|
| }
|
| if (self->initFlag != initCheck) {
|
| @@ -506,10 +506,10 @@ int WebRtcAec_GetDelayMetrics(void* handle,
|
| int* std,
|
| float* fraction_poor_delays) {
|
| Aec* self = reinterpret_cast<Aec*>(handle);
|
| - if (median == NULL) {
|
| + if (median == nullptr) {
|
| return AEC_NULL_POINTER_ERROR;
|
| }
|
| - if (std == NULL) {
|
| + if (std == nullptr) {
|
| return AEC_NULL_POINTER_ERROR;
|
| }
|
| if (self->initFlag != initCheck) {
|
| @@ -526,7 +526,7 @@ int WebRtcAec_GetDelayMetrics(void* handle,
|
|
|
| AecCore* WebRtcAec_aec_core(void* handle) {
|
| if (!handle) {
|
| - return NULL;
|
| + return nullptr;
|
| }
|
| return reinterpret_cast<Aec*>(handle)->aec;
|
| }
|
|
|