openalbridge/globals.h
changeset 2419 dbaaba09146d
parent 2418 538a777f90c4
child 2420 b7390a3040f8
equal deleted inserted replaced
2418:538a777f90c4 2419:dbaaba09146d
    65 #  define msleep(t) usleep((t) * 1000)
    65 #  define msleep(t) usleep((t) * 1000)
    66 # endif
    66 # endif
    67 #endif
    67 #endif
    68 #endif /* _SLEEP_H */
    68 #endif /* _SLEEP_H */
    69 
    69 
    70 
    70 #ifdef __APPLE__
    71 /* check compiler requirements */
    71 /* check compiler requirements */
    72 #if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
    72 #if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
    73 #error Do not know the endianess of this architecture
    73 #error Do not know the endianess of this architecture
       
    74 #endif
    74 #endif
    75 #endif
    75 
    76 
    76 /* use byteswap macros from the host system, hopefully optimized ones ;-) 
    77 /* use byteswap macros from the host system, hopefully optimized ones ;-) 
    77  * or define our own version, simple, stupid, straight-forward... */
    78  * or define our own version, simple, stupid, straight-forward... */
    78 #ifdef HAVE_BYTESWAP_H
    79 #ifdef HAVE_BYTESWAP_H
    99 
   100 
   100 #ifdef __CPLUSPLUS
   101 #ifdef __CPLUSPLUS
   101 extern "C" {
   102 extern "C" {
   102 #endif 
   103 #endif 
   103         
   104         
   104 /*data type for WAV header*/
   105         /*data type for WAV header*/
   105 #pragma pack(1)
   106 #pragma pack(1)
   106         typedef struct _WAV_header_t {
   107         typedef struct _WAV_header_t {
   107                 uint32_t ChunkID;
   108                 uint32_t ChunkID;
   108                 uint32_t ChunkSize;
   109                 uint32_t ChunkSize;
   109                 uint32_t Format;
   110                 uint32_t Format;
   118                 uint32_t Subchunk2ID;
   119                 uint32_t Subchunk2ID;
   119                 uint32_t Subchunk2Size;
   120                 uint32_t Subchunk2Size;
   120         } WAV_header_t;
   121         } WAV_header_t;
   121 #pragma pack()
   122 #pragma pack()
   122         
   123         
   123 /*data type for passing data between threads*/
   124         /*data type for passing data between threads*/
   124 #pragma pack(1)
   125 #pragma pack(1)
   125         typedef struct _fade_t {
   126         typedef struct _fade_t {
   126                 uint32_t index;
   127                 uint32_t index;
   127                 uint16_t quantity;
   128                 uint16_t quantity;
   128         } fade_t;
   129         } fade_t;
   129 #pragma pack()
   130 #pragma pack()
   130 
       
   131         
   131         
   132 /*file format defines*/
   132         
       
   133         /*file format defines*/
   133 #define OGG_FILE_FORMAT 0x4F676753
   134 #define OGG_FILE_FORMAT 0x4F676753
   134 #define WAV_FILE_FORMAT 0x52494646
   135 #define WAV_FILE_FORMAT 0x52494646
   135 #define WAV_HEADER_SUBCHUNK2ID 0x64617461
   136 #define WAV_HEADER_SUBCHUNK2ID 0x64617461
   136       
   137         
   137 
   138         
   138 /*other defines*/
   139         /*other defines*/
   139 #define FADE_IN  0
   140 #define FADE_IN  0
   140 #define FADE_OUT 1
   141 #define FADE_OUT 1
   141 
   142         
   142         char *prog;
   143         char *prog;
   143         
   144         
   144 #ifdef __CPLUSPLUS
   145 #ifdef __CPLUSPLUS
   145 }
   146 }
   146 #endif
   147 #endif