File: speech.h

package info (click to toggle)
freespace2 24.2.0%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 43,716 kB
  • sloc: cpp: 595,001; ansic: 21,741; python: 1,174; sh: 457; makefile: 248; xml: 181
file content (48 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | download | duplicates (2)
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
/*
 * 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 _SPEECH_H_
#define _SPEECH_H_

#include "globalincs/pstypes.h"

#if FS2_SPEECH

bool speech_init();
void speech_deinit();
bool speech_play(const char *text);
bool speech_pause();
bool speech_resume();
bool speech_stop();

bool speech_set_volume(unsigned short volume);
bool speech_set_voice(int voice);

bool speech_is_speaking();

SCP_vector<SCP_string> speech_enumerate_voices();

#else

inline bool speech_init() { return false; }
inline void speech_deinit() {}
inline bool speech_play(const char* /*text*/) { return false; }
inline bool speech_pause() { return false; }
inline bool speech_resume() { return false; }
inline bool speech_stop() { return false; }
inline bool speech_set_volume(unsigned short /*volume*/) { return false; }
inline bool speech_set_voice(int /*voice*/) { return false; }
inline bool speech_is_speaking() { return false; }

inline SCP_vector<SCP_string> speech_enumerate_voices() {
	return SCP_vector<SCP_string>();
}

#endif

#endif