icculus quake2 doxygen
1.0 dev
|
|
Go to the documentation of this file.
40 int sample, samplefrac, fracstep;
47 stepscale = (float)inrate /
dma.
speed;
49 outcount = sc->
length / stepscale;
63 if (stepscale == 1 && inwidth == 1 && sc->
width == 1)
66 for (
i=0 ;
i<outcount ;
i++)
67 ((
signed char *)sc->
data)[
i]
68 = (
int)( (
unsigned char)(data[
i]) - 128);
74 fracstep = stepscale*256;
75 for (
i=0 ;
i<outcount ;
i++)
77 srcsample = samplefrac >> 8;
78 samplefrac += fracstep;
80 sample =
LittleShort ( ((
short *)data)[srcsample] );
82 sample = (
int)( (
unsigned char)(data[srcsample]) - 128) << 8;
84 ((
short *)sc->
data)[
i] = sample;
86 ((
signed char *)sc->
data)[
i] = sample >> 8;
109 if (s->
name[0] ==
'*')
125 strcpy(namebuffer, &
name[1]);
148 len = info.
samples / stepscale;
194 val = val + (*(
data_p+1)<<8);
203 val = val + (*(
data_p+1)<<8);
204 val = val + (*(
data_p+2)<<16);
205 val = val + (*(
data_p+3)<<24);
273 memset (&info, 0,
sizeof(info));
324 if (!strncmp ((
char *)
data_p + 28,
"mark", 4))
short LittleShort(short l)
CONST PIXELFORMATDESCRIPTOR int
void FindChunk(char *name)
void FindNextChunk(char *name)
wavinfo_t GetWavinfo(char *name, byte *wav, int wavlength)
short GetLittleShort(void)
sfxcache_t * S_LoadSound(sfx_t *s)
void ResampleSfx(sfx_t *sfx, int inrate, int inwidth, byte *data)
int FS_LoadFile(char *path, void **buffer)
void Com_Error(int code, char *fmt,...)
void * Z_Malloc(int size)
void Com_DPrintf(char *fmt,...)
void FS_FreeFile(void *buffer)
void Com_Printf(char *fmt,...)
void Com_sprintf(char *dest, int size, char *fmt,...)