1 /*
2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 // Header file including the delay estimator handle used for testing.
12 
13 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
14 #define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
15 
16 #include "webrtc/modules/audio_processing/utility/delay_estimator.h"
17 #include "webrtc/typedefs.h"
18 
19 typedef union {
20   float float_;
21   int32_t int32_;
22 } SpectrumType;
23 
24 typedef struct {
25   // Pointers to mean values of spectrum.
26   SpectrumType* mean_far_spectrum;
27   // |mean_far_spectrum| initialization indicator.
28   int far_spectrum_initialized;
29 
30   int spectrum_size;
31 
32   // Far-end part of binary spectrum based delay estimation.
33   BinaryDelayEstimatorFarend* binary_farend;
34 } DelayEstimatorFarend;
35 
36 typedef struct {
37   // Pointers to mean values of spectrum.
38   SpectrumType* mean_near_spectrum;
39   // |mean_near_spectrum| initialization indicator.
40   int near_spectrum_initialized;
41 
42   int spectrum_size;
43 
44   // Binary spectrum based delay estimator
45   BinaryDelayEstimator* binary_handle;
46 } DelayEstimator;
47 
48 #endif  // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
49