• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Siren Encoder/Decoder library
3  *
4  *   @author: Youness Alaoui <kakaroto@kakaroto.homelinux.net>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 
23 #ifndef _SIREN_ENCODER_H
24 #define _SIREN_ENCODER_H
25 
26 #include <math.h>
27 #include <stdlib.h>
28 #include <string.h>
29 #include "dct4.h"
30 #include "rmlt.h"
31 #include "huffman.h"
32 #include "common.h"
33 
34 
35 typedef struct stSirenEncoder {
36 	int sample_rate;
37 	SirenWavHeader WavHeader;
38 	float context[320];
39 } * SirenEncoder;
40 
41 /* sample_rate MUST be 16000 to be compatible with MSN Voice clips (I think) */
42 extern SirenEncoder Siren7_NewEncoder(int sample_rate);
43 extern void Siren7_CloseEncoder(SirenEncoder encoder);
44 extern int Siren7_EncodeFrame(SirenEncoder encoder, unsigned char *DataIn, unsigned char *DataOut);
45 
46 
47 #endif /* _SIREN_ENCODER_H */
48