From 61340c12d619960ff1ef444cd9d9ca0f4c82dcc0 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Sun, 16 Feb 2020 10:57:00 -0600 Subject: [PATCH] SoundPlayer: Cast Audio::Sample to float for fabsf() --- Applications/SoundPlayer/SampleWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Applications/SoundPlayer/SampleWidget.cpp b/Applications/SoundPlayer/SampleWidget.cpp index 06a6c53727..f58845176c 100644 --- a/Applications/SoundPlayer/SampleWidget.cpp +++ b/Applications/SoundPlayer/SampleWidget.cpp @@ -54,7 +54,7 @@ void SampleWidget::paint_event(GUI::PaintEvent& event) if (m_buffer) { int samples_per_pixel = m_buffer->sample_count() / frame_inner_rect().width(); for (int sample_index = 0; sample_index < m_buffer->sample_count() && (x - x_offset) < frame_inner_rect().width(); ++sample_index) { - float sample = fabsf(m_buffer->samples()[sample_index].left); + float sample = fabsf((float)m_buffer->samples()[sample_index].left); sample_max = max(sample, sample_max); ++count;