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 MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
14 #define MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
15 
16 #include "modules/audio_processing/utility/delay_estimator.h"
17 
18 namespace webrtc {
19 
20 typedef union {
21   float float_;
22   int32_t int32_;
23 } SpectrumType;
24 
25 typedef struct {
26   // Pointers to mean values of spectrum.
27   SpectrumType* mean_far_spectrum;
28   // |mean_far_spectrum| initialization indicator.
29   int far_spectrum_initialized;
30 
31   int spectrum_size;
32 
33   // Far-end part of binary spectrum based delay estimation.
34   BinaryDelayEstimatorFarend* binary_farend;
35 } DelayEstimatorFarend;
36 
37 typedef struct {
38   // Pointers to mean values of spectrum.
39   SpectrumType* mean_near_spectrum;
40   // |mean_near_spectrum| initialization indicator.
41   int near_spectrum_initialized;
42 
43   int spectrum_size;
44 
45   // Binary spectrum based delay estimator
46   BinaryDelayEstimator* binary_handle;
47 } DelayEstimator;
48 
49 }  // namespace webrtc
50 
51 #endif  // MODULES_AUDIO_PROCESSING_UTILITY_DELAY_ESTIMATOR_INTERNAL_H_
52