spandsp 0.0.6
|
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.9 2009/05/31 14:47:10 steveu Exp $ 00026 */ 00027 00028 /*! \file */ 00029 00030 #if !defined(_TEST_UTILS_H_) 00031 #define _TEST_UTILS_H_ 00032 00033 #include <sndfile.h> 00034 00035 enum 00036 { 00037 MUNGE_CODEC_NONE = 0, 00038 MUNGE_CODEC_ALAW, 00039 MUNGE_CODEC_ULAW, 00040 MUNGE_CODEC_G726_40K, 00041 MUNGE_CODEC_G726_32K, 00042 MUNGE_CODEC_G726_24K, 00043 MUNGE_CODEC_G726_16K, 00044 }; 00045 00046 typedef struct codec_munge_state_s codec_munge_state_t; 00047 00048 typedef struct complexify_state_s complexify_state_t; 00049 00050 #ifdef __cplusplus 00051 extern "C" { 00052 #endif 00053 00054 SPAN_DECLARE(complexify_state_t *) complexify_init(void); 00055 00056 SPAN_DECLARE(void) complexify_release(complexify_state_t *s); 00057 00058 SPAN_DECLARE(complexf_t) complexify(complexify_state_t *s, int16_t amp); 00059 00060 SPAN_DECLARE(void) fft(complex_t data[], int len); 00061 00062 SPAN_DECLARE(void) ifft(complex_t data[], int len); 00063 00064 SPAN_DECLARE(codec_munge_state_t *) codec_munge_init(int codec, int info); 00065 00066 SPAN_DECLARE(void) codec_munge_release(codec_munge_state_t *s); 00067 00068 SPAN_DECLARE(void) codec_munge(codec_munge_state_t *s, int16_t amp[], int len); 00069 00070 SPAN_DECLARE(SNDFILE *) sf_open_telephony_read(const char *name, int channels); 00071 00072 SPAN_DECLARE(SNDFILE *) sf_open_telephony_write(const char *name, int channels); 00073 00074 #ifdef __cplusplus 00075 } 00076 #endif 00077 00078 #endif 00079 /*- End of file ------------------------------------------------------------*/