Mercurial > hg > dmlib
comparison ppl.c @ 287:1e89cd081956
Use fixed point everywhere in the mixing internals, to avoid going over
sample boundaries.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 11 Oct 2012 11:09:26 +0300 |
parents | 40efff364904 |
children | 61cab36b6d32 |
comparison
equal
deleted
inserted
replaced
286:a17e54015bd9 | 287:1e89cd081956 |
---|---|
260 if (yh < 10 || chn == NULL) | 260 if (yh < 10 || chn == NULL) |
261 return; | 261 return; |
262 | 262 |
263 int xc, ym = y0 + (y1 - y0) / 2, vol = FP_GETH(chn->chVolume); | 263 int xc, ym = y0 + (y1 - y0) / 2, vol = FP_GETH(chn->chVolume); |
264 int pitch = screen->pitch / sizeof(Uint32); | 264 int pitch = screen->pitch / sizeof(Uint32); |
265 int len = chn->chSize; | 265 int len = FP_GETH(chn->chSize); |
266 DMFixedPoint offs = chn->chPos; | 266 DMFixedPoint offs = chn->chPos; |
267 Uint32 coln = dmCol(0.0, 0.8, 0.0), colx = dmCol(1.0, 0, 0); | 267 Uint32 coln = dmCol(0.0, 0.8, 0.0), colx = dmCol(1.0, 0, 0); |
268 Uint32 *pix = screen->pixels; | 268 Uint32 *pix = screen->pixels; |
269 Sint16 *data = chn->chData; | 269 Sint16 *data = chn->chData; |
270 | 270 |