blob: c328ce0aed35babda412a2090b93684d55a21c97 [file] [log] [blame]
hayati ayguen29eb8472020-11-11 23:09:58 +01001/*
2This software is part of pffft/pfdsp, a set of simple DSP routines.
3
4Copyright (c) 2014, Andras Retzler <randras@sdr.hu>
5Copyright (c) 2020 Hayati Ayguen <h_ayguen@web.de>
6All rights reserved.
7
8Redistribution and use in source and binary forms, with or without
9modification, are permitted provided that the following conditions are met:
10 * Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 * Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15 * Neither the name of the copyright holder nor the
16 names of its contributors may be used to endorse or promote products
17 derived from this software without specific prior written permission.
18
19THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22DISCLAIMED. IN NO EVENT SHALL ANDRAS RETZLER BE LIABLE FOR ANY
23DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29*/
30
31#pragma once
32
33#include <stdio.h>
34#include <stdint.h>
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40
41/*
42 _____ _
43 / ____| | |
44 | | ___ _ __ ___ _ __ | | _____ __
45 | | / _ \| '_ ` _ \| '_ \| |/ _ \ \/ /
46 | |___| (_) | | | | | | |_) | | __/> <
47 \_____\___/|_| |_| |_| .__/|_|\___/_/\_\
48 | |
49 |_|
50*/
51
52typedef struct complexf_s { float i; float q; } complexf;
53
54
55/* generation functions */
56void generate_dc_f(float* output, int size);
57void generate_dc_s16(short* output, int size);
58void generate_pos_fs4_f(float* output, int size);
59void generate_pos_fs4_s16(short* output, int size);
60void generate_neg_fs4_f(float* output, int size);
61void generate_neg_fs4_s16(short* output, int size);
62
63void generate_dc_pos_fs4_s16(short* output, int size);
64void generate_dc_neg_fs4_s16(short* output, int size);
65void generate_pos_neg_fs4_s16(short* output, int size);
66void generate_dc_pos_neg_fs4_s16(short* output, int size);
67
68void generate_pos_neg_fs2_s16(short* output, int size);
69void generate_dc_pos_neg_fs2_s16(short* output, int size);
70
71
72#ifdef __cplusplus
73}
74#endif
75