mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +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 (sfx->loopstart == (unsigned int)-1) {
|
||||
// reset the buffer and fill it incase it's needed again
|
||||
headpos = buffer->pos = 0;
|
||||
buffer->pos = 0;
|
||||
} else {
|
||||
buffer->pos -= sfx->loopstart;
|
||||
buffer->pos %= sfx->length - sfx->loopstart;
|
||||
buffer->pos += sfx->loopstart;
|
||||
}
|
||||
}
|
||||
headpos = buffer->pos;
|
||||
stream->seek (stream->file, buffer->pos * stepscale, info);
|
||||
} else {
|
||||
buffer->pos += count;
|
||||
|
|
Loading…
Reference in a new issue