GNU Radio 3.6.5 C++ API

codec2.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002 
00003   FILE........: codec2.h
00004   AUTHOR......: David Rowe
00005   DATE CREATED: 21/8/2010
00006 
00007   Codec2 fully quantised encoder and decoder functions.  If you want use
00008   codec2, these are the functions you need to call.
00009 
00010 \*---------------------------------------------------------------------------*/
00011 
00012 /*
00013   Copyright (C) 2010 David Rowe
00014 
00015   All rights reserved.
00016 
00017   This program is free software; you can redistribute it and/or modify
00018   it under the terms of the GNU Lesser General Public License version 2.1, as
00019   published by the Free Software Foundation.  This program is
00020   distributed in the hope that it will be useful, but WITHOUT ANY
00021   WARRANTY; without even the implied warranty of MERCHANTABILITY or
00022   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
00023   License for more details.
00024 
00025   You should have received a copy of the GNU Lesser General Public License
00026   along with this program; if not, see <http://www.gnu.org/licenses/>.
00027 */
00028 
00029 #ifndef __CODEC2__
00030 #define  __CODEC2__
00031 
00032 #define CODEC2_SAMPLES_PER_FRAME 160
00033 #define CODEC2_BITS_PER_FRAME     50
00034 
00035 void *codec2_create();
00036 void codec2_destroy(void *codec2_state);
00037 void codec2_encode(void *codec2_state, unsigned char * bits, short speech_in[]);
00038 void codec2_decode(void *codec2_state, short speech_out[],
00039       const unsigned char * bits);
00040 
00041 #endif