2 * $Logfile: /Freespace2/code/Sound/rtvoice.h $
7 * Header file for real-time voice code
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 2 10/07/98 10:54a Dave
17 * 1 10/07/98 10:51a Dave
19 * 12 4/21/98 4:44p Dave
20 * Implement Vasudan ships in multiplayer. Added a debug function to bash
21 * player rank. Fixed a few rtvoice buffer overrun problems. Fixed ui
22 * problem in options screen.
24 * 11 4/17/98 5:27p Dave
25 * More work on the multi options screen. Fixed many minor ui todo bugs.
27 * 10 3/25/98 9:56a Dave
28 * Increase buffer size to handle 8 seconds of voice data.
30 * 9 3/22/98 7:13p Lawrance
31 * Get streaming of recording voice working
33 * 8 2/24/98 11:56p Lawrance
34 * Change real-time voice code to provide the uncompressed size on decode.
36 * 7 2/24/98 10:13p Dave
37 * Put in initial support for multiplayer voice streaming.
39 * 6 2/23/98 6:54p Lawrance
40 * Make interface to real-time voice more generic and useful.
42 * 5 2/16/98 7:31p Lawrance
43 * get compression/decompression of voice working
45 * 4 2/15/98 4:43p Lawrance
46 * work on real-time voice
48 * 3 2/03/98 11:53p Lawrance
49 * Adding support for DirectSoundCapture
51 * 2 1/31/98 5:48p Lawrance
52 * Start on real-time voice recording
61 void rtvoice_set_qos(int qos);
64 int rtvoice_init_recording(int qos);
65 void rtvoice_close_recording();
66 int rtvoice_start_recording( void (*user_callback)() = NULL, int callback_time = 175 );
67 void rtvoice_stop_recording();
68 void rtvoice_get_data(unsigned char **outbuf, int *compressed_size, int *uncompressed_size, double *gain, unsigned char **outbuf_raw = NULL, int *outbuf_size_raw = NULL);
71 int rtvoice_init_playback();
72 void rtvoice_close_playback();
73 int rtvoice_get_decode_buffer_size();
75 int rtvoice_create_playback_buffer();
76 void rtvoice_free_playback_buffer(int index);
78 void rtvoice_uncompress(unsigned char *data_in, int size_in, double gain, unsigned char *data_out, int size_out);
80 // return a sound handle, _NOT_ a buffer handle
81 int rtvoice_play_compressed(int handle, unsigned char *data, int compressed_size, int uncompressed_size, double gain);
82 int rtvoice_play_uncompressed(int handle, unsigned char *data, int size);
84 // pass in buffer handle returned from rtvoice_create_playback_buffer(), kills the _sound_ only
85 void rtvoice_stop_playback(int handle);
86 void rtvoice_stop_playback_all();