summaryrefslogtreecommitdiff
path: root/src/snd_local.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/snd_local.h')
-rw-r--r--src/snd_local.h82
1 files changed, 38 insertions, 44 deletions
diff --git a/src/snd_local.h b/src/snd_local.h
index e271c95..59532ce 100644
--- a/src/snd_local.h
+++ b/src/snd_local.h
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
@@ -20,14 +20,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// snd_loc.h -- private sound functions
// !!! if this is changed, the asm code must change !!!
-typedef struct samplepair_s
-{
+typedef struct samplepair_s {
int left;
int right;
} samplepair_t;
-typedef struct sfxcache_s
-{
+typedef struct sfxcache_s {
int length;
int loopstart;
int width;
@@ -38,8 +36,7 @@ typedef struct sfxcache_s
byte data[1]; // variable sized
} sfxcache_t;
-typedef struct sfx_s
-{
+typedef struct sfx_s {
char name[MAX_QPATH];
int registration_sequence;
sfxcache_t *cache;
@@ -50,8 +47,7 @@ typedef struct sfx_s
// a playsound_t will be generated by each call to S_StartSound,
// when the mixer reaches playsound->begin, the playsound will
// be assigned to a channel
-typedef struct playsound_s
-{
+typedef struct playsound_s {
struct playsound_s *prev, *next;
sfx_t *sfx;
float volume;
@@ -63,8 +59,7 @@ typedef struct playsound_s
unsigned begin; // begin on this sample
} playsound_t;
-typedef struct dma_s
-{
+typedef struct dma_s {
int channels;
int samples; // mono samples in buffer
int submission_chunk; // don't mix less than this #
@@ -75,8 +70,7 @@ typedef struct dma_s
} dma_t;
// !!! if this is changed, the asm code must change !!!
-typedef struct channel_s
-{
+typedef struct channel_s {
sfx_t *sfx; // sfx number
int leftvol; // 0-255 volume
int rightvol; // 0-255 volume
@@ -118,45 +112,45 @@ typedef enum { SIS_SUCCESS, SIS_FAILURE, SIS_NOTAVAIL } sndinitstat_t;
typedef struct snddmaAPI_s {
// initializes cycling through a DMA buffer and returns information on it
- sndinitstat_t (*Init)( void );
+ sndinitstat_t (*Init)(void);
// shutdown the DMA xfer.
- void (*Shutdown)( void );
+ void (*Shutdown)(void);
- void (*BeginPainting)( void );
- void (*Submit)( void );
- void (*Activate)( qboolean active );
+ void (*BeginPainting)(void);
+ void (*Submit)(void);
+ void (*Activate)(qboolean active);
} snddmaAPI_t;
-void WAVE_FillAPI( snddmaAPI_t *api );
+void WAVE_FillAPI(snddmaAPI_t *api);
#if USE_DSOUND
-void DS_FillAPI( snddmaAPI_t *api );
+void DS_FillAPI(snddmaAPI_t *api);
#endif
//extern snddmaAPI_t snddma;
extern dma_t dma;
-void DMA_SoundInfo( void );
-qboolean DMA_Init( void );
-void DMA_Shutdown( void );
-void DMA_Activate( void );
-int DMA_DriftBeginofs( float timeofs );
-void DMA_ClearBuffer( void );
-void DMA_Update( void );
+void DMA_SoundInfo(void);
+qboolean DMA_Init(void);
+void DMA_Shutdown(void);
+void DMA_Activate(void);
+int DMA_DriftBeginofs(float timeofs);
+void DMA_ClearBuffer(void);
+void DMA_Update(void);
#endif
#if USE_OPENAL
-void AL_SoundInfo( void );
-qboolean AL_Init( void );
-void AL_Shutdown( void );
-sfxcache_t *AL_UploadSfx( sfx_t *s );
-void AL_DeleteSfx( sfx_t *s );
-void AL_StopChannel( channel_t *ch );
-void AL_PlayChannel( channel_t *ch );
-void AL_StopAllChannels( void );
-void AL_Update( void );
+void AL_SoundInfo(void);
+qboolean AL_Init(void);
+void AL_Shutdown(void);
+sfxcache_t *AL_UploadSfx(sfx_t *s);
+void AL_DeleteSfx(sfx_t *s);
+void AL_StopChannel(channel_t *ch);
+void AL_PlayChannel(channel_t *ch);
+void AL_StopAllChannels(void);
+void AL_Update(void);
#endif
//====================================================================
@@ -202,16 +196,16 @@ extern cvar_t *s_testsound;
extern cvar_t *s_ambient;
extern cvar_t *s_show;
-#define S_Malloc( x ) Z_TagMalloc( x, TAG_SOUND )
-#define S_CopyString( x ) Z_TagCopyString( x, TAG_SOUND )
+#define S_Malloc(x) Z_TagMalloc(x, TAG_SOUND)
+#define S_CopyString(x) Z_TagCopyString(x, TAG_SOUND)
-sfx_t *S_SfxForHandle( qhandle_t hSfx );
-sfxcache_t *S_LoadSound (sfx_t *s);
-channel_t *S_PickChannel( int entnum, int entchannel );
-void S_IssuePlaysound (playsound_t *ps);
-void S_BuildSoundList( int *sounds );
+sfx_t *S_SfxForHandle(qhandle_t hSfx);
+sfxcache_t *S_LoadSound(sfx_t *s);
+channel_t *S_PickChannel(int entnum, int entchannel);
+void S_IssuePlaysound(playsound_t *ps);
+void S_BuildSoundList(int *sounds);
#if USE_SNDDMA
-void S_InitScaletable (void);
+void S_InitScaletable(void);
void S_PaintChannels(int endtime);
#endif