A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 25 lines 567 B view raw
1#include "m_pd.h" 2#include "m_fixed.h" 3#include <math.h> 4 5#define ILOGCOSTABSIZE 15 6#define ICOSTABSIZE (1<<ILOGCOSTABSIZE) 7 8int main(int argc,char** argv) 9{ 10 int i; 11 int *fp; 12 double phase, phsinc = (2. * M_PI) / ICOSTABSIZE; 13 14 printf("#define ILOGCOSTABSIZE 15\n"); 15 printf("#define ICOSTABSIZE (1<<ILOGCOSTABSIZE)\n"); 16 printf("static t_sample cos_table[] = {"); 17 for (i = ICOSTABSIZE + 1,phase = 0; i--; phase += phsinc) { 18 printf("%d,",ftofix(cos(phase))); 19 // post("costab %f %f",cos(phase),fixtof(*fp)); 20 21 } 22 printf("0};\n"); 23 24} 25