[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,11 +161,13 @@ 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);
if (c > 0) {
buffer->head += count; buffer->head += count;
if (buffer->head >= buffer->length) if (buffer->head >= buffer->length)
buffer->head -= buffer->length; buffer->head -= buffer->length;
} }
} }
}
static void static void
fill_buffer (sfx_t *sfx, sfxstream_t *stream, sfxbuffer_t *buffer, fill_buffer (sfx_t *sfx, sfxstream_t *stream, sfxbuffer_t *buffer,