13
0

With printf() / snprintf() etc "%f" actually requests a double, not a float

Let's pass the correct type, since we can't rely on these functions to do intelligent conversion
This commit is contained in:
John Emmas 2014-11-26 09:57:14 +00:00
parent 4358b8db79
commit fcd7ec92d4

View File

@ -1307,7 +1307,7 @@ ARDOUR_UI::update_cpu_load ()
should also be changed.
*/
float const c = AudioEngine::instance()->get_dsp_load ();
double const c = AudioEngine::instance()->get_dsp_load ();
snprintf (buf, sizeof (buf), _("DSP: <span foreground=\"%s\">%5.1f%%</span>"), c >= 90 ? X_("red") : X_("green"), c);
cpu_load_label.set_markup (buf);
}