⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 common_g726.h

📁 G.726带测试和在DM642实现的完整工程。测试程序可修改自行填入数据。实现部分设计具体产品板的定义
💻 H
字号:
/**
@file

@brief Type definitions and helper macros which aren't part of Standard C++

For latest source code see http://www.tixy.clara.net/source/

Copyright (C) 2004	J.D.Medhurst (a.k.a. Tixy)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

// Following comment is for Doxygen to generate the Main Page...

/**
@mainpage
<H1>Tixy's Source Code</H1>

C++ source code provided under the terms of the <A HREF="..\gpl.txt">GNU General Public License</A>.
(See <A HREF="http://www.gnu.org/licenses/licenses.html">http://www.gnu.org/licenses/licenses.html</A>
for more information.)

Source code is commented using <A HREF="http://www.doxygen.org">Doxygen</A> style comments
and is formatted with tab stops every four characters.

For latest source code see http://www.tixy.clara.net/source/

Copyright (C) 2004-2005 J.D.Medhurst (a.k.a. Tixy)
*/


#ifndef __COMMON_H__
#define __COMMON_H__


#if 0
#define DEBUG	/**< Defined when compiling code for debugging */
#endif

/**
@defgroup integers Common - Basic Integer Types.

These definitions will need to be modified on systems where 'char', 'short' and 'int'
have sizes different from 8, 16 and 32 bits.

Note, 'int' is assumed to be in 2s complement format and at least 32 bits in size.
@{
*/
typedef unsigned char  uint8;	/**< An 8 bit unsigned integer */
typedef unsigned short uint16;	/**< An 16 bit unsigned integer */
typedef unsigned int   uint32;	/**< An 32 bit unsigned integer */
typedef signed char    int8;	/**< An 8 bit signed integer (2s complement) */
typedef signed short   int16;	/**< An 16 bit signed integer (2s complement) */
typedef signed int	   int32;	/**< An 32 bit signed integer (2s complement) */
typedef unsigned int   uint;	/**< An unsigned integer of at least 32 bits */

#if !defined(_MSC_VER)
//typedef long long int64;			/**< An 64 bit signed integer (2s complement) */
//typedef unsigned long long uint64;	/**< An 64 bit unsigned integer */
typedef long int64;			/**< An 64 bit signed integer (2s complement) */
typedef unsigned long uint64;	/**< An 64 bit unsigned integer */
#else // Microsoft Visual C++...
typedef __int64 int64;				/**< An 64 bit signed integer (2s complement) */
typedef unsigned __int64 uint64;	/**< An 64 bit unsigned integer */
#endif

/** @} */ // End of group


#if defined(__EPOC32__) || defined(__WINS__) || defined(__WINSCW__)
// Compiling for Symbian OS...

#include <e32std.h>

#if !defined(__BREAKPOINT)
#if defined(__WINS__)
#define BREAKPOINT { _asm int 3 }			/**< Invoke debugger */
#elif defined(__WINSCW__)
#define BREAKPOINT { _asm byte 0xcc }		/**< Invoke debugger */
#else
#define BREAKPOINT							/**< Invoke debugger */
#endif
#else
#define BREAKPOINT	{__BREAKPOINT()}		/**< Invoke debugger */
#endif

#define IMPORT		IMPORT_C				/**< Mark a function which is to be imported from a DLL */
#define EXPORT		EXPORT_C				/**< Mark a function to be exported from a DLL */

#undef ASSERT
#define ASSERT(c)	{if(!(c)) BREAKPOINT;}	/**< Assert that expression 'c' is true */

#if !defined(DEBUG) && defined(_DEBUG)
#define DEBUG								/**< Defined when compiling code for debugging */
#endif


#elif defined(_MSC_VER)
// Compiling for Microsoft Visual C++...
#define BREAKPOINT	{ _asm int 3 }			/**< Invoke debugger */
#define IMPORT		__declspec(dllexport)	/**< Mark a function which is to be imported from a DLL */
#define EXPORT		__declspec(dllexport)	/**< Mark a function to be exported from a DLL */
#define ASSERT(c)	{if(!(c)) BREAKPOINT;}	/**< Assert that expression 'c' is true */


#else
// Unknown system...
#define BREAKPOINT							/**< Invoke debugger */
#define IMPORT								/**< Mark a function which is to be imported from a DLL */
#define EXPORT								/**< Mark a function to be exported from a DLL */
#define ASSERT(c)							/**< Assert that expression 'c' is true */


#endif


#if defined(_MSC_VER) // disable anoying warnigs from MSVC...
#pragma warning( disable : 4244 )	/* convertion from x to y, possible loss of data */
#pragma warning( disable : 4514 )	/* unreferenced inline function has been removed */
#pragma warning( disable : 4146 )	/* unary minus operator applied to unsigned type, result still unsigned */
#pragma warning( disable : 4710 )	/* function x not inlined */
#endif


#ifdef DEBUG
#define ASSERT_DEBUG(c) ASSERT(c)	/**< Assert that expression 'c' is true (when compiled for debugging)*/
#else
#define ASSERT_DEBUG(c) 			/**< Assert that expression 'c' is true (when compiled for debugging)*/
#endif


#ifndef NULL
#define NULL 0		/**< Used to represent a null pointer type */
#endif


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -