fixed blury icon and recorder level meter

pull/801/head
AlexandreRouma 2022-07-07 22:14:40 +02:00
rodzic ae149b256b
commit bdd4998b1b
2 zmienionych plików z 11 dodań i 10 usunięć

Wyświetl plik

@ -112,15 +112,6 @@ namespace backend {
break;
}
#endif
// Add callback for max/min if GLFW supports it
#if (GLFW_VERSION_MAJOR == 3) && (GLFW_VERSION_MINOR >= 3)
if (maximized) {
glfwMaximizeWindow(window);
}
glfwSetWindowMaximizeCallback(window, maximized_callback);
#endif
// Load app icon
@ -164,6 +155,15 @@ namespace backend {
free(icons[i].pixels);
}
// Add callback for max/min if GLFW supports it
#if (GLFW_VERSION_MAJOR == 3) && (GLFW_VERSION_MINOR >= 3)
if (maximized) {
glfwMaximizeWindow(window);
}
glfwSetWindowMaximizeCallback(window, maximized_callback);
#endif
// Setup Dear ImGui context
IMGUI_CHECKVERSION();
ImGui::CreateContext();

Wyświetl plik

@ -279,9 +279,10 @@ private:
lvlL = std::clamp<float>(lvlL - (frameTime * 50.0), -90.0f, 10.0f);
lvlR = std::clamp<float>(lvlR - (frameTime * 50.0), -90.0f, 10.0f);
// Note: Yes, using the natural log is on purpose, it just gives a more beautiful result.
dsp::stereo_t rawLvl = meter.getLevel();
meter.resetLevel();
dsp::stereo_t dbLvl = { 10.0f * log10f(rawLvl.l), 10.0f * log10f(rawLvl.r) };
dsp::stereo_t dbLvl = { 10.0f * logf(rawLvl.l), 10.0f * logf(rawLvl.r) };
if (dbLvl.l > lvlL) { lvlL = dbLvl.l; }
if (dbLvl.r > lvlR) { lvlR = dbLvl.r; }
ImGui::VolumeMeter(lvlL, lvlL, -60, 10);