mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-10 04:37:37 +01:00
fixed blury icon and recorder level meter
This commit is contained in:
parent
ae149b256b
commit
bdd4998b1b
@ -112,15 +112,6 @@ namespace backend {
|
|||||||
break;
|
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
|
#endif
|
||||||
|
|
||||||
// Load app icon
|
// Load app icon
|
||||||
@ -164,6 +155,15 @@ namespace backend {
|
|||||||
free(icons[i].pixels);
|
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
|
// Setup Dear ImGui context
|
||||||
IMGUI_CHECKVERSION();
|
IMGUI_CHECKVERSION();
|
||||||
ImGui::CreateContext();
|
ImGui::CreateContext();
|
||||||
|
@ -279,9 +279,10 @@ private:
|
|||||||
lvlL = std::clamp<float>(lvlL - (frameTime * 50.0), -90.0f, 10.0f);
|
lvlL = std::clamp<float>(lvlL - (frameTime * 50.0), -90.0f, 10.0f);
|
||||||
lvlR = std::clamp<float>(lvlR - (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();
|
dsp::stereo_t rawLvl = meter.getLevel();
|
||||||
meter.resetLevel();
|
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.l > lvlL) { lvlL = dbLvl.l; }
|
||||||
if (dbLvl.r > lvlR) { lvlR = dbLvl.r; }
|
if (dbLvl.r > lvlR) { lvlR = dbLvl.r; }
|
||||||
ImGui::VolumeMeter(lvlL, lvlL, -60, 10);
|
ImGui::VolumeMeter(lvlL, lvlL, -60, 10);
|
||||||
|
Loading…
Reference in New Issue
Block a user