Mercurial > hg > audiostuff
comparison spandsp-0.0.6pre17/src/spandsp/fax_modems.h @ 4:26cd8f1ef0b1
import spandsp-0.0.6pre17
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 15:50:58 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:c6c5a16ce2f2 | 4:26cd8f1ef0b1 |
---|---|
1 /* | |
2 * SpanDSP - a series of DSP components for telephony | |
3 * | |
4 * fax_modems.h - definitions for the analogue modem set for fax processing | |
5 * | |
6 * Written by Steve Underwood <steveu@coppice.org> | |
7 * | |
8 * Copyright (C) 2008 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 * $Id: fax_modems.h,v 1.11 2009/04/26 12:55:23 steveu Exp $ | |
26 */ | |
27 | |
28 /*! \file */ | |
29 | |
30 #if !defined(_SPANDSP_FAX_MODEMS_H_) | |
31 #define _SPANDSP_FAX_MODEMS_H_ | |
32 | |
33 enum | |
34 { | |
35 FAX_MODEM_NONE = -1, | |
36 FAX_MODEM_FLUSH = 0, | |
37 FAX_MODEM_SILENCE_TX, | |
38 FAX_MODEM_SILENCE_RX, | |
39 FAX_MODEM_CED_TONE, | |
40 FAX_MODEM_CNG_TONE, | |
41 FAX_MODEM_NOCNG_TONE, | |
42 FAX_MODEM_V21_TX, | |
43 FAX_MODEM_V17_TX, | |
44 FAX_MODEM_V27TER_TX, | |
45 FAX_MODEM_V29_TX, | |
46 FAX_MODEM_V21_RX, | |
47 FAX_MODEM_V17_RX, | |
48 FAX_MODEM_V27TER_RX, | |
49 FAX_MODEM_V29_RX | |
50 }; | |
51 | |
52 /*! | |
53 The set of modems needed for FAX, plus the auxilliary stuff, like tone generation. | |
54 */ | |
55 typedef struct fax_modems_state_s fax_modems_state_t; | |
56 | |
57 #if defined(__cplusplus) | |
58 extern "C" | |
59 { | |
60 #endif | |
61 | |
62 /* N.B. the following are currently a work in progress */ | |
63 SPAN_DECLARE(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len); | |
64 SPAN_DECLARE(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t amp[], int len); | |
65 SPAN_DECLARE(int) fax_modems_v29_v21_rx(void *user_data, const int16_t amp[], int len); | |
66 SPAN_DECLARE(int) fax_modems_v17_v21_rx_fillin(void *user_data, int len); | |
67 SPAN_DECLARE(int) fax_modems_v27ter_v21_rx_fillin(void *user_data, int len); | |
68 SPAN_DECLARE(int) fax_modems_v29_v21_rx_fillin(void *user_data, int len); | |
69 SPAN_DECLARE(void) fax_modems_start_rx_modem(fax_modems_state_t *s, int which); | |
70 | |
71 SPAN_DECLARE(void) fax_modems_set_tep_mode(fax_modems_state_t *s, int use_tep); | |
72 | |
73 SPAN_DECLARE(fax_modems_state_t *) fax_modems_init(fax_modems_state_t *s, | |
74 int use_tep, | |
75 hdlc_frame_handler_t hdlc_accept, | |
76 hdlc_underflow_handler_t hdlc_tx_underflow, | |
77 put_bit_func_t non_ecm_put_bit, | |
78 get_bit_func_t non_ecm_get_bit, | |
79 tone_report_func_t tone_callback, | |
80 void *user_data); | |
81 | |
82 SPAN_DECLARE(int) fax_modems_release(fax_modems_state_t *s); | |
83 | |
84 SPAN_DECLARE(int) fax_modems_free(fax_modems_state_t *s); | |
85 | |
86 #if defined(__cplusplus) | |
87 } | |
88 #endif | |
89 | |
90 #endif | |
91 /*- End of file ------------------------------------------------------------*/ |