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)
|
if (sc->loopstart >= 0)
|
||||||
{
|
{
|
||||||
ch->pos = sc->loopstart;
|
ch->pos = sc->loopstart;
|
||||||
ch->end = ltime + sc->length - ch->pos;
|
ch->end = ltime + (sc->length - ch->pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // channel just stopped
|
{ // channel just stopped
|
||||||
|
@ -297,10 +297,15 @@ void SND_PaintChannelFrom16 (channel_t *ch, sfxcache_t *sc, int count)
|
||||||
|
|
||||||
leftvol = ch->leftvol * snd_vol;
|
leftvol = ch->leftvol * snd_vol;
|
||||||
rightvol = ch->rightvol * snd_vol;
|
rightvol = ch->rightvol * snd_vol;
|
||||||
sfx = (signed short *)sc->data + ch->pos;
|
sfx = (signed short *)sc->data + ch->pos;
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
if ((ch->pos + i) >= sc->length)
|
||||||
|
{
|
||||||
|
Con_Printf("Overran Sample!\n");
|
||||||
|
}
|
||||||
|
|
||||||
data = sfx[i];
|
data = sfx[i];
|
||||||
left = (data * leftvol) >> 8;
|
left = (data * leftvol) >> 8;
|
||||||
right = (data * rightvol) >> 8;
|
right = (data * rightvol) >> 8;
|
||||||
|
|
Loading…
Reference in a new issue