libspandsp 0.0.4
|
00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * test_utils.h - Utility routines for module tests. 00005 * 00006 * Written by Steve Underwood <steveu@coppice.org> 00007 * 00008 * Copyright (C) 2006 Steve Underwood 00009 * 00010 * All rights reserved. 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 2.1, 00014 * as published by the Free Software Foundation. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 * 00025 * $Id: test_utils.h,v 1.3 2008/04/17 18:03:23 steveu Exp $ 00026 */ 00027 00028 /*! \file */ 00029 00030 #if !defined(_TEST_UTILS_H_) 00031 #define _TEST_UTILS_H_ 00032 00033 enum 00034 { 00035 MUNGE_CODEC_NONE = 0, 00036 MUNGE_CODEC_ALAW, 00037 MUNGE_CODEC_ULAW, 00038 MUNGE_CODEC_G726_40K, 00039 MUNGE_CODEC_G726_32K, 00040 MUNGE_CODEC_G726_24K, 00041 MUNGE_CODEC_G726_16K, 00042 }; 00043 00044 typedef struct codec_munge_state_s codec_munge_state_t; 00045 00046 typedef struct complexify_state_s complexify_state_t; 00047 00048 #ifdef __cplusplus 00049 extern "C" { 00050 #endif 00051 00052 complexify_state_t *complexify_init(void); 00053 00054 void complexify_release(complexify_state_t *s); 00055 00056 complexf_t complexify(complexify_state_t *s, int16_t amp); 00057 00058 codec_munge_state_t *codec_munge_init(int codec, int info); 00059 00060 void codec_munge_release(codec_munge_state_t *s); 00061 00062 void codec_munge(codec_munge_state_t *s, int16_t amp[], int len); 00063 00064 #ifdef __cplusplus 00065 } 00066 #endif 00067 00068 #endif 00069 /*- End of file ------------------------------------------------------------*/