1 /* $Id: isdn_audio.h,v 1.7 1999/04/12 12:33:11 fritz Exp $
3 * Linux ISDN subsystem, audio conversion and compression (linklevel).
5 * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * $Log: isdn_audio.h,v $
22 * Revision 1.7 1999/04/12 12:33:11 fritz
23 * Changes from 2.0 tree.
25 * Revision 1.6 1998/07/26 18:48:44 armin
26 * Added silence detection in voice receive mode.
28 * Revision 1.5 1997/02/03 22:45:21 fritz
29 * Reformatted according CodingStyle
31 * Revision 1.4 1996/06/06 14:43:32 fritz
32 * Changed to support DTMF decoding on audio playback also.
34 * Revision 1.3 1996/06/05 02:24:09 fritz
35 * Added DTMF decoder for audio mode.
37 * Revision 1.2 1996/05/10 08:48:32 fritz
38 * Corrected adpcm bugs.
40 * Revision 1.1 1996/04/30 09:29:06 fritz
41 * Taken under CVS control.
45 #define DTMF_NPOINTS 205 /* Number of samples for DTMF recognition */
46 typedef struct adpcm_state
{
54 typedef struct dtmf_state
{
57 int buf
[DTMF_NPOINTS
];
60 typedef struct silence_state
{
65 extern void isdn_audio_ulaw2alaw(unsigned char *, unsigned long);
66 extern void isdn_audio_alaw2ulaw(unsigned char *, unsigned long);
67 extern adpcm_state
*isdn_audio_adpcm_init(adpcm_state
*, int);
68 extern int isdn_audio_adpcm2xlaw(adpcm_state
*, int, unsigned char *, unsigned char *, int);
69 extern int isdn_audio_xlaw2adpcm(adpcm_state
*, int, unsigned char *, unsigned char *, int);
70 extern int isdn_audio_2adpcm_flush(adpcm_state
* s
, unsigned char *out
);
71 extern void isdn_audio_calc_dtmf(modem_info
*, unsigned char *, int, int);
72 extern void isdn_audio_eval_dtmf(modem_info
*);
73 dtmf_state
*isdn_audio_dtmf_init(dtmf_state
*);
74 extern void isdn_audio_calc_silence(modem_info
*, unsigned char *, int, int);
75 extern void isdn_audio_eval_silence(modem_info
*);
76 silence_state
*isdn_audio_silence_init(silence_state
*);