[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).
This commit is contained in:
Bill Currie 2022-06-03 11:54:53 +09:00
parent 45b3ef79c8
commit 9166b08b06
2 changed files with 26 additions and 24 deletions

View file

@ -42,30 +42,6 @@ struct transform_s;
*/ */
///@{ ///@{
typedef struct sfx_s sfx_t; 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 /** \defgroup sound_init Initialization functions

View file

@ -52,6 +52,32 @@ typedef struct channel_s channel_t;
typedef struct sfxbuffer_s sfxbuffer_t; typedef struct sfxbuffer_s sfxbuffer_t;
typedef struct sfxblock_s sfxblock_t; typedef struct sfxblock_s sfxblock_t;
typedef struct sfxstream_s sfxstream_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 /** paint samples into the mix buffer
\param offset offset into the mix buffer at which to start mixing \param offset offset into the mix buffer at which to start mixing
the channel the channel