spandsp  3.0.0
private/agc_float.h
Go to the documentation of this file.
1 /*
2  * SpanDSP - a series of DSP components for telephony
3  *
4  * private/agcf.h - Floating point automatic gain control for modems.
5  *
6  * Written by Steve Underwood <steveu@coppice.org>
7  *
8  * Copyright (C) 2024 Steve Underwood
9  *
10  * All rights reserved.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 2.1,
14  * as published by the Free Software Foundation.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this program; if not, write to the Free Software
23  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25 
26 /*! \file */
27 
28 #if !defined(_SPANDSP_PRIVATE_AGCF_H_)
29 #define _SPANDSP_PRIVATE_AGCF_H_
30 
32 {
33  agcf_descriptor_t desc;
34 
35  /* Used for DC blocking */
36  float dc_block_x;
37  float dc_block_y;
38 
39  float gain;
40 
41  float current_energy;
42  int current_samples;
43  float last_power;
44 
45  int8_t signal_on_persistence;
46  int8_t signal_off_persistence;
47 
48  /* True if the AGC should be adapting */
49  bool adapt;
50  /* True if the AGC should be detecting a signal */
51  bool detect;
52  bool scale_signal;
53  bool signal_present;
54 
55  /*! */
56  logging_state_t logging;
57 };
58 
59 #endif
60 /*- End of file ------------------------------------------------------------*/
Definition: agc_float.h:33
Definition: private/agc_float.h:31
Definition: private/logging.h:33