]> icculus.org git repositories - theoddone33/hhexen.git/blob - include/i_header.h
remove generated file from cvs
[theoddone33/hhexen.git] / include / i_header.h
1 #ifndef __I_HEADER_H__
2 #define __I_HEADER_H__
3
4 #include "h2def.h"
5
6 //--------
7 //SOUND IO
8 //--------
9 #define FREQ_LOW                0x40
10 #define FREQ_NORM               0x80
11 #define FREQ_HIGH               0xff
12
13 void I_SetMasterVolume(int volume);
14
15 void I_TurnOffSfx(void);
16 void I_TurnOnSfx(void);
17 void I_TurnOffMusic(void);
18 void I_TurnOnMusic(void);
19
20 //  MUSIC I/O
21 //
22
23 int I_RegisterSong(void *songdata);
24 // called by anything that wants to register a song lump with the sound lib
25 // calls Paul's function of the similar name to register music only.
26 // note that the song data is the same for any sound card and is paul's
27 // MUS format.  Returns a handle which will be passed to all other music
28 // functions.
29
30 void I_UnregisterSong(int handle);
31 // called by anything which is finished with a song and no longer needs
32 // the sound library to be aware of it.  All songs should be stopped
33 // before calling this, but it will double check and stop it if necessary.
34
35 void I_LoopSong(int handle);
36 // called by anything that wishes to start music.
37 // plays a song, and when the song is done, starts playing it again in
38 // an endless loop.  the start is faded in over three seconds.
39
40 void I_FadeOutSong(int handle, int fotime);
41 // called by anything that wishes to stop music.
42 // fades out the song over <fotime> milliseconds.
43
44 void I_StopSong(int handle);
45 // called by anything that wishes to stop music.
46 // stops a song abruptly.
47
48 //  SFX I/O
49 //
50
51 void *I_GetSoundEffect (char *soundname);
52 // called by routines which wish to play a sound effect at some later
53 // time.  Pass it the lump name of a sound effect WITHOUT the sfx
54 // prefix.  This means the maximum name length is 7 letters/digits.
55 // The prefixes for different sound cards are 'S','M','A', and 'P'.
56 // They refer to the card type.  The routine will cache in the
57 // appropriate sound effect when it is played.
58
59 void I_UngetSoundEffect (void *soundset);
60 // called by routines which wish to no longer use the sounds at all
61 // frees up the associated structure.  It stops any currently playing
62 // sound effects.
63
64 void I_StartSound (channel_t *c, int vol, int sep, int pitch, int priority);
65 // Starts a sound in a particular sound channel
66
67 void I_UpdateSoundParams(channel_t *c, int vol, int sep, int pitch);
68 // Updates the volume, separation, and pitch of a sound channel
69
70 void I_StopSound(channel_t *c);
71 // Stops a sound channel
72
73 int I_SoundIsPlaying(channel_t *c);
74 // called by S_*()'s to see if a channel is still playing.  Returns 0
75 // if no longer playing, 1 if playing.
76
77 #endif
78