Corresponds to upstream commit 524e9b043e7e86fd72353b987c9d5f6a1ebf83e1 Update notes: * Pull in third party license file * Replace .gypi files with BUILD.gn to keep track of what changes upstream * Bunch of new filse pulled in as dependencies * Won't build yet due to changes needed on top of these
87 lines
3.1 KiB
C
87 lines
3.1 KiB
C
/*
|
|
* Copyright (c) 2015 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_
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "webrtc/modules/audio_processing/logging/aec_logging_file_handling.h"
|
|
|
|
// To enable AEC logging, invoke GYP with -Daec_debug_dump=1.
|
|
#ifdef WEBRTC_AEC_DEBUG_DUMP
|
|
// Dumps a wav data to file.
|
|
#define RTC_AEC_DEBUG_WAV_WRITE(file, data, num_samples) \
|
|
do { \
|
|
rtc_WavWriteSamples(file, data, num_samples); \
|
|
} while (0)
|
|
|
|
// (Re)opens a wav file for writing using the specified sample rate.
|
|
#define RTC_AEC_DEBUG_WAV_REOPEN(name, instance_index, process_rate, \
|
|
sample_rate, wav_file) \
|
|
do { \
|
|
WebRtcAec_ReopenWav(name, instance_index, process_rate, sample_rate, \
|
|
wav_file); \
|
|
} while (0)
|
|
|
|
// Closes a wav file.
|
|
#define RTC_AEC_DEBUG_WAV_CLOSE(wav_file) \
|
|
do { \
|
|
rtc_WavClose(wav_file); \
|
|
} while (0)
|
|
|
|
// Dumps a raw data to file.
|
|
#define RTC_AEC_DEBUG_RAW_WRITE(file, data, data_size) \
|
|
do { \
|
|
(void) fwrite(data, data_size, 1, file); \
|
|
} while (0)
|
|
|
|
// Opens a raw data file for writing using the specified sample rate.
|
|
#define RTC_AEC_DEBUG_RAW_OPEN(name, instance_counter, file) \
|
|
do { \
|
|
WebRtcAec_RawFileOpen(name, instance_counter, file); \
|
|
} while (0)
|
|
|
|
// Closes a raw data file.
|
|
#define RTC_AEC_DEBUG_RAW_CLOSE(file) \
|
|
do { \
|
|
fclose(file); \
|
|
} while (0)
|
|
|
|
#else // RTC_AEC_DEBUG_DUMP
|
|
#define RTC_AEC_DEBUG_WAV_WRITE(file, data, num_samples) \
|
|
do { \
|
|
} while (0)
|
|
|
|
#define RTC_AEC_DEBUG_WAV_REOPEN(wav_file, name, instance_index, process_rate, \
|
|
sample_rate) \
|
|
do { \
|
|
} while (0)
|
|
|
|
#define RTC_AEC_DEBUG_WAV_CLOSE(wav_file) \
|
|
do { \
|
|
} while (0)
|
|
|
|
#define RTC_AEC_DEBUG_RAW_WRITE(file, data, data_size) \
|
|
do { \
|
|
} while (0)
|
|
|
|
#define RTC_AEC_DEBUG_RAW_OPEN(file, name, instance_counter) \
|
|
do { \
|
|
} while (0)
|
|
|
|
#define RTC_AEC_DEBUG_RAW_CLOSE(file) \
|
|
do { \
|
|
} while (0)
|
|
|
|
#endif // WEBRTC_AEC_DEBUG_DUMP
|
|
|
|
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_LOGGING_
|