FS2_Open
Open source remastering of the Freespace 2 engine
acm.cpp File Reference
#include "globalincs/pstypes.h"
#include "sound/acm.h"

Go to the source code of this file.

Classes

struct  adpcmcoef_tag
 
struct  adpcmblockheader_tag
 
struct  adpcmwaveformat_tag
 
struct  ADPCM_FMT_T
 
struct  acm_stream_t
 

Macros

#define WAVE_FORMAT_ADPCM   2
 
#define IF_ERR(a, b)   if (a) { mprintf(("ACM ERROR, line %d...\n", __LINE__)); return b; }
 
#define IF_ERR2(a, b)   if (a) { mprintf(("ACM ERROR, line %d...\n", __LINE__)); b; }
 
#define FIXED_POINT_COEF_BASE   256
 
#define FIXED_POINT_ADAPTION_BASE   256
 
#define SMALLEST_ADPCM_DELTA   16
 

Typedefs

typedef struct adpcmcoef_tag ADPCMCOEFSET
 
typedef struct adpcmblockheader_tag ADPCMBLOCKHEADER
 
typedef struct adpcmwaveformat_tag ADPCMWAVEFORMAT
 
typedef struct ADPCM_FMT_T adpcm_fmt_t
 
typedef struct acm_stream_t acm_stream_t
 

Functions

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, int dest_bps)
 
int ACM_stream_open (WAVEFORMATEX *pwfxSrc, WAVEFORMATEX *pwfxDest, void **stream, int dest_bps)
 
int ACM_stream_close (void *stream)
 
int ACM_query_source_size (void *stream, int dest_len)
 
int ACM_query_dest_size (void *stream, int src_len)
 
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)
 

Macro Definition Documentation

#define FIXED_POINT_ADAPTION_BASE   256

Definition at line 75 of file acm.cpp.

#define FIXED_POINT_COEF_BASE   256

Definition at line 74 of file acm.cpp.

#define IF_ERR (   a,
  b 
)    if (a) { mprintf(("ACM ERROR, line %d...\n", __LINE__)); return b; }

Definition at line 62 of file acm.cpp.

#define IF_ERR2 (   a,
  b 
)    if (a) { mprintf(("ACM ERROR, line %d...\n", __LINE__)); b; }

Definition at line 63 of file acm.cpp.

#define SMALLEST_ADPCM_DELTA   16

Definition at line 76 of file acm.cpp.

#define WAVE_FORMAT_ADPCM   2

Definition at line 16 of file acm.cpp.

Typedef Documentation

typedef struct acm_stream_t acm_stream_t
typedef struct ADPCM_FMT_T adpcm_fmt_t
typedef struct adpcmcoef_tag ADPCMCOEFSET

Function Documentation

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 
)

Definition at line 635 of file acm.cpp.

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,
int  dest_bps 
)

Definition at line 351 of file acm.cpp.

int ACM_query_dest_size ( void stream,
int  src_len 
)

Definition at line 620 of file acm.cpp.

int ACM_query_source_size ( void stream,
int  dest_len 
)

Definition at line 605 of file acm.cpp.

int ACM_stream_close ( void stream)

Definition at line 591 of file acm.cpp.

int ACM_stream_open ( WAVEFORMATEX pwfxSrc,
WAVEFORMATEX pwfxDest,
void **  stream,
int  dest_bps 
)

Definition at line 499 of file acm.cpp.