[audio] Fix some minor issues

Just little niggles I spotted while sorting out cue points.
This commit is contained in:
Bill Currie 2022-05-21 15:43:18 +09:00
parent 78a0075be1
commit 5cfbafc176
2 changed files with 6 additions and 6 deletions

View File

@ -68,8 +68,6 @@ struct sfx_s
}; };
///@} ///@}
struct model_s;
/** \defgroup sound_init Initialization functions /** \defgroup sound_init Initialization functions
\ingroup sound \ingroup sound
*/ */

View File

@ -134,7 +134,7 @@ SND_StreamRelease (sfx_t *sfx)
wavinfo_t * wavinfo_t *
SND_CacheWavinfo (sfx_t *sfx) SND_CacheWavinfo (sfx_t *sfx)
{ {
return &sfx->data.stream->wavinfo; return &sfx->data.block->wavinfo;
} }
wavinfo_t * wavinfo_t *
@ -161,9 +161,11 @@ read_samples (sfxbuffer_t *buffer, int count)
if ((c = stream->read (stream, data, count)) != count) if ((c = stream->read (stream, data, count)) != count)
Sys_Printf ("%s nr %d %d\n", sfx->name, count, c); Sys_Printf ("%s nr %d %d\n", sfx->name, count, c);
buffer->head += count; if (c > 0) {
if (buffer->head >= buffer->length) buffer->head += count;
buffer->head -= buffer->length; if (buffer->head >= buffer->length)
buffer->head -= buffer->length;
}
} }
} }