summaryrefslogtreecommitdiff
path: root/apps/plugins/midi/synth.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/midi/synth.c')
-rw-r--r--apps/plugins/midi/synth.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c
index 44417b2583..a364889ea0 100644
--- a/apps/plugins/midi/synth.c
+++ b/apps/plugins/midi/synth.c
@@ -272,7 +272,7 @@ signed short int synthVoice(struct SynthObject * so)
272 so->cp += so->delta; 272 so->cp += so->delta;
273 } 273 }
274 274
275 cpShifted = so->cp >> 10; //Was 10 275 cpShifted = so->cp >> FRACTSIZE; //Was 10
276 276
277 if( (cpShifted > (wf->numSamples) && (so->state != STATE_RAMPDOWN))) 277 if( (cpShifted > (wf->numSamples) && (so->state != STATE_RAMPDOWN)))
278 { 278 {
@@ -286,7 +286,7 @@ signed short int synthVoice(struct SynthObject * so)
286 { 286 {
287 if(wf->mode & LOOP_REVERSE) 287 if(wf->mode & LOOP_REVERSE)
288 { 288 {
289 so->cp = (wf->endLoop)<<10; //Was 10 289 so->cp = (wf->endLoop)<<FRACTSIZE; //Was 10
290 cpShifted = wf->endLoop; 290 cpShifted = wf->endLoop;
291 s2=getSample((cpShifted), wf); 291 s2=getSample((cpShifted), wf);
292 } 292 }
@@ -302,7 +302,7 @@ signed short int synthVoice(struct SynthObject * so)
302 so->loopState = STATE_LOOPING; 302 so->loopState = STATE_LOOPING;
303 if((wf->mode & (24)) == 0) 303 if((wf->mode & (24)) == 0)
304 { 304 {
305 so->cp = (wf->startLoop)<<10; //Was 10 305 so->cp = (wf->startLoop)<<FRACTSIZE; //Was 10
306 cpShifted = wf->startLoop; 306 cpShifted = wf->startLoop;
307 s2=getSample((cpShifted), wf); 307 s2=getSample((cpShifted), wf);
308 } 308 }
@@ -315,8 +315,8 @@ signed short int synthVoice(struct SynthObject * so)
315 315
316 /* Better, working, linear interpolation */ 316 /* Better, working, linear interpolation */
317 s1=getSample((cpShifted), wf); //\|/ Was 1023)) >> 10 317 s1=getSample((cpShifted), wf); //\|/ Was 1023)) >> 10
318 s = s1 + ((signed)((s2 - s1) * (so->cp & 1023))>>10); //Was 10 318// s = s1 + ((signed)((s2 - s1) * (so->cp & (1023)))>>10); //Was 10
319 319 s = s1 + ((signed)((s2 - s1) * (so->cp & ((1<<FRACTSIZE)-1)))>>FRACTSIZE); //Was 10
320 320
321/* ADSR COMMENT WOULD GO FROM HERE.........*/ 321/* ADSR COMMENT WOULD GO FROM HERE.........*/
322 322