@@ -109,9 +109,9 @@ void EAS_MixEnginePrep (S_EAS_DATA *pEASData, EAS_I32 numSamples)
109
109
110
110
/* clear the mix buffer */
111
111
#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 );
113
113
#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 ));
115
115
#endif
116
116
117
117
/* need to clear other side-chain effect buffers (chorus & reverb) */
@@ -263,11 +263,14 @@ void EAS_MixEnginePost (S_EAS_DATA *pEASData, EAS_I32 numSamples)
263
263
*
264
264
*----------------------------------------------------------------------------
265
265
*/
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
+ {
268
271
/* loop through the buffer */
269
272
while (numSamples ) {
270
- long s ;
273
+ EAS_I32 s ;
271
274
272
275
numSamples -- ;
273
276
/* 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,
278
281
s = s >> 7 ;
279
282
280
283
/* apply master gain */
281
- s *= (long ) nGain ;
284
+ s *= (EAS_I32 ) nGain ;
282
285
283
286
/* shift to lower 16-bits */
284
287
/*lint -e{704} <avoid divide for performance>*/
0 commit comments