mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-12-05 05:38:43 +00:00
i've tested, now you can too
This commit is contained in:
1 parent
d3fcfa8245
commit
d67b96af8a
94 files changed
+25305
-2005
No files matched your search
+42
-13
@@ -2,10 +2,10 @@
|
||||
|
||||
FILE........: codec2.h
|
||||
AUTHOR......: David Rowe
|
||||
DATE CREATED: 21/8/2010
|
||||
DATE CREATED: 21 August 2010
|
||||
|
||||
Codec2 fully quantised encoder and decoder functions. If you want use
|
||||
codec2, these are the functions you need to call.
|
||||
Codec 2 fully quantised encoder and decoder functions. If you want use
|
||||
Codec 2, these are the functions you need to call.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@@ -23,21 +23,50 @@
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __CODEC2__
|
||||
#define __CODEC2__
|
||||
#include "codebook.h"
|
||||
|
||||
#define CODEC2_SAMPLES_PER_FRAME 160
|
||||
#define CODEC2_BITS_PER_FRAME 51
|
||||
/* set up the calling convention for DLL function import/export for
|
||||
WIN32 cross compiling */
|
||||
|
||||
void *codec2_create();
|
||||
void codec2_destroy(void *codec2_state);
|
||||
void codec2_encode(void *codec2_state, unsigned char * bits, short speech_in[]);
|
||||
void codec2_decode(void *codec2_state, short speech_out[],
|
||||
const unsigned char * bits);
|
||||
#ifdef __CODEC2_WIN32__
|
||||
#ifdef __CODEC2_BUILDING_DLL__
|
||||
#define CODEC2_WIN32SUPPORT __declspec(dllexport) __stdcall
|
||||
#else
|
||||
#define CODEC2_WIN32SUPPORT __declspec(dllimport) __stdcall
|
||||
#endif
|
||||
#else
|
||||
#define CODEC2_WIN32SUPPORT
|
||||
#endif
|
||||
|
||||
#define CODEC2_MODE_3200 0
|
||||
#define CODEC2_MODE_2400 1
|
||||
#define CODEC2_MODE_1400 2
|
||||
#define CODEC2_MODE_1200 3
|
||||
|
||||
struct CODEC2;
|
||||
|
||||
struct CODEC2 * CODEC2_WIN32SUPPORT codec2_create(int mode);
|
||||
void CODEC2_WIN32SUPPORT codec2_destroy(struct CODEC2 *codec2_state);
|
||||
void CODEC2_WIN32SUPPORT codec2_encode(struct CODEC2 *codec2_state, unsigned char * bits, short speech_in[]);
|
||||
void CODEC2_WIN32SUPPORT codec2_decode(struct CODEC2 *codec2_state, short speech_out[], const unsigned char *bits);
|
||||
int CODEC2_WIN32SUPPORT codec2_samples_per_frame(struct CODEC2 *codec2_state);
|
||||
int CODEC2_WIN32SUPPORT codec2_bits_per_frame(struct CODEC2 *codec2_state);
|
||||
|
||||
void CODEC2_WIN32SUPPORT codec2_set_lpc_post_filter(struct CODEC2 *codec2_state, int enable, int bass_boost, float beta, float gamma);
|
||||
int CODEC2_WIN32SUPPORT codec2_get_spare_bit_index(struct CODEC2 *codec2_state);
|
||||
int CODEC2_WIN32SUPPORT codec2_rebuild_spare_bit(struct CODEC2 *codec2_state, int unpacked_bits[]);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user