spectrum visual spacing/floor tweak

This commit is contained in:
Charles J. Cliffe 2015-08-18 00:08:22 -04:00
parent 3c822e1bd8
commit 2b7edb9b0f
2 changed files with 4 additions and 1 deletions

View File

@ -784,6 +784,9 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
if (val < 0.01) {
val = 0.01;
}
if (val > 0.99) {
val = 0.99;
}
spectrumAvgMeter->setLevel(val);
proc->setFFTAverageRate(val);

View File

@ -290,7 +290,7 @@ void SpectrumVisualProcessor::process() {
fft_floor_maa = fft_floor_maa + (fft_floor_ma - fft_floor_maa) * 0.05;
for (int i = 0, iMax = fftSize; i < iMax; i++) {
float v = (log10(fft_result_maa[i]+0.25 - (fft_floor_maa-1.0)) / log10((fft_ceil_maa+0.25) - (fft_floor_maa-1.0)));
float v = (log10(fft_result_maa[i]+0.25 - (fft_floor_maa-0.75)) / log10((fft_ceil_maa+0.25) - (fft_floor_maa-0.75)));
output->spectrum_points[i * 2] = ((float) i / (float) iMax);
output->spectrum_points[i * 2 + 1] = v;
}