shithub: ft2-clone

ref: 2f4495e7dc0bb2547d918b974f56945517cac21e
dir: /src/mixer/ft2_cubic.h/

View raw version
#pragma once

#include <stdbool.h>
#include "../ft2_audio.h" // MIXER_FRAC_BITS definition

// if you change this, also change CUBIC_PHASES_BITS
#define CUBIC_PHASES 4096
#define CUBIC_PHASES_BITS 12 /* log2(CUBIC_PHASES) */

// don't change these!

#define CUBIC_WIDTH 4
#define CUBIC_WIDTH_BITS 2
#define CUBIC_LUT_LEN (CUBIC_WIDTH * CUBIC_PHASES)
#define CUBIC_FSHIFT (MIXER_FRAC_BITS-(CUBIC_PHASES_BITS+CUBIC_WIDTH_BITS))
#define CUBIC_FMASK ((CUBIC_WIDTH*CUBIC_PHASES)-CUBIC_WIDTH)

extern float *fCubicLUT8;
extern float *fCubicLUT16;

bool calcCubicTable(void);
void freeCubicTable(void);