this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cleanup; bin to 256 as a test

alice 01e76fba 1227609c

+5 -12
+4 -11
src/ext/fft.c
··· 18 18 ma_context context; 19 19 ma_device captureDevice; 20 20 float sampleBuf[FFT_SIZE * 2]; 21 - bool bCreated = false; 22 - kiss_fft_cpx fftBuf[FFT_SIZE + 1]; 23 21 24 22 void miniaudioLogCallback(void *userData, ma_uint32 level, const char *message) 25 23 { 26 24 FFT_DebugLog(FFT_LOG_TRACE, "miniaudioLogCallback got called\n"); 27 - // TODO: I don't know why we need this or if we even need this but, whatever 25 + // TODO: I don't know why we need this or if we even need this 28 26 (void)userData; 29 27 switch (level) { 30 28 case MA_LOG_LEVEL_DEBUG: ··· 61 59 } 62 60 } 63 61 64 - // void FFT_EnumerateDevices(FFT_ENUMERATE_FUNC pEnumerationFunction, void* pUserContext) 65 62 void FFT_EnumerateDevices() 66 63 { 67 64 ··· 140 137 result = ma_context_get_devices(&context, &pPlaybackDeviceInfos, &playbackDeviceCount, &pCaptureDeviceInfos, &captureDeviceCount); 141 138 if (result != MA_SUCCESS) { 142 139 printf("Failed to retrieve device information.\n"); 143 - return -3; 140 + return false; 144 141 } 145 142 146 143 printf("Playback Devices\n"); ··· 212 209 213 210 void FFT_Close() 214 211 { 215 - if (!bCreated) 216 - { 217 - return; 218 - } 219 - 220 212 ma_device_stop(&captureDevice); 221 213 ma_device_uninit(&captureDevice); 222 214 ma_context_uninit(&context); ··· 283 275 { 284 276 if (freq < 0 || freq >= FFT_SIZE) { 285 277 // Handle out-of-bounds frequency request, possibly log error or return a default value 286 - return 0.0; // Assuming 0.0 is a safe default value for out-of-bounds frequency 278 + FFT_DebugLog(FFT_LOG_TRACE, "tic_api_fft: freq out of bounds at %d\n", freq); 279 + return 0.0; 287 280 } 288 281 // if (bSmoothing) return fftSmoothingData[freq]; 289 282 // return fftData[freq];
+1 -1
src/fftdata.h
··· 1 1 #pragma once 2 - #define FFT_SIZE 1024 2 + #define FFT_SIZE 256 3 3 extern float fPeakMinValue; 4 4 extern float fPeakSmoothing; 5 5 extern float fPeakSmoothValue;