/*---------------------------------------------------------------------------- jackpeek - real-time multi-channel audio visualization Copyright (c) 2007 Ge Wang and Juan-Pablo Caceres All rights reserved. http://ccrma.stanford.edu/groups/soundwire/software/jackpeek/ 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 U.S.A. -----------------------------------------------------------------------------*/ //----------------------------------------------------------------------------- // name: calories_def.h // desc: defines for calories // // author: Ge Wang (ge@ccrma.stanford.edu) // date: 2008.1.15 //----------------------------------------------------------------------------- #ifndef __CALORIES_DEF_H__ #define __CALORIES_DEF_H__ #include #include #include // bool #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif #define ONE_PI (3.14159265358979323846) #define TWO_PI (2.0 * ONE_PI) #define SQRT2 (1.41421356237309504880) #ifndef SAFE_DELETE #define SAFE_DELETE(x) do { if(x){ delete x; x = NULL; } } while(0) #define SAFE_DELETE_ARRAY(x) do { if(x){ delete [] x; x = NULL; } } while(0) #endif #ifdef __MACOSX_CORE__ #define __PLATFORM_MACOSX__ #endif #if defined(__LINUX_ALSA__) || defined(__LINUX_JACK__) || defined(__LINUX_OSS__) #define __PLATFORM_LINUX__ #endif #ifdef __PLATFORM_WIN32__ #include #ifndef usleep #define usleep(x) Sleep( (x / 1000 <= 0 ? 1 : x / 1000) ) #endif #pragma warning (disable : 4996) // stdio deprecation #pragma warning (disable : 4786) // stl debug info #pragma warning (disable : 4312) // type casts from void* #pragma warning (disable : 4311) // type casts to void* #pragma warning (disable : 4244) // truncation #pragma warning (disable : 4068) // unknown pragma #else #include #endif #endif