diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-06-19 22:32:10 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-06-19 22:32:10 +0300 |
commit | 68fad96a61c23520d2ec0f90de0c5e03c96f2f82 (patch) | |
tree | 86c8678b1f93a8c8bb1641853373aaf156d66490 /src/dbopl.h | |
parent | 850a5a1b1cbaa4b85990368bf998fce72639e156 (diff) | |
download | libADLMIDI-68fad96a61c23520d2ec0f90de0c5e03c96f2f82.tar.gz libADLMIDI-68fad96a61c23520d2ec0f90de0c5e03c96f2f82.tar.bz2 libADLMIDI-68fad96a61c23520d2ec0f90de0c5e03c96f2f82.zip |
Fixed compatibility with MSVC
Diffstat (limited to 'src/dbopl.h')
-rw-r--r-- | src/dbopl.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dbopl.h b/src/dbopl.h index bdd439d..bbe40de 100644 --- a/src/dbopl.h +++ b/src/dbopl.h @@ -29,8 +29,13 @@ typedef signed short Bit16s; typedef unsigned char Bit8u; typedef signed char Bit8s; #define INLINE inline +#ifdef _MSC_VER +#define GCC_UNLIKELY(x) (!!(x) == 0) +#define GCC_LIKELY(x) (!!(x) == 1) +#else #define GCC_UNLIKELY(x) __builtin_expect((x),0) #define GCC_LIKELY(x) __builtin_expect((x),1) +#endif /* END MIDIPLAY GLUE */ //Use 8 handlers based on a small logatirmic wavetabe and an exponential table for volume @@ -43,6 +48,14 @@ typedef signed char Bit8s; //Select the type of wave generator routine #define DBOPL_WAVE WAVE_TABLEMUL +#ifdef _MSC_VER +#ifdef _WIN64 +typedef __int64 ssize_t; +#else +typedef __int32 ssize_t; +#endif +#endif + namespace DBOPL { |