stand.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * stand.h
  3. * Copyright (C) 2010-2011 HAL, kbinani
  4. *
  5. * This file is a part of STAND Library.
  6. * STAND Library is a wrapper library of WORLD.
  7. * It provides analysis and synthesis of WAVE file(s).
  8. *
  9. * These files are distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. *
  13. */
  14. #ifndef __stand_h__
  15. #define __stand_h__
  16. #include <stdio.h>
  17. #include <limits.h>
  18. #include <string.h>
  19. #include <math.h>
  20. #if __GNUC__
  21. #include <sys/stat.h>
  22. #else
  23. #include <direct.h>
  24. #endif
  25. #include <iostream>
  26. #include <fstream>
  27. #include <string>
  28. #include <vector>
  29. #include <list>
  30. #include "world/world.h"
  31. #include "WaveBuffer/WaveBuffer.h"
  32. #include "Mutex.h"
  33. using namespace std;
  34. #if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
  35. # define STND_OS_MAC
  36. #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
  37. # define STND_OS_WIN
  38. #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
  39. # define STND_OS_WIN
  40. #elif defined(__MWERKS__) && defined(__INTEL__)
  41. # define STND_OS_WIN
  42. #else
  43. # define STND_OS_OTHER
  44. #endif
  45. #define LINEBUFF_LEN 4096
  46. #ifdef STND_MULTI_THREAD
  47. extern vconnect::Mutex *hMutex;
  48. extern vconnect::Mutex *hFFTWMutex;
  49. #endif
  50. //#define DEBUG
  51. #define ST_PI (3.141592653589793238462643383279)
  52. #define SAFE_DELETE_ARRAY(x) if(x){ delete[] (x); x = NULL; }
  53. #define SAFE_DELETE(x) if(x){ delete(x); x = NULL; }
  54. #endif