diff --git a/arm-wt-22k/host_src/eas_types.h b/arm-wt-22k/host_src/eas_types.h index 56d0b53d..69bacf91 100644 --- a/arm-wt-22k/host_src/eas_types.h +++ b/arm-wt-22k/host_src/eas_types.h @@ -84,7 +84,11 @@ typedef long EAS_RESULT; #define EAS_BUFFER_FULL 5 /* EAS_STATE return codes */ +#if defined(_WIN64) +typedef long long EAS_STATE; +#else typedef long EAS_STATE; +#endif typedef enum { EAS_STATE_READY = 0, @@ -123,8 +127,13 @@ typedef char EAS_CHAR; typedef unsigned short EAS_U16; typedef short EAS_I16; +#if defined(_WIN64) +typedef unsigned long long EAS_U32; +typedef long long EAS_I32; +#else typedef unsigned long EAS_U32; typedef long EAS_I32; +#endif typedef unsigned EAS_UINT; typedef int EAS_INT; diff --git a/arm-wt-22k/lib_src/eas_mixer.c b/arm-wt-22k/lib_src/eas_mixer.c index 9ccdaf8f..4fce6eea 100644 --- a/arm-wt-22k/lib_src/eas_mixer.c +++ b/arm-wt-22k/lib_src/eas_mixer.c @@ -109,9 +109,9 @@ void EAS_MixEnginePrep (S_EAS_DATA *pEASData, EAS_I32 numSamples) /* clear the mix buffer */ #if (NUM_OUTPUT_CHANNELS == 2) - EAS_HWMemSet(pEASData->pMixBuffer, 0, numSamples * (EAS_I32) sizeof(long) * 2); + EAS_HWMemSet(pEASData->pMixBuffer, 0, numSamples * (EAS_I32) sizeof(EAS_I32) * 2); #else - EAS_HWMemSet(pEASData->pMixBuffer, 0, (EAS_I32) numSamples * (EAS_I32) sizeof(long)); + EAS_HWMemSet(pEASData->pMixBuffer, 0, (EAS_I32) numSamples * (EAS_I32) sizeof(EAS_I32)); #endif /* need to clear other side-chain effect buffers (chorus & reverb) */ @@ -263,11 +263,14 @@ void EAS_MixEnginePost (S_EAS_DATA *pEASData, EAS_I32 numSamples) * *---------------------------------------------------------------------------- */ -void SynthMasterGain (long *pInputBuffer, EAS_PCM *pOutputBuffer, EAS_U16 nGain, EAS_U16 numSamples) { - +void SynthMasterGain(EAS_I32 *pInputBuffer, + EAS_PCM *pOutputBuffer, + EAS_U16 nGain, + EAS_U16 numSamples) +{ /* loop through the buffer */ while (numSamples) { - long s; + EAS_I32 s; numSamples--; /* read a sample from the input buffer and add some guard bits */ @@ -278,7 +281,7 @@ void SynthMasterGain (long *pInputBuffer, EAS_PCM *pOutputBuffer, EAS_U16 nGain, s = s >> 7; /* apply master gain */ - s *= (long) nGain; + s *= (EAS_I32) nGain; /* shift to lower 16-bits */ /*lint -e{704} */ diff --git a/arm-wt-22k/lib_src/eas_mixer.h b/arm-wt-22k/lib_src/eas_mixer.h index b2eb33be..7bb2078d 100644 --- a/arm-wt-22k/lib_src/eas_mixer.h +++ b/arm-wt-22k/lib_src/eas_mixer.h @@ -40,7 +40,10 @@ #include "eas_effects.h" -extern void SynthMasterGain( long *pInputBuffer, EAS_PCM *pOutputBuffer, EAS_U16 nGain, EAS_U16 nNumLoopSamples); +extern void SynthMasterGain(EAS_I32 *pInputBuffer, + EAS_PCM *pOutputBuffer, + EAS_U16 nGain, + EAS_U16 nNumLoopSamples); /*---------------------------------------------------------------------------- * EAS_MixEngineInit()