File: fsspeech.h

package info (click to toggle)
freespace2 3.7.0%2Brepack-2
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 22,848 kB
  • ctags: 41,897
  • sloc: cpp: 369,931; makefile: 1,060; xml: 129; sh: 112
file content (58 lines) | stat: -rw-r--r-- 1,367 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * Code created by Thomas Whittaker (RT) for a FreeSpace 2 source code project
 *
 * You may not sell or otherwise commercially exploit the source or things you 
 * created based on the source.
 *
*/ 

#ifndef _FSSPEECH_H_
#define _FSSPEECH_H_

enum
{
	FSSPEECH_FROM_TECHROOM,
	FSSPEECH_FROM_BRIEFING,
	FSSPEECH_FROM_INGAME,
	FSSPEECH_FROM_MULTI,
	FSSPEECH_FROM_MAX
};

#ifdef FS2_SPEECH

bool fsspeech_init();
void fsspeech_deinit();
void fsspeech_play(int type, const char *text);
void fsspeech_stop();
void fsspeech_pause(bool playing);

void fsspeech_start_buffer();
void fsspeech_stuff_buffer(const char *text);
void fsspeech_play_buffer(int type);

bool fsspeech_play_from(int type);
bool fsspeech_playing();

inline bool fsspeech_was_compiled() { return true; }

#else

// stub functions (c.f. NO_SOUND)

inline bool fsspeech_init() { return false; }
inline void fsspeech_deinit() {}
inline void fsspeech_play(int type, const char *text) { }
inline void fsspeech_stop() {}
inline void fsspeech_pause(bool playing) { }

inline void fsspeech_start_buffer() {}
inline void fsspeech_stuff_buffer(const char *text) { }
inline void fsspeech_play_buffer(int type) {}

inline bool fsspeech_play_from(int type) { return false; }
inline bool fsspeech_playing() { return false; }
inline bool fsspeech_was_compiled( ) { return false; }

#endif

#endif	// header define