News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

private.h File Reference

private.h File Reference

#include <memory.h>
#include "gsm.h"

Data Structures

struct  gsm_state

Defines

#define INLINE
#define GSM_MAGIC   0xD /* 13 kbit/s RPE-LTP */
#define MIN_WORD   (-32767 - 1)
#define MAX_WORD   32767
#define SASR(x, by)   ((x) >> (by))
#define SASL(x, by)   ((x) << (by))
#define GSM_MULT_R(a, b)   (SASR( ((longword)(a) * (longword)(b)), 15 ))
#define GSM_MULT(a, b)   (SASR( ((longword)(a) * (longword)(b)), 15 ))
#define GSM_ADD(a, b)   (gsmword)((ltmp = (longword)(a) + (longword)(b)) >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
#define GSM_SUB(a, b)   (gsmword)((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
#define GSM_ABS(a)   (gsmword)((a) < 0 ? -(a) : (a))

Typedefs

typedef long gsmword
typedef long longword

Functions

INLINE gsmword gsm_div (gsmword num, gsmword denum)


Define Documentation

#define INLINE
 

#define GSM_MAGIC   0xD /* 13 kbit/s RPE-LTP */
 

#define MIN_WORD   (-32767 - 1)
 

#define MAX_WORD   32767
 

#define SASR x,
by   )     ((x) >> (by))
 

#define SASL x,
by   )     ((x) << (by))
 

#define GSM_MULT_R a,
 )     (SASR( ((longword)(a) * (longword)(b)), 15 ))
 

#define GSM_MULT a,
 )     (SASR( ((longword)(a) * (longword)(b)), 15 ))
 

#define GSM_ADD a,
 )     (gsmword)((ltmp = (longword)(a) + (longword)(b)) >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
 

#define GSM_SUB a,
 )     (gsmword)((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
 

#define GSM_ABS  )     (gsmword)((a) < 0 ? -(a) : (a))
 


Typedef Documentation

typedef long gsmword
 

typedef long longword
 


Function Documentation

INLINE gsmword gsm_div gsmword  num,
gsmword  denum