From 28cc2e24efe15ff7be1f4485014618c19dcfd588 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 17 Apr 2003 03:53:54 +0000 Subject: [PATCH] headpos needs resetting too at sfx end --- libs/audio/renderer/snd_mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/audio/renderer/snd_mem.c b/libs/audio/renderer/snd_mem.c index 7a303a4e4..aa85510b4 100644 --- a/libs/audio/renderer/snd_mem.c +++ b/libs/audio/renderer/snd_mem.c @@ -185,9 +185,10 @@ 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 - buffer->pos = 0; + headpos = buffer->pos = 0; buffer->head = buffer->tail = 0; count = 0; + stream->seek (stream->file, buffer->pos * stepscale, info); } else { buffer->pos -= sfx->length - sfx->loopstart; }