From 680ab52d9e151676b8f90d105b23d2d0d89b0471 Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Sat, 15 Apr 2017 01:00:20 +0900 Subject: add fmdsp fft analyzer --- fmdsp/fmdsp.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'fmdsp/fmdsp.h') diff --git a/fmdsp/fmdsp.h b/fmdsp/fmdsp.h index 1aba5d9..6a98707 100644 --- a/fmdsp/fmdsp.h +++ b/fmdsp/fmdsp.h @@ -5,6 +5,7 @@ #include #include "font.h" #include "fmdriver/fmdriver.h" +#include "fft/fft.h" #ifdef __cplusplus extern "C" { @@ -18,10 +19,11 @@ enum { }; enum { - FMDSP_PALETTE_COLORS = 9 + FMDSP_PALETTE_COLORS = 10 }; enum FMDSP_DISPSTYLE { + FMDSP_DISPSTYLE_ORIGINAL, FMDSP_DISPSTYLE_DEFAULT, FMDSP_DISPSTYLE_OPN, FMDSP_DISPSTYLE_PPZ8, @@ -36,6 +38,12 @@ struct fmdsp { enum FMDSP_DISPSTYLE style; bool style_updated; bool masked[FMDRIVER_TRACK_NUM]; + uint8_t fftdata[FFTDISPLEN]; + uint8_t fftcnt[FFTDISPLEN]; + uint8_t fftdropdiv[FFTDISPLEN]; + uint64_t framecnt; + int cpuusage; + int fps; }; struct fmdriver_work; @@ -44,7 +52,9 @@ void fmdsp_vram_init(struct fmdsp *fmdsp, struct fmdriver_work *work, uint8_t *vram); void fmdsp_update(struct fmdsp *fmdsp, const struct fmdriver_work *work, - const struct opna *opna, uint8_t *vram); + const struct opna *opna, uint8_t *vram, + struct fmplayer_fft_input_data *idata + ); void fmdsp_vrampalette(struct fmdsp *fmdsp, const uint8_t *vram, uint8_t *vram32, int stride); void fmdsp_font_from_fontrom(uint8_t *font, const uint8_t *fontrom); void fmdsp_palette_set(struct fmdsp *fmdsp, int p); -- cgit v1.2.3