mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
more headpos resetage
This commit is contained in:
parent
28cc2e24ef
commit
51f7b934d1
1 changed files with 2 additions and 1 deletions
|
@ -172,13 +172,14 @@ SND_StreamAdvance (sfxbuffer_t *buffer, unsigned int count)
|
||||||
if (buffer->pos > sfx->length) {
|
if (buffer->pos > sfx->length) {
|
||||||
if (sfx->loopstart == (unsigned int)-1) {
|
if (sfx->loopstart == (unsigned int)-1) {
|
||||||
// reset the buffer and fill it incase it's needed again
|
// reset the buffer and fill it incase it's needed again
|
||||||
headpos = buffer->pos = 0;
|
buffer->pos = 0;
|
||||||
} else {
|
} else {
|
||||||
buffer->pos -= sfx->loopstart;
|
buffer->pos -= sfx->loopstart;
|
||||||
buffer->pos %= sfx->length - sfx->loopstart;
|
buffer->pos %= sfx->length - sfx->loopstart;
|
||||||
buffer->pos += sfx->loopstart;
|
buffer->pos += sfx->loopstart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
headpos = buffer->pos;
|
||||||
stream->seek (stream->file, buffer->pos * stepscale, info);
|
stream->seek (stream->file, buffer->pos * stepscale, info);
|
||||||
} else {
|
} else {
|
||||||
buffer->pos += count;
|
buffer->pos += count;
|
||||||
|
|
Loading…
Reference in a new issue