mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-20 19:12:03 +00:00
some debugging checks in the mixer
This commit is contained in:
parent
09b23123d0
commit
31651088f8
1 changed files with 8 additions and 3 deletions
|
@ -220,7 +220,7 @@ void S_PaintChannels (int endtime)
|
|||
if (sc->loopstart >= 0)
|
||||
{
|
||||
ch->pos = sc->loopstart;
|
||||
ch->end = ltime + sc->length - ch->pos;
|
||||
ch->end = ltime + (sc->length - ch->pos);
|
||||
}
|
||||
else
|
||||
{ // channel just stopped
|
||||
|
@ -301,6 +301,11 @@ void SND_PaintChannelFrom16 (channel_t *ch, sfxcache_t *sc, int count)
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if ((ch->pos + i) >= sc->length)
|
||||
{
|
||||
Con_Printf("Overran Sample!\n");
|
||||
}
|
||||
|
||||
data = sfx[i];
|
||||
left = (data * leftvol) >> 8;
|
||||
right = (data * rightvol) >> 8;
|
||||
|
|
Loading…
Reference in a new issue