zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
mixer_c.c File Reference
#include "config.h"
#include <assert.h>
#include "alMain.h"
#include "alu.h"
#include "alSource.h"
#include "alAuxEffectSlot.h"
#include "mixer_inc.c"

Go to the source code of this file.

Macros

#define DECL_TEMPLATE(Sampler)
 
#define SUFFIX   C
 

Functions

static __inline void ApplyCoeffs (ALuint Offset, ALfloat(*RESTRICT Values)[2], const ALuint IrSize, ALfloat(*RESTRICT Coeffs)[2], ALfloat left, ALfloat right)
 
static __inline void ApplyCoeffsStep (ALuint Offset, ALfloat(*RESTRICT Values)[2], const ALuint IrSize, ALfloat(*RESTRICT Coeffs)[2], const ALfloat(*RESTRICT CoeffStep)[2], ALfloat left, ALfloat right)
 
static __inline ALfloat cubic32 (const ALfloat *vals, ALuint frac)
 
static __inline ALfloat lerp32 (const ALfloat *vals, ALuint frac)
 
void MixDirect_C (const DirectParams *params, const ALfloat *RESTRICT data, ALuint srcchan, ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
 
void MixSend_C (const SendParams *params, const ALfloat *RESTRICT data, ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
 
static __inline ALfloat point32 (const ALfloat *vals, ALuint frac)
 
void Resample_copy32_C (const ALfloat *data, ALuint frac, ALuint increment, ALfloat *RESTRICT OutBuffer, ALuint BufferSize)
 

Macro Definition Documentation

#define DECL_TEMPLATE (   Sampler)
Value:
void Resample_##Sampler##_C(const ALfloat *data, ALuint frac, \
ALuint increment, ALfloat *RESTRICT OutBuffer, ALuint BufferSize) \
{ \
ALuint pos = 0; \
for(i = 0;i < BufferSize+1;i++) \
{ \
OutBuffer[i] = Sampler(data + pos, frac); \
\
frac += increment; \
pos += frac>>FRACTIONBITS; \
frac &= FRACTIONMASK; \
} \
}
float ALfloat
Definition: al.h:68
for(;;)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl2ext.h:848
unsigned int ALuint
Definition: al.h:59
#define FRACTIONMASK
Definition: alu.h:51
#define FRACTIONBITS
Definition: alu.h:49
int i
Definition: pngrutil.c:1377

Definition at line 26 of file mixer_c.c.

#define SUFFIX   C

Definition at line 81 of file mixer_c.c.

Function Documentation

static __inline void ApplyCoeffs ( ALuint  Offset,
ALfloat(*)  Values[2],
const ALuint  IrSize,
ALfloat(*)  Coeffs[2],
ALfloat  left,
ALfloat  right 
)
static

Definition at line 67 of file mixer_c.c.

References HRIR_MASK.

static __inline void ApplyCoeffsStep ( ALuint  Offset,
ALfloat(*)  Values[2],
const ALuint  IrSize,
ALfloat(*)  Coeffs[2],
const ALfloat(*)  CoeffStep[2],
ALfloat  left,
ALfloat  right 
)
static

Definition at line 50 of file mixer_c.c.

References HRIR_MASK.

static __inline ALfloat cubic32 ( const ALfloat vals,
ALuint  frac 
)
static

Definition at line 15 of file mixer_c.c.

References cubic(), and FRACTIONONE.

static __inline ALfloat lerp32 ( const ALfloat vals,
ALuint  frac 
)
static

Definition at line 13 of file mixer_c.c.

References FRACTIONONE, and lerp().

void MixDirect_C ( const DirectParams params,
const ALfloat *RESTRICT  data,
ALuint  srcchan,
ALuint  OutPos,
ALuint  SamplesToDo,
ALuint  BufferSize 
)
void MixSend_C ( const SendParams params,
const ALfloat *RESTRICT  data,
ALuint  OutPos,
ALuint  SamplesToDo,
ALuint  BufferSize 
)
static __inline ALfloat point32 ( const ALfloat vals,
ALuint  frac 
)
static

Definition at line 11 of file mixer_c.c.

void Resample_copy32_C ( const ALfloat data,
ALuint  frac,
ALuint  increment,
ALfloat *RESTRICT  OutBuffer,
ALuint  BufferSize 
)

Definition at line 18 of file mixer_c.c.

References assert, FRACTIONONE, and memcpy.

Referenced by SelectResampler().