mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
turn on graph generation in the doxygen output. very slow, but the diagrams are worth it. Also make the data member of sfx_t a union rather than void so doxygen can see the relationships (and gets rid of a bunch of casts that I never liked anyway).
This commit is contained in:
parent
6a019f1859
commit
7af2378e03
9 changed files with 29 additions and 26 deletions
|
@ -930,7 +930,7 @@ HIDE_UNDOC_RELATIONS = YES
|
|||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||
# have no effect if this option is set to NO (the default)
|
||||
|
||||
HAVE_DOT = NO
|
||||
HAVE_DOT = YES
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
|
|
|
@ -48,7 +48,10 @@ struct sfx_s
|
|||
unsigned int length;
|
||||
unsigned int loopstart;
|
||||
|
||||
void *data;
|
||||
union {
|
||||
struct sfxstream_s *stream;
|
||||
struct sfxblock_s *block;
|
||||
} data;
|
||||
|
||||
struct sfxbuffer_s *(*touch) (sfx_t *sfx);
|
||||
struct sfxbuffer_s *(*retain) (sfx_t *sfx);
|
||||
|
|
|
@ -393,7 +393,7 @@ void SND_SetPaint (sfxbuffer_t *sc);
|
|||
//@}
|
||||
|
||||
|
||||
/** \defgroup sound_render_resample Resampling functios
|
||||
/** \defgroup sound_render_resample Resampling functions
|
||||
\ingroup sound_render
|
||||
*/
|
||||
//@{
|
||||
|
|
|
@ -337,7 +337,7 @@ flac_stream_seek (void *file, int pos, wavinfo_t *info)
|
|||
static void
|
||||
flac_stream_close (sfx_t *sfx)
|
||||
{
|
||||
sfxstream_t *stream = (sfxstream_t *)sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
|
||||
close_flac (stream->file);
|
||||
free (stream);
|
||||
|
@ -347,7 +347,7 @@ flac_stream_close (sfx_t *sfx)
|
|||
static sfx_t *
|
||||
flac_stream_open (sfx_t *sfx)
|
||||
{
|
||||
sfxstream_t *stream = (sfxstream_t *) sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
QFile *file;
|
||||
void *f;
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ midi_stream_seek (void *file, int pos, wavinfo_t *info)
|
|||
static void
|
||||
midi_stream_close (sfx_t *sfx)
|
||||
{
|
||||
sfxstream_t *stream = (sfxstream_t *)sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
|
||||
WildMidi_Close (stream->file);
|
||||
free (stream);
|
||||
|
@ -126,7 +126,7 @@ midi_stream_close (sfx_t *sfx)
|
|||
static sfx_t *
|
||||
midi_stream_open (sfx_t *sfx)
|
||||
{
|
||||
sfxstream_t *stream = (sfxstream_t *) sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
QFile *file;
|
||||
midi *handle;
|
||||
unsigned char *local_buffer;
|
||||
|
|
|
@ -84,19 +84,19 @@ snd_open (sfx_t *sfx)
|
|||
sfxbuffer_t *
|
||||
SND_CacheTouch (sfx_t *sfx)
|
||||
{
|
||||
return Cache_Check (&((sfxblock_t *) sfx->data)->cache);
|
||||
return Cache_Check (&sfx->data.block->cache);
|
||||
}
|
||||
|
||||
sfxbuffer_t *
|
||||
SND_CacheGetBuffer (sfx_t *sfx)
|
||||
{
|
||||
return ((sfxblock_t *) sfx->data)->buffer;
|
||||
return sfx->data.block->buffer;
|
||||
}
|
||||
|
||||
sfxbuffer_t *
|
||||
SND_CacheRetain (sfx_t *sfx)
|
||||
{
|
||||
sfxblock_t *block = (sfxblock_t *) sfx->data;
|
||||
sfxblock_t *block = sfx->data.block;
|
||||
block->buffer = Cache_TryGet (&block->cache);
|
||||
if (!block->buffer)
|
||||
Sys_Printf ("failed to cache sound!\n");
|
||||
|
@ -106,7 +106,7 @@ SND_CacheRetain (sfx_t *sfx)
|
|||
void
|
||||
SND_CacheRelease (sfx_t *sfx)
|
||||
{
|
||||
sfxblock_t *block = (sfxblock_t *) sfx->data;
|
||||
sfxblock_t *block = sfx->data.block;
|
||||
// due to the possibly asynchronous nature of the mixer, the cache
|
||||
// may have been flushed behind our backs
|
||||
if (block->cache.data) {
|
||||
|
@ -124,13 +124,13 @@ SND_CacheRelease (sfx_t *sfx)
|
|||
sfxbuffer_t *
|
||||
SND_StreamGetBuffer (sfx_t *sfx)
|
||||
{
|
||||
return &((sfxstream_t *) sfx->data)->buffer;
|
||||
return &sfx->data.stream->buffer;
|
||||
}
|
||||
|
||||
sfxbuffer_t *
|
||||
SND_StreamRetain (sfx_t *sfx)
|
||||
{
|
||||
return &((sfxstream_t *) sfx->data)->buffer;
|
||||
return &sfx->data.stream->buffer;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -141,13 +141,13 @@ SND_StreamRelease (sfx_t *sfx)
|
|||
wavinfo_t *
|
||||
SND_CacheWavinfo (sfx_t *sfx)
|
||||
{
|
||||
return &((sfxblock_t *) sfx->data)->wavinfo;
|
||||
return &sfx->data.stream->wavinfo;
|
||||
}
|
||||
|
||||
wavinfo_t *
|
||||
SND_StreamWavinfo (sfx_t *sfx)
|
||||
{
|
||||
return &((sfxstream_t *) sfx->data)->wavinfo;
|
||||
return &sfx->data.stream->wavinfo;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -166,7 +166,7 @@ read_samples (sfxbuffer_t *buffer, int count, void *prev)
|
|||
float stepscale;
|
||||
int samples, size;
|
||||
sfx_t *sfx = buffer->sfx;
|
||||
sfxstream_t *stream = (sfxstream_t *) sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
wavinfo_t *info = &stream->wavinfo;
|
||||
|
||||
stepscale = (float) info->rate / snd_shm->speed;
|
||||
|
@ -240,7 +240,7 @@ SND_StreamSetPos (sfxbuffer_t *buffer, unsigned int pos)
|
|||
{
|
||||
float stepscale;
|
||||
sfx_t *sfx = buffer->sfx;
|
||||
sfxstream_t *stream = (sfxstream_t *) sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
wavinfo_t *info = &stream->wavinfo;
|
||||
|
||||
stepscale = (float) info->rate / snd_shm->speed;
|
||||
|
@ -258,7 +258,7 @@ SND_StreamAdvance (sfxbuffer_t *buffer, unsigned int count)
|
|||
float stepscale;
|
||||
unsigned int headpos, samples;
|
||||
sfx_t *sfx = buffer->sfx;
|
||||
sfxstream_t *stream = (sfxstream_t *) sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
wavinfo_t *info = &stream->wavinfo;
|
||||
|
||||
stream->pos += count;
|
||||
|
|
|
@ -79,7 +79,7 @@ SND_SFX_Cache (sfx_t *sfx, char *realname, wavinfo_t info,
|
|||
{
|
||||
sfxblock_t *block = calloc (1, sizeof (sfxblock_t));
|
||||
|
||||
sfx->data = block;
|
||||
sfx->data.block = block;
|
||||
sfx->wavinfo = SND_CacheWavinfo;
|
||||
sfx->touch = SND_CacheTouch;
|
||||
sfx->retain = SND_CacheRetain;
|
||||
|
@ -103,7 +103,7 @@ SND_SFX_Stream (sfx_t *sfx, char *realname, wavinfo_t info,
|
|||
sfx->touch = sfx->retain = SND_StreamRetain;
|
||||
sfx->release = SND_StreamRelease;
|
||||
sfx->getbuffer = SND_StreamGetBuffer;
|
||||
sfx->data = stream;
|
||||
sfx->data.stream = stream;
|
||||
|
||||
stream->file = realname;
|
||||
stream->wavinfo = info;
|
||||
|
@ -115,7 +115,7 @@ SND_SFX_StreamOpen (sfx_t *sfx, void *file,
|
|||
int (*seek)(void *, int, wavinfo_t *),
|
||||
void (*close) (sfx_t *))
|
||||
{
|
||||
sfxstream_t *stream = (sfxstream_t *) sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
wavinfo_t *info = &stream->wavinfo;
|
||||
int samples;
|
||||
int size;
|
||||
|
@ -138,7 +138,7 @@ SND_SFX_StreamOpen (sfx_t *sfx, void *file,
|
|||
size *= 2;
|
||||
|
||||
stream = calloc (1, sizeof (sfxstream_t) + size);
|
||||
new_sfx->data = stream;
|
||||
new_sfx->data.stream = stream;
|
||||
memcpy (stream->buffer.data + size, "\xde\xad\xbe\xef", 4);
|
||||
stream->file = file;
|
||||
stream->sfx = new_sfx;
|
||||
|
|
|
@ -234,7 +234,7 @@ vorbis_stream_seek (void *file, int pos, wavinfo_t *info)
|
|||
static void
|
||||
vorbis_stream_close (sfx_t *sfx)
|
||||
{
|
||||
sfxstream_t *stream = (sfxstream_t *)sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
|
||||
ov_clear (stream->file);
|
||||
free (stream);
|
||||
|
@ -244,7 +244,7 @@ vorbis_stream_close (sfx_t *sfx)
|
|||
static sfx_t *
|
||||
vorbis_stream_open (sfx_t *sfx)
|
||||
{
|
||||
sfxstream_t *stream = (sfxstream_t *) sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
QFile *file;
|
||||
void *f;
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ wav_stream_seek (void *file, int pos, wavinfo_t *info)
|
|||
static void
|
||||
wav_stream_close (sfx_t *sfx)
|
||||
{
|
||||
sfxstream_t *stream = (sfxstream_t *)sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
|
||||
Qclose (stream->file);
|
||||
free (stream);
|
||||
|
@ -114,7 +114,7 @@ wav_stream_close (sfx_t *sfx)
|
|||
static sfx_t *
|
||||
wav_stream_open (sfx_t *sfx)
|
||||
{
|
||||
sfxstream_t *stream = (sfxstream_t *) sfx->data;
|
||||
sfxstream_t *stream = sfx->data.stream;
|
||||
QFile *file;
|
||||
|
||||
QFS_FOpenFile (stream->file, &file);
|
||||
|
|
Loading…
Reference in a new issue