more work

This commit is contained in:
AlexandreRouma
2023-03-27 17:26:37 +02:00
parent a9f882e5b1
commit f578adceef
4 changed files with 92 additions and 9 deletions

View File

@ -169,6 +169,9 @@ namespace ImGui {
void setFFTHold(bool hold);
void setFFTHoldSpeed(float speed);
void setFFTSmoothing(bool enabled);
void setFFTSmoothingSpeed(float speed);
float* acquireLatestFFT(int& width);
void releaseLatestFFT();
@ -270,6 +273,7 @@ namespace ImGui {
std::recursive_mutex buf_mtx;
std::recursive_mutex latestFFTMtx;
std::mutex texMtx;
std::mutex smoothingBufMtx;
float vRange;
@ -304,8 +308,9 @@ namespace ImGui {
//std::vector<std::vector<float>> rawFFTs;
int rawFFTSize;
float* rawFFTs = NULL;
float* latestFFT;
float* latestFFTHold;
float* latestFFT = NULL;
float* latestFFTHold = NULL;
float* smoothingBuf = NULL;
int currentFFTLine = 0;
int fftLines = 0;
@ -325,6 +330,10 @@ namespace ImGui {
bool fftHold = false;
float fftHoldSpeed = 0.3f;
bool fftSmoothing = false;
float smoothingAlpha = 0.5;
float smoothingBeta = 0.5;
// UI Select elements
bool fftResizeSelect = false;
bool freqScaleSelect = false;