ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
#include <pulse/simple.h>
#include "../ckb/ckb-anim.h"
#include "kiss_fftr.h"
Go to the source code of this file.
Functions | |
void | ckb_info () |
void | ckb_init (ckb_runctx *context) |
void | ckb_parameter (ckb_runctx *context, const char *name, const char *value) |
void | anim_add (ckb_key *press, float x, float y) |
void | anim_remove (float x, float y) |
void | ckb_keypress (ckb_runctx *context, ckb_key *key, int x, int y, int state) |
void | ckb_start (ckb_runctx *context, int state) |
void | ckb_time (ckb_runctx *context, double delta) |
int | max (int a, int b) |
int | min (int a, int b) |
void | getFreqDec () |
int | ckb_frame (ckb_runctx *context) |
Variables | |
double | powers [2048] = { 0.f } |
kiss_fft_cpx * | inbuf |
kiss_fft_cpx * | outbuf |
ckb_gradient | animcolor = { 0 } |
pa_simple * | pas = NULL |
int | power = 0 |
int | gcounter = 0 |
void anim_add | ( | ckb_key * | press, |
float | x, | ||
float | y | ||
) |
int ckb_frame | ( | ckb_runctx * | context | ) |
Definition at line 126 of file main.c.
References ckb_alpha_blend(), ckb_grad_color(), CKB_KEYCLEAR, getFreqDec(), ckb_runctx::height, ckb_runctx::keycount, ckb_runctx::keys, max(), min(), power, powers, and ckb_runctx::width.
void ckb_info | ( | ) |
Definition at line 27 of file main.c.
References CKB_COPYRIGHT, CKB_DESCRIPTION, CKB_GUID, CKB_KP_NONE, CKB_KPMODE, CKB_LICENSE, CKB_LIVEPARAMS, CKB_NAME, CKB_PARAM_AGRADIENT, CKB_PARAM_BOOL, CKB_PRESET_END, CKB_PRESET_PARAM, CKB_PRESET_START, CKB_REPEAT, CKB_TIME_ABSOLUTE, CKB_TIMEMODE, CKB_VERSION, FALSE, and TRUE.
void ckb_init | ( | ckb_runctx * | context | ) |
Definition at line 61 of file main.c.
References pas.
void ckb_keypress | ( | ckb_runctx * | context, |
ckb_key * | key, | ||
int | x, | ||
int | y, | ||
int | state | ||
) |
void ckb_parameter | ( | ckb_runctx * | context, |
const char * | name, | ||
const char * | value | ||
) |
void ckb_start | ( | ckb_runctx * | context, |
int | state | ||
) |
void ckb_time | ( | ckb_runctx * | context, |
double | delta | ||
) |
void getFreqDec | ( | ) |
Definition at line 107 of file main.c.
References kiss_fft_cpx::i, kiss_fft(), kiss_fft_alloc(), kiss_fft_cleanup(), kiss_fft_free, pas, power, powers, and kiss_fft_cpx::r.
Referenced by ckb_frame().
int max | ( | int | a, |
int | b | ||
) |
Definition at line 97 of file main.c.
Referenced by ckb_frame().
int min | ( | int | a, |
int | b | ||
) |
Definition at line 101 of file main.c.
Referenced by ckb_frame(), and dpiExp().
ckb_gradient animcolor = { 0 } |
kiss_fft_cpx* inbuf |
kiss_fft_cpx* outbuf |
pa_simple* pas = NULL |
Definition at line 58 of file main.c.
Referenced by ckb_init(), and getFreqDec().
int power = 0 |
Definition at line 59 of file main.c.
Referenced by ckb_frame(), ckb_parameter(), and getFreqDec().
double powers[2048] = { 0.f } |
Definition at line 54 of file main.c.
Referenced by ckb_frame(), and getFreqDec().