Debian Codegraph @

Descent3/audiotaunts.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/main/audiotaunts.h $
21 * $Revision: 4 $
22 * $Date: 4/29/99 11:02p $
23 * $Author: Jeff $
24 *
25 * in-game audio taunt API
26 *
27 * $Log: /DescentIII/main/audiotaunts.h $
28 *
29 * 4 4/29/99 11:02p Jeff
30 * added the ability for the server to set audio taunt delay time via
31 * command line option and/or dedicated server console
32 *
33 * 3 3/22/99 6:20p Jeff
34 * added 2 more audio taunts. a mulitplayer event when someone plays an
35 * audio taunt. option to disable audio taunts.
36 *
37 * 2 1/27/99 5:47p Jeff
38 * audio taunts implemented!
39 *
40 * 1 1/27/99 1:31a Jeff
41 *
42 * $NoKeywords: $
43 */
44
45 #ifndef __AUDIO_TAUNT_H_
46 #define __AUDIO_TAUNT_H_
47
48 extern bool Audio_taunts_enabled;
49
50 // Error codes:
51 #define TAUNTIMPERR_NOERROR 0
52 #define TAUNTIMPERR_NOTFOUND 1
53 #define TAUNTIMPERR_NOTRIFF 2
54 #define TAUNTIMPERR_NOTWAVE 3
55 #define TAUNTIMPERR_INVALIDFILE 4
56 #define TAUNTIMPERR_NOTSUPPORTED 5
57 #define TAUNTIMPERR_INVALIDCHANNELS 6
58 #define TAUNTIMPERR_INVALIDSAMPLES 7
59 #define TAUNTIMPERR_INVALIDBITDEPTH 8
60 #define TAUNTIMPERR_NODATA 9
61 #define TAUNTIMPERR_OSFEXISTS 10
62 #define TAUNTIMPERR_INTERNALERR 11
63 #define TAUNTIMPERR_COMPRESSIONFAILURE 12
64 #define TAUNTIMPERR_OUTOFMEM 13
65 #define TAUNTIMPERR_NOOPENOSF 14
66
67 // taunt_GetError
68 //
69 // Returns more information about a failed import
70 int taunt_GetError(void);
71
72 // taunt_GetErrorString
73 // Returns a string describing an error code
74 const char *taunt_GetErrorString(int error);
75
76 // taunt_ImportWave
77 // Given a fully qualified wave_filename (location of a .wav) and a fully
78 // qualified outputfilename (where the .osf is to go), it will convert and
79 // compress the wav file.
80 bool taunt_ImportWave(char *wave_filename, char *outputfilename);
81
82 // taunt_PlayTauntFile
83 //
84 // Given a path to an .osf file, it will play it
85 bool taunt_PlayTauntFile(const char *filename);
86
87 // taunt_PlayPlayerTaunt
88 //
89 // Given a playernum, and which taunt (0 or 1) it will play that taunt
90 bool taunt_PlayPlayerTaunt(int pnum, int index);
91
92 // taunt_AreEnabled
93 //
94 // Returns true if taunts are enabled
95 bool taunt_AreEnabled(void);
96
97 // taunt_Enable
98 //
99 // Enables/Disables audio_taunts for the player
100 void taunt_Enable(bool enable);
101
102 // taunt_DelayTime()
103 //
104 // Returns the delay time between taunts
105 float taunt_DelayTime(void);
106
107 // taunt_SetDelayTime()
108 //
109 // Sets the taunt delay time
110 void taunt_SetDelayTime(float t);
111
112 #endif