]> icculus.org git repositories - taylor/freespace2.git/blob - include/acm.h
sound.cpp works
[taylor/freespace2.git] / include / acm.h
1 /*
2  * $Logfile: /Freespace2/code/Sound/acm.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Header file for interface to Audio Compression Manager functions
8  *
9  * $Log$
10  * Revision 1.2  2002/05/27 01:06:01  theoddone33
11  * sound.cpp works
12  *
13  * Revision 1.1.1.1  2002/05/03 03:28:12  root
14  * Initial import.
15  *
16  * 
17  * 2     10/07/98 10:53a Dave
18  * Initial checkin.
19  * 
20  * 1     10/07/98 10:51a Dave
21  * 
22  * 5     2/18/98 5:49p Lawrance
23  * Even if the ADPCM codec is unavailable, allow game to continue.
24  * 
25  * 4     11/28/97 2:09p Lawrance
26  * Overhaul how ADPCM conversion works... use much less memory... safer
27  * too.
28  * 
29  * 3     11/22/97 11:32p Lawrance
30  * decompress ADPCM data into 8 bit (not 16bit) for regular sounds (ie not
31  * music)
32  * 
33  * 2     5/29/97 12:03p Lawrance
34  * creation of file to hold AudioCompressionManager specific code
35  *
36  * $NoKeywords: $
37  */
38
39 #ifndef __FREESPACE_ACM_H__
40 #define __FREESPACE_ACM_H__
41
42 #ifndef PLAT_UNIX
43 #include <mmreg.h>
44 #include <msacm.h>
45 #endif
46 #include "pstypes.h"
47
48 int     ACM_convert_ADPCM_to_PCM(WAVEFORMATEX *pwfxSrc, ubyte *src, int src_len, ubyte **dest, int max_dest_bytes, int *dest_len, unsigned int *src_bytes_used, unsigned short dest_bps=16);
49 int     ACM_init();
50 void    ACM_close();
51 int     ACM_is_inited();
52
53
54 int ACM_stream_open(WAVEFORMATEX *pwfxSrc, WAVEFORMATEX *pwfxDest, void **stream, int dest_bps=16);
55 int ACM_stream_close(void *stream);
56 int ACM_query_source_size(void *stream, int dest_len);
57 int ACM_query_dest_size(void *stream, int src_len);
58
59 int ACM_convert(void *stream, ubyte *src, int src_len, ubyte *dest, int max_dest_bytes, unsigned int *dest_len, unsigned int *src_bytes_used);
60
61
62 #endif /* __ACM_H__ */
63