From 93f1baa35e487cbc2ceaf5dc671d228cbb416943 Mon Sep 17 00:00:00 2001 From: Rotvig Date: Sat, 20 Aug 2016 10:04:42 +0200 Subject: [PATCH] Compiles on windows 10 now --- alac/ALACBitUtilities.h | 2 +- alac/ag_dec.c | 4 ++++ alac/dp_dec.c | 4 ++++ alac/dp_enc.c | 4 ++++ src/codec.cc | 2 +- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/alac/ALACBitUtilities.h b/alac/ALACBitUtilities.h index 97e9ebe..8b2f477 100644 --- a/alac/ALACBitUtilities.h +++ b/alac/ALACBitUtilities.h @@ -65,7 +65,7 @@ typedef enum ID_PCE = 5, ID_FIL = 6, ID_END = 7 -} ELEMENT_TYPE; +} AELEMENT_TYPE; // types typedef struct BitBuffer diff --git a/alac/ag_dec.c b/alac/ag_dec.c index 2214c94..9bdae1c 100644 --- a/alac/ag_dec.c +++ b/alac/ag_dec.c @@ -53,6 +53,10 @@ #define ALWAYS_INLINE #endif +#ifdef _MSC_VER +#define inline __inline +#endif + /* And on the subject of the CodeWarrior x86 compiler and inlining, I reworked a lot of this to help the compiler out. In many cases this required manual inlining or a macro. Sorry if it is ugly but the performance gains are well worth it. diff --git a/alac/dp_dec.c b/alac/dp_dec.c index d153025..3f69704 100644 --- a/alac/dp_dec.c +++ b/alac/dp_dec.c @@ -36,6 +36,10 @@ #define ALWAYS_INLINE #endif +#ifdef _MSC_VER +#define inline __inline +#endif + #if TARGET_CPU_PPC && (__MWERKS__ >= 0x3200) // align loops to a 16 byte boundary to make the G5 happy #pragma function_align 16 diff --git a/alac/dp_enc.c b/alac/dp_enc.c index 869104c..9e93c39 100644 --- a/alac/dp_enc.c +++ b/alac/dp_enc.c @@ -35,6 +35,10 @@ #define ALWAYS_INLINE #endif +#ifdef _MSC_VER +#define inline __inline +#endif + #if TARGET_CPU_PPC && (__MWERKS__ >= 0x3200) // align loops to a 16 byte boundary to make the G5 happy #pragma function_align 16 diff --git a/src/codec.cc b/src/codec.cc index f1956a8..1d5869b 100644 --- a/src/codec.cc +++ b/src/codec.cc @@ -18,7 +18,7 @@ extern "C" { using namespace v8; using namespace node; -static int kBlockSize = 16; +const int kBlockSize = 16; static int kFramesPerPacket = 352; // These values should be changed at each iteration