Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * Copyright 2009-2011 Jörg Hermann Müller 00005 * 00006 * This file is part of AudaSpace. 00007 * 00008 * Audaspace is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * AudaSpace is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with Audaspace; if not, write to the Free Software Foundation, 00020 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 * 00022 * ***** END GPL LICENSE BLOCK ***** 00023 */ 00024 00030 #ifndef AUD_CONVERTERFUNCTIONS 00031 #define AUD_CONVERTERFUNCTIONS 00032 00033 #include "AUD_Space.h" 00034 00035 #include <cstring> 00036 #ifdef _MSC_VER 00037 #if (_MSC_VER < 1300) 00038 typedef short int16_t; 00039 typedef int int32_t; 00040 #else 00041 typedef __int16 int16_t; 00042 typedef __int32 int32_t; 00043 #endif 00044 #else 00045 #include <stdint.h> 00046 #endif 00047 00048 typedef void (*AUD_convert_f)(data_t* target, data_t* source, int length); 00049 00050 template <class T> 00051 void AUD_convert_copy(data_t* target, data_t* source, int length) 00052 { 00053 memcpy(target, source, length*sizeof(T)); 00054 } 00055 00056 void AUD_convert_u8_s16(data_t* target, data_t* source, int length); 00057 00058 void AUD_convert_u8_s24_be(data_t* target, data_t* source, int length); 00059 00060 void AUD_convert_u8_s24_le(data_t* target, data_t* source, int length); 00061 00062 void AUD_convert_u8_s32(data_t* target, data_t* source, int length); 00063 00064 void AUD_convert_u8_float(data_t* target, data_t* source, int length); 00065 00066 void AUD_convert_u8_double(data_t* target, data_t* source, int length); 00067 00068 void AUD_convert_s16_u8(data_t* target, data_t* source, int length); 00069 00070 void AUD_convert_s16_s24_be(data_t* target, data_t* source, int length); 00071 00072 void AUD_convert_s16_s24_le(data_t* target, data_t* source, int length); 00073 00074 void AUD_convert_s16_s32(data_t* target, data_t* source, int length); 00075 00076 void AUD_convert_s16_float(data_t* target, data_t* source, int length); 00077 00078 void AUD_convert_s16_double(data_t* target, data_t* source, int length); 00079 00080 void AUD_convert_s24_u8_be(data_t* target, data_t* source, int length); 00081 00082 void AUD_convert_s24_u8_le(data_t* target, data_t* source, int length); 00083 00084 void AUD_convert_s24_s16_be(data_t* target, data_t* source, int length); 00085 00086 void AUD_convert_s24_s16_le(data_t* target, data_t* source, int length); 00087 00088 void AUD_convert_s24_s24(data_t* target, data_t* source, int length); 00089 00090 void AUD_convert_s24_s32_be(data_t* target, data_t* source, int length); 00091 00092 void AUD_convert_s24_s32_le(data_t* target, data_t* source, int length); 00093 00094 void AUD_convert_s24_float_be(data_t* target, data_t* source, int length); 00095 00096 void AUD_convert_s24_float_le(data_t* target, data_t* source, int length); 00097 00098 void AUD_convert_s24_double_be(data_t* target, data_t* source, int length); 00099 00100 void AUD_convert_s24_double_le(data_t* target, data_t* source, int length); 00101 00102 void AUD_convert_s32_u8(data_t* target, data_t* source, int length); 00103 00104 void AUD_convert_s32_s16(data_t* target, data_t* source, int length); 00105 00106 void AUD_convert_s32_s24_be(data_t* target, data_t* source, int length); 00107 00108 void AUD_convert_s32_s24_le(data_t* target, data_t* source, int length); 00109 00110 void AUD_convert_s32_float(data_t* target, data_t* source, int length); 00111 00112 void AUD_convert_s32_double(data_t* target, data_t* source, int length); 00113 00114 void AUD_convert_float_u8(data_t* target, data_t* source, int length); 00115 00116 void AUD_convert_float_s16(data_t* target, data_t* source, int length); 00117 00118 void AUD_convert_float_s24_be(data_t* target, data_t* source, int length); 00119 00120 void AUD_convert_float_s24_le(data_t* target, data_t* source, int length); 00121 00122 void AUD_convert_float_s32(data_t* target, data_t* source, int length); 00123 00124 void AUD_convert_float_double(data_t* target, data_t* source, int length); 00125 00126 void AUD_convert_double_u8(data_t* target, data_t* source, int length); 00127 00128 void AUD_convert_double_s16(data_t* target, data_t* source, int length); 00129 00130 void AUD_convert_double_s24_be(data_t* target, data_t* source, int length); 00131 00132 void AUD_convert_double_s24_le(data_t* target, data_t* source, int length); 00133 00134 void AUD_convert_double_s32(data_t* target, data_t* source, int length); 00135 00136 void AUD_convert_double_float(data_t* target, data_t* source, int length); 00137 00138 #endif //AUD_CONVERTERFUNCTIONS