|
Wave Arts VQE
1.00
Voice Quality Enhancement
|
00001 /* 00002 * This file is part of the Wave Arts VQE library. 00003 * Copyright (C) 2011 Wave Arts, Inc. (http://wavearts.com) 00004 * 00005 * VQE is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * VQE is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * A copy of the GNU General Public License is included with VQE, 00016 * and can be found online at <http://www.gnu.org/licenses/>. 00017 * 00018 * If you'd like to distribute a closed-source product which uses VQE, 00019 * you must obtain a commercial VQE license from Wave Arts. 00020 */ 00021 00058 00059 00060 #ifndef _CONVERT_H 00061 #define _CONVERT_H 00062 00063 #include <stdlib.h> 00064 00065 typedef enum { 00066 eCvtFmtUnknown, 00067 eCvtFmtNormal, 00068 eCvtFmtWordByteRev, 00069 eCvtFmtLongByteRev 00070 } ConvertFormat; 00071 00072 typedef struct { 00073 ConvertFormat shortFormat; 00074 ConvertFormat longFormat; 00075 00076 void (*ShortPNorm)(char *p); 00077 short (*ShortNorm)(short val); 00078 void (*ShortBufNorm)(short *buf, size_t n); 00079 00080 void (*ShortPWbr)(char *p); 00081 short (*ShortWbr)(short val); 00082 void (*ShortBufWbr)(short *buf, size_t n); 00083 00084 void (*LongPNorm)(char *p); 00085 int (*LongNorm)(int val); 00086 void (*LongBufNorm)(int *buf, size_t n); 00087 00088 void (*LongPWbr)(char *p); 00089 int (*LongWbr)(int val); 00090 void (*LongBufWbr)(int *buf, size_t n); 00091 00092 void (*LongPLbr)(char *p); 00093 int (*LongLbr)(int val); 00094 void (*LongBufLbr)(int *buf, size_t n); 00095 } ConvertTab; 00096 00097 #ifdef __cplusplus 00098 extern "C" { 00099 #endif 00100 00101 // 00102 // Function prototypes. 00103 // 00104 ConvertTab *cvtCreateConversionTable(); 00105 void cvtDeleteConversionTable(ConvertTab *c); 00106 ConvertFormat cvtGetNativeShortFmt(); 00107 ConvertFormat cvtGetNativeLongFmt(); 00108 void cvtCopyShortToP(short *src, char *dest); 00109 void cvtCopyPToShort(char *src, short *dest); 00110 void cvtCopyLongToP(int *src, char *dest); 00111 void cvtCopyPToLong(char *src, int *dest); 00112 00113 #ifdef __cplusplus 00114 } 00115 #endif 00116 00117 #endif
1.7.5.1