2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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
10 * $Logfile: /Freespace2/code/Sound/rtvoice.h $
15 * Header file for real-time voice code
18 * Revision 1.2 2002/06/09 04:41:14 relnev
19 * added copyright header
21 * Revision 1.1.1.1 2002/05/03 03:28:12 root
25 * 2 10/07/98 10:54a Dave
28 * 1 10/07/98 10:51a Dave
30 * 12 4/21/98 4:44p Dave
31 * Implement Vasudan ships in multiplayer. Added a debug function to bash
32 * player rank. Fixed a few rtvoice buffer overrun problems. Fixed ui
33 * problem in options screen.
35 * 11 4/17/98 5:27p Dave
36 * More work on the multi options screen. Fixed many minor ui todo bugs.
38 * 10 3/25/98 9:56a Dave
39 * Increase buffer size to handle 8 seconds of voice data.
41 * 9 3/22/98 7:13p Lawrance
42 * Get streaming of recording voice working
44 * 8 2/24/98 11:56p Lawrance
45 * Change real-time voice code to provide the uncompressed size on decode.
47 * 7 2/24/98 10:13p Dave
48 * Put in initial support for multiplayer voice streaming.
50 * 6 2/23/98 6:54p Lawrance
51 * Make interface to real-time voice more generic and useful.
53 * 5 2/16/98 7:31p Lawrance
54 * get compression/decompression of voice working
56 * 4 2/15/98 4:43p Lawrance
57 * work on real-time voice
59 * 3 2/03/98 11:53p Lawrance
60 * Adding support for DirectSoundCapture
62 * 2 1/31/98 5:48p Lawrance
63 * Start on real-time voice recording
72 void rtvoice_set_qos(int qos);
75 int rtvoice_init_recording(int qos);
76 void rtvoice_close_recording();
77 int rtvoice_start_recording( void (*user_callback)() = NULL, int callback_time = 175 );
78 void rtvoice_stop_recording();
79 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);
82 int rtvoice_init_playback();
83 void rtvoice_close_playback();
84 int rtvoice_get_decode_buffer_size();
86 int rtvoice_create_playback_buffer();
87 void rtvoice_free_playback_buffer(int index);
89 void rtvoice_uncompress(unsigned char *data_in, int size_in, double gain, unsigned char *data_out, int size_out);
91 // return a sound handle, _NOT_ a buffer handle
92 int rtvoice_play_compressed(int handle, unsigned char *data, int compressed_size, int uncompressed_size, double gain);
93 int rtvoice_play_uncompressed(int handle, unsigned char *data, int size);
95 // pass in buffer handle returned from rtvoice_create_playback_buffer(), kills the _sound_ only
96 void rtvoice_stop_playback(int handle);
97 void rtvoice_stop_playback_all();