From 9166b08b067380d96d99b900f6a7a3cb070f669f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 3 Jun 2022 11:54:53 +0900 Subject: [PATCH] [sound] Move sfx_t definition into snd_internal.h I always wanted it there, there were dependency issues at the time. I guess they got cleaned up for the most part since then (other than cd_file, but it's on my hit-list). --- include/QF/sound.h | 24 ------------------------ include/snd_internal.h | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/include/QF/sound.h b/include/QF/sound.h index dc051f193..62e80d115 100644 --- a/include/QF/sound.h +++ b/include/QF/sound.h @@ -42,30 +42,6 @@ struct transform_s; */ ///@{ typedef struct sfx_s sfx_t; -struct sfx_s -{ - struct snd_s *snd; //!< ownding snd_t instance - const char *name; - sfx_t *owner; - - unsigned int length; - unsigned int loopstart; - - union { - struct sfxstream_s *stream; - struct sfxblock_s *block; - } data; - - struct sfxbuffer_s *(*touch) (sfx_t *sfx); - struct sfxbuffer_s *(*retain) (sfx_t *sfx); - void (*release) (sfx_t *sfx); - - struct sfxbuffer_s *(*getbuffer) (sfx_t *sfx); - struct wavinfo_s *(*wavinfo) (sfx_t *sfx); - - sfx_t *(*open) (sfx_t *sfx); - void (*close) (sfx_t *sfx); -}; ///@} /** \defgroup sound_init Initialization functions diff --git a/include/snd_internal.h b/include/snd_internal.h index e9558e95e..ba713ce7c 100644 --- a/include/snd_internal.h +++ b/include/snd_internal.h @@ -52,6 +52,32 @@ typedef struct channel_s channel_t; typedef struct sfxbuffer_s sfxbuffer_t; typedef struct sfxblock_s sfxblock_t; typedef struct sfxstream_s sfxstream_t; + +struct sfx_s +{ + struct snd_s *snd; //!< ownding snd_t instance + const char *name; + sfx_t *owner; + + unsigned int length; + unsigned int loopstart; + + union { + struct sfxstream_s *stream; + struct sfxblock_s *block; + } data; + + struct sfxbuffer_s *(*touch) (sfx_t *sfx); + struct sfxbuffer_s *(*retain) (sfx_t *sfx); + void (*release) (sfx_t *sfx); + + struct sfxbuffer_s *(*getbuffer) (sfx_t *sfx); + struct wavinfo_s *(*wavinfo) (sfx_t *sfx); + + sfx_t *(*open) (sfx_t *sfx); + void (*close) (sfx_t *sfx); +}; + /** paint samples into the mix buffer \param offset offset into the mix buffer at which to start mixing the channel