spandsp  0.0.6
private/super_tone_tx.h
1 /*
2  * SpanDSP - a series of DSP components for telephony
3  *
4  * private/super_tone_tx.h - Flexible telephony supervisory tone generation.
5  *
6  * Written by Steve Underwood <steveu@coppice.org>
7  *
8  * Copyright (C) 2001 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_SUPER_TONE_TX_H_)
27 #define _SPANDSP_PRIVATE_SUPER_TONE_TX_H_
28 
30 {
32  int tone_on;
33  int length;
34  int cycles;
37 };
38 
40 {
42  uint32_t phase[4];
43  int current_position;
44  int level;
45  super_tone_tx_step_t *levels[4];
46  int cycles[4];
47 };
48 
49 #endif
50 /*- End of file ------------------------------------------------------------*/
tone_generate.h
super_tone_rx_init
super_tone_rx_state_t * super_tone_rx_init(super_tone_rx_state_t *s, super_tone_rx_descriptor_t *desc, tone_report_func_t callback, void *user_data)
Definition: super_tone_rx.c:255
super_tone_rx_add_tone
int super_tone_rx_add_tone(super_tone_rx_descriptor_t *desc)
Definition: super_tone_rx.c:106
super_tone_rx
int super_tone_rx(super_tone_rx_state_t *s, const int16_t amp[], int samples)
Apply supervisory tone detection processing to a block of audio samples.
Definition: super_tone_rx.c:445
dds_phase_rate
int32_t dds_phase_rate(float frequency)
Find the phase rate value to achieve a particular frequency.
Definition: dds_int.c:316
dds_phase_ratef
int32_t dds_phase_ratef(float frequency)
Find the phase rate equivalent to a frequency, in Hz.
Definition: dds_float.c:2109
dds_scaling_dbm0
int16_t dds_scaling_dbm0(float level)
Find the scaling factor needed to achieve a specified level in dBm0.
Definition: dds_int.c:328
super_tone_rx_descriptor_s
Definition: private/super_tone_rx.h:41
awgn_state_s
Definition: private/awgn.h:33
super_tone_tx_step_s
Definition: private/super_tone_tx.h:30
super_tone_tx_state_s
Definition: private/super_tone_tx.h:40
super_tone_rx_add_element
int super_tone_rx_add_element(super_tone_rx_descriptor_t *desc, int tone, int f1, int f2, int min, int max)
Definition: super_tone_rx.c:120
complex.h
super_tone_rx_free
int super_tone_rx_free(super_tone_rx_state_t *s)
Definition: super_tone_rx.c:301
super_tone_rx_make_descriptor
super_tone_rx_descriptor_t * super_tone_rx_make_descriptor(super_tone_rx_descriptor_t *desc)
Definition: super_tone_rx.c:198
super_tone_rx_state_s
Definition: private/super_tone_rx.h:52
super_tone_rx_segment_s
Definition: private/super_tone_rx.h:32
super_tone_rx_tone_callback
void super_tone_rx_tone_callback(super_tone_rx_state_t *s, tone_report_func_t callback, void *user_data)
Definition: super_tone_rx.c:239
dds
int16_t dds(uint32_t *phase_acc, int32_t phase_rate)
Generate an integer tone sample.
Definition: dds_int.c:368
super_tone_tx_init
super_tone_tx_state_t * super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree)
Initialise a supervisory tone generator.
Definition: super_tone_tx.c:130
tone_gen_tone_descriptor_s
Definition: private/tone_generate.h:30
dds_modf
float dds_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
Generate a floating point tone sample, with modulation.
Definition: dds_float.c:2155
spandsp-sim.h
super_tone_rx_segment_callback
void super_tone_rx_segment_callback(super_tone_rx_state_t *s, tone_segment_func_t callback)
Definition: super_tone_rx.c:248
dds_scaling_dbm0f
float dds_scaling_dbm0f(float level)
Find the scaling factor equivalent to a dBm0 value.
Definition: dds_float.c:2121
super_tone_tx
int super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max_samples)
Generate a block of audio samples for a supervisory tone pattern.
Definition: super_tone_tx.c:163
dds.h