-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy pathlibcsdr_gpl.h
49 lines (38 loc) · 1.95 KB
/
libcsdr_gpl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
This file is part of libcsdr.
Copyright (c) Andras Retzler, HA7ILM <[email protected]>
Copyright (c) Warren Pratt, NR0V <[email protected]>
Copyright 2006,2010,2012 Free Software Foundation, Inc.
libcsdr is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
libcsdr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with libcsdr. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifdef LIBCSDR_GPL
typedef struct shift_addition_data_s
{
float sindelta;
float cosdelta;
float rate;
} shift_addition_data_t;
shift_addition_data_t shift_addition_init(float rate);
float shift_addition_cc(complexf *input, complexf* output, int input_size, shift_addition_data_t d, float starting_phase);
float shift_addition_fc(float *input, complexf* output, int input_size, shift_addition_data_t d, float starting_phase);
void shift_addition_cc_test(shift_addition_data_t d);
float agc_ff(float* input, float* output, int input_size, float reference, float attack_rate, float decay_rate, float max_gain, short hang_time, short attack_wait_time, float gain_filter_alpha, float last_gain);
typedef struct decimating_shift_addition_status_s
{
int decimation_remain;
float starting_phase;
int output_size;
} decimating_shift_addition_status_t;
decimating_shift_addition_status_t decimating_shift_addition_cc(complexf *input, complexf* output, int input_size, shift_addition_data_t d, int decimation, decimating_shift_addition_status_t s);
shift_addition_data_t decimating_shift_addition_init(float rate, int decimation);
#endif