Skip to content

Commit 86decc1

Browse files
authored
Merge pull request #17 from pedrolcl/win64_take_two
Win64 take two
2 parents 56ae8ca + d66f099 commit 86decc1

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

arm-wt-22k/host_src/eas_types.h

+9
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ typedef long EAS_RESULT;
8484
#define EAS_BUFFER_FULL 5
8585

8686
/* EAS_STATE return codes */
87+
#if defined(_WIN64)
88+
typedef long long EAS_STATE;
89+
#else
8790
typedef long EAS_STATE;
91+
#endif
8892
typedef enum
8993
{
9094
EAS_STATE_READY = 0,
@@ -123,8 +127,13 @@ typedef char EAS_CHAR;
123127
typedef unsigned short EAS_U16;
124128
typedef short EAS_I16;
125129

130+
#if defined(_WIN64)
131+
typedef unsigned long long EAS_U32;
132+
typedef long long EAS_I32;
133+
#else
126134
typedef unsigned long EAS_U32;
127135
typedef long EAS_I32;
136+
#endif
128137

129138
typedef unsigned EAS_UINT;
130139
typedef int EAS_INT;

arm-wt-22k/lib_src/eas_mixer.c

+9-6
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ void EAS_MixEnginePrep (S_EAS_DATA *pEASData, EAS_I32 numSamples)
109109

110110
/* clear the mix buffer */
111111
#if (NUM_OUTPUT_CHANNELS == 2)
112-
EAS_HWMemSet(pEASData->pMixBuffer, 0, numSamples * (EAS_I32) sizeof(long) * 2);
112+
EAS_HWMemSet(pEASData->pMixBuffer, 0, numSamples * (EAS_I32) sizeof(EAS_I32) * 2);
113113
#else
114-
EAS_HWMemSet(pEASData->pMixBuffer, 0, (EAS_I32) numSamples * (EAS_I32) sizeof(long));
114+
EAS_HWMemSet(pEASData->pMixBuffer, 0, (EAS_I32) numSamples * (EAS_I32) sizeof(EAS_I32));
115115
#endif
116116

117117
/* need to clear other side-chain effect buffers (chorus & reverb) */
@@ -263,11 +263,14 @@ void EAS_MixEnginePost (S_EAS_DATA *pEASData, EAS_I32 numSamples)
263263
*
264264
*----------------------------------------------------------------------------
265265
*/
266-
void SynthMasterGain (long *pInputBuffer, EAS_PCM *pOutputBuffer, EAS_U16 nGain, EAS_U16 numSamples) {
267-
266+
void SynthMasterGain(EAS_I32 *pInputBuffer,
267+
EAS_PCM *pOutputBuffer,
268+
EAS_U16 nGain,
269+
EAS_U16 numSamples)
270+
{
268271
/* loop through the buffer */
269272
while (numSamples) {
270-
long s;
273+
EAS_I32 s;
271274

272275
numSamples--;
273276
/* 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,
278281
s = s >> 7;
279282

280283
/* apply master gain */
281-
s *= (long) nGain;
284+
s *= (EAS_I32) nGain;
282285

283286
/* shift to lower 16-bits */
284287
/*lint -e{704} <avoid divide for performance>*/

arm-wt-22k/lib_src/eas_mixer.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@
4040

4141
#include "eas_effects.h"
4242

43-
extern void SynthMasterGain( long *pInputBuffer, EAS_PCM *pOutputBuffer, EAS_U16 nGain, EAS_U16 nNumLoopSamples);
43+
extern void SynthMasterGain(EAS_I32 *pInputBuffer,
44+
EAS_PCM *pOutputBuffer,
45+
EAS_U16 nGain,
46+
EAS_U16 nNumLoopSamples);
4447

4548
/*----------------------------------------------------------------------------
4649
* EAS_MixEngineInit()

0 commit comments

Comments
 (0)