*snd_out++ = bound(-32768, val, 32767);
}
}
+
+ // noise is really really annoying
+ if (cls.timedemo)
+ memset(rb_ptr, 0, nbframes * channels * width);
}
else // 8bit
{
*snd_out++ = bound(0, val, 255);
}
}
+
+ // noise is really really annoying
+ if (cls.timedemo)
+ memset(rb_ptr, 128, nbframes * channels);
}
}
for (i = 0; i < total_channels ; i++, ch++)
{
sfx_t *sfx;
- unsigned int ltime;
- unsigned int count;
+ int ltime;
+ int count;
sfx = ch->sfx;
if (sfx == NULL)
if (ch->pos < 0)
{
count = -ch->pos;
- count = min(count, frames - ltime);
+ count = min(count, (int)frames - ltime);
ch->pos += count;
ltime += count;
}
- while (ltime < frames)
+ while (ltime < (int)frames)
{
// paint up to end of buffer or of input, whichever is lower
count = sfx->total_length - ch->pos;
- count = bound(0, count, frames - ltime);
+ count = bound(0, count, (int)frames - ltime);
if (count)
{
SND_PaintChannel (ch, paintbuffer + ltime, count);