diff --git a/inputsource.cpp b/inputsource.cpp index 6a6b1c3..6012f1b 100644 --- a/inputsource.cpp +++ b/inputsource.cpp @@ -63,7 +63,7 @@ void InputSource::GetViewport(float *dest, int x, int y, int width, int height, float re = m_fftw_out[k][0]; float im = m_fftw_out[k][1]; float mag = sqrt(re * re + im * im) / m_fft_size; - float magdb = 10 * log(mag); + float magdb = 10 * log2(mag) / log2(10); *dest = magdb; dest++; } diff --git a/main.cpp b/main.cpp index 7b2b5a5..1e821b4 100644 --- a/main.cpp +++ b/main.cpp @@ -108,7 +108,7 @@ void wxImagePanel::OnDraw(wxDC &dc) for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { - pix.Blue() = clamp(256 - input_data[i*width + j] * -2, 0, 255); + pix.Blue() = clamp((input_data[i*width + j] + 20) * 5 + 255, 0, 255); pix.Red() = 0; pix.Green() = 0; pix++;