FS2_Open
Open source remastering of the Freespace 2 engine
multi_voice.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef _MULTIPLAYER_VOICE_STREAMING_HEADER_FILE
13 #define _MULTIPLAYER_VOICE_STREAMING_HEADER_FILE
14 
15 // --------------------------------------------------------------------------------------------------
16 // MULTI VOICE DEFINES/VARS
17 //
18 
19 struct header;
20 
21 // voice system status defines
22 #define MULTI_VOICE_STATUS_IDLE 0 // nothing's happening, do nothing
23 #define MULTI_VOICE_STATUS_DENIED 1 // have been denied the token (show a red icon or something)
24 #define MULTI_VOICE_STATUS_RECORDING 2 // am currently recording (show a green icon or something)
25 #define MULTI_VOICE_STATUS_PLAYING 3 // playing back a stream (show another icon)
26 
27 // max recording time for one stream
28 #define MULTI_VOICE_MAX_TIME 5000
29 
30 // capabilities of this machine (make sure multi_voice_init() is called before referencing these)
31 extern int Multi_voice_can_record;
32 extern int Multi_voice_can_play;
33 
34 // local muting preferences
35 extern int Multi_voice_local_prefs;
36 
37 
38 // --------------------------------------------------------------------------------------------------
39 // MULTI VOICE FUNCTIONS
40 //
41 
42 // initialize the multiplayer voice system
43 void multi_voice_init();
44 
45 // shutdown the multiplayer voice system
46 void multi_voice_close();
47 
48 // reset between levels
49 void multi_voice_reset();
50 
51 // process all voice details
52 void multi_voice_process();
53 
54 // set the default voice quality and duration (if server passes -1, he just broadcasts the qos to all clients)
55 void multi_voice_set_vars(int qos,int duration);
56 
57 // voice settings debug console function
58 void multi_voice_dcf();
59 
60 // update the qos and/or duration of recording if the current setting is different from the passed in value
61 void multi_voice_maybe_update_vars(int new_qos,int new_duration);
62 
63 // the status of the voice system - use this to determine what bitmaps to display, etc see above MULTI_VOICE_STATUS_* defines
64 int multi_voice_status();
65 
66 // <player> sends hit bitflag settings (who he'll receive sound from, etc)
67 void multi_voice_set_prefs(int pref_flags);
68 
69 
70 // --------------------------------------------------------------------------------------------------
71 // MULTI VOICE / RTVOICE INTERFACE
72 //
73 
74 // process the "next" chunk of standalone valid sound data from the rtvoice system
76 
77 
78 // --------------------------------------------------------------------------------------------------
79 // MULTI VOICE PACKET HANDLERS
80 //
81 
82 // process an incoming voice packet of some kind or another
83 void multi_voice_process_packet(unsigned char *data, header *hinfo);
84 
85 
86 // --------------------------------------------------------------------------------------------------
87 // MULTI VOICE TESTING FUNCTIONS
88 //
89 
90 // start recording voice locally for playback testing
92 
93 // return if the test recording is going on
95 
96 // call this function if multi_voice_test_recording() is true to process various odds and ends of the test recording
98 
99 // force stop any recording voice test
101 
102 // get a playback buffer handle (return -1 if none exist - bad)
104 
105 // return whether the last sampled chunk would have been too large to fit in a packet
107 
108 #endif
void multi_voice_maybe_update_vars(int new_qos, int new_duration)
void multi_voice_test_record_stop()
void multi_voice_set_vars(int qos, int duration)
int multi_voice_test_recording()
void multi_voice_reset()
void multi_voice_process_next_chunk()
void multi_voice_process_packet(unsigned char *data, header *hinfo)
void multi_voice_process()
void multi_voice_close()
int multi_voice_test_packet_tossed()
void multi_voice_init()
int Multi_voice_can_record
Definition: multi_voice.cpp:41
int multi_voice_status()
Definition: multi.h:385
int Multi_voice_local_prefs
int Multi_voice_can_play
Definition: multi_voice.cpp:42
GLenum GLsizei GLenum GLenum const GLvoid * data
Definition: Gl.h:1509
void multi_voice_test_record_start()
void multi_voice_dcf()
void multi_voice_set_prefs(int pref_flags)
void multi_voice_test_process()
int multi_voice_test_get_playback_buffer()