Changeset 5210:8eb738dee9d4 in roaraudio for include/roaraudio/units.h
- Timestamp:
- 11/01/11 12:23:05 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/roaraudio/units.h
r4708 r5210 35 35 #define _ONE 1 36 36 #define _KILO 1000 37 #define _MEGA ( _KILO*_KILO)38 #define _GIGA ( _KILO*_MEGA)39 #define _TERA ( _KILO*_GIGA)37 #define _MEGA ((int_least32_t)_KILO*(int_least32_t)_KILO) 38 #define _GIGA ((int_least32_t)_KILO*_MEGA) 39 #define _TERA ((int_least32_t)_KILO*_GIGA) 40 40 41 41 … … 43 43 #ifndef _SEC 44 44 #if defined(_UNITS_T_BASE_MSEC) 45 #define _SEC 1000 45 #define _SEC_TYPE int_least32_t 46 #define _SEC (_SEC_TYPE)1000 46 47 #elif defined(_UNITS_T_BASE_USEC) 47 #define _SEC 1000000 48 #define _SEC_TYPE int_least32_t 49 #define _SEC (_SEC_TYPE)1000000 48 50 //#elif defined(_UNITS_T_BASE_SEC) 49 51 #else 50 52 #define _SEC 1 53 #define _SEC_TYPE int 51 54 #endif 52 55 #endif 53 56 54 #define _MIN (60*_SEC) 55 #define _HOUR (60*_MIN) 57 #ifndef _SEC_TYPE 58 #define _SEC_TYPE int_least32_t 59 #endif 60 61 #define _MIN ((_SEC_TYPE)60*_SEC) 62 #define _HOUR ((_SEC_TYPE)60*_MIN) 56 63 57 64 #define _MSEC (_SEC*_MILI) … … 62 69 #ifndef _METER 63 70 #if defined(_UNITS_D_BASE_MMETER) 71 #define _METER_TYPE int 64 72 #define _METER 1000 65 73 #elif defined(_UNITS_D_BASE_UMETER) 66 #define _METER 1000000 74 #define _METER_TYPE int_least32_t 75 #define _METER (_METER_TYPE)1000000 67 76 //#elif defined(_UNITS_D_BASE_METER) 68 77 #else 78 #define _METER_TYPE int 69 79 #define _METER 1 70 80 #endif 71 81 #endif 72 82 73 #define _AE (149597870691LL *_METER) 83 #ifndef _METER_TYPE 84 #define _METER_TYPE int_least32_t 85 #endif 86 87 #define _AE ((int_least64_t)149597870691LL *_METER) 74 88 #define _LJ (9460730472580800LL *_METER) 75 89 #define _PC (30856804413117847LL*_METER) /* TODO: FIXME: get a more corret value */
Note: See TracChangeset
for help on using the changeset viewer.