| Index: webrtc/modules/audio_processing/logging/aec_logging.h
|
| diff --git a/webrtc/modules/audio_processing/logging/aec_logging.h b/webrtc/modules/audio_processing/logging/aec_logging.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..14a7d2c894373c48d166c2291c5eff1a3336b674
|
| --- /dev/null
|
| +++ b/webrtc/modules/audio_processing/logging/aec_logging.h
|
| @@ -0,0 +1,85 @@
|
| +/*
|
| + * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license
|
| + * that can be found in the LICENSE file in the root of the source
|
| + * tree. An additional intellectual property rights grant can be found
|
| + * in the file PATENTS. All contributing project authors may
|
| + * be found in the AUTHORS file in the root of the source tree.
|
| + */
|
| +
|
| +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_LOGGING_
|
| +#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_LOGGING_
|
| +
|
| +
|
| +// To enable AEC logging, run this command from trunk/ :
|
| +// python webrtc/build/gyp_webrtc.py -Daec_debug_dump=1
|
| +#ifdef WEBRTC_AEC_DEBUG_DUMP
|
| +#include <stdio.h>
|
| +#include "webrtc/modules/audio_processing/logging/aec_logging_file_handling.h"
|
| +#endif
|
| +
|
| +
|
| +#ifndef WEBRTC_AEC_DEBUG_DUMP
|
| +
|
| +// Dump wav data to file
|
| +#define WEBRTC_AEC_DEBUG_WAV_WRITE(file, data, numSamples)
|
| +
|
| +// (Re)open wav file for writing using the specified sample rate
|
| +#define WEBRTC_AEC_DEBUG_WAV_REOPEN(wavFile, name, seq1, seq2, sampleRate)
|
| +
|
| +// Close wav file
|
| +#define WEBRTC_AEC_DEBUG_WAV_CLOSE(wavFile)
|
| +
|
| +// Dump raw data to file
|
| +#define WEBRTC_AEC_DEBUG_RAW_WRITE(file, data, dataSize)
|
| +
|
| +// Open raw data file for writing using the specified sample rate
|
| +#define WEBRTC_AEC_DEBUG_RAW_OPEN(file, name, instanceCtr)
|
| +
|
| +// Close raw data file
|
| +#define WEBRTC_AEC_DEBUG_RAW_CLOSE(file)
|
| +
|
| +#else // WEBRTC_AEC_DEBUG_DUMP
|
| +
|
| +// Dump wav data to file
|
| +#define WEBRTC_AEC_DEBUG_WAV_WRITE(file, data, numSamples) \
|
| + do { \
|
| + rtc_WavWriteSamples(file, data, numSamples); \
|
| + } while (0);
|
| +
|
| +// (Re)open wav file for writing using the specified sample rate
|
| +#define WEBRTC_AEC_DEBUG_WAV_REOPEN(wavFile, name, seq1, seq2, sampleRate) \
|
| + do { \
|
| + WebRtcAec_ReopenWav((wavFile), (name), (seq1), (seq2), (sampleRate)); \
|
| + } while (0);
|
| +
|
| +// Close wav file
|
| +#define WEBRTC_AEC_DEBUG_WAV_CLOSE(wavFile) \
|
| + do { \
|
| + rtc_WavClose((wavFile)); \
|
| + } while (0);
|
| +
|
| +// Dump raw data to file
|
| +#define WEBRTC_AEC_DEBUG_RAW_WRITE(file, data, dataSize) \
|
| + do { \
|
| + (void)fwrite((data), (dataSize) , 1, (file)); \
|
| + } while (0);
|
| +
|
| +// Open raw data file for writing using the specified sample rate
|
| +#define WEBRTC_AEC_DEBUG_RAW_OPEN(file, name, instanceCtr) \
|
| + do { \
|
| + WebRtcAec_RawFileOpen((file), (name), (instanceCtr)); \
|
| + } while (0);
|
| +
|
| +
|
| +// Close raw data file
|
| +#define WEBRTC_AEC_DEBUG_RAW_CLOSE(file) \
|
| + do { \
|
| + fclose((file)); \
|
| + } while (0);
|
| +
|
| +
|
| +
|
| +#endif // WEBRTC_AEC_DEBUG_DUMP
|
| +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_LOGGING_
|
|
|