spandsp  0.0.6
private/tone_detect.h
1 /*
2  * SpanDSP - a series of DSP components for telephony
3  *
4  * private/tone_detect.h - General telephony tone detection.
5  *
6  * Written by Steve Underwood <steveu@coppice.org>
7  *
8  * Copyright (C) 2001, 2005 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 #if !defined(_SPANDSP_PRIVATE_TONE_DETECT_H_)
27 #define _SPANDSP_PRIVATE_TONE_DETECT_H_
28 
29 #endif
30 /*- End of file ------------------------------------------------------------*/
periodogram_generate_phase_offset
float periodogram_generate_phase_offset(complexf_t *offset, float freq, int sample_rate, int interval)
Definition: tone_detect.c:277
make_goertzel_descriptor
void make_goertzel_descriptor(goertzel_descriptor_t *t, float freq, int samples)
Create a descriptor for use with either a Goertzel transform.
Definition: tone_detect.c:59
periodogram_apply
complexf_t periodogram_apply(const complexf_t coeffs[], const complexf_t sum[], const complexf_t diff[], int len)
Definition: tone_detect.c:233
tone_generate.h
goertzel_init
goertzel_state_t * goertzel_init(goertzel_state_t *s, goertzel_descriptor_t *t)
Initialise the state of a Goertzel transform.
Definition: tone_detect.c:70
complexf_t
Definition: complex.h:43
goertzel_result
float goertzel_result(goertzel_state_t *s)
Evaluate the final result of a Goertzel transform.
Definition: tone_detect.c:156
goertzel_update
int goertzel_update(goertzel_state_t *s, const int16_t amp[], int samples)
Update the state of a Goertzel transform.
Definition: tone_detect.c:119
periodogram_prepare
int periodogram_prepare(complexf_t sum[], complexf_t diff[], const complexf_t amp[], int len)
Definition: tone_detect.c:220
complex.h
complexf_t::im
float im
Imaginary part.
Definition: complex.h:47
goertzel_state_s
Definition: tone_detect.h:46
goertzel_descriptor_s
Definition: tone_detect.h:33
periodogram
complexf_t periodogram(const complexf_t coeffs[], const complexf_t amp[], int len)
Definition: tone_detect.c:201
periodogram_generate_coeffs
int periodogram_generate_coeffs(complexf_t coeffs[], float freq, int sample_rate, int window_len)
Definition: tone_detect.c:248
complexf_t::re
float re
Real part.
Definition: complex.h:45
periodogram_freq_error
float periodogram_freq_error(const complexf_t *phase_offset, float scale, const complexf_t *last_result, const complexf_t *result)
Definition: tone_detect.c:289
goertzel_reset
void goertzel_reset(goertzel_state_t *s)
Reset the state of a Goertzel transform.
Definition: tone_detect.c:106