From 1e221393c40e4186acd31083dfd8f3d18693dd17 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 6 Mar 2024 16:12:39 -0500 Subject: [PATCH] memory composition, part 6 --- doc/8-advanced/memory-composition.md | 5 +++++ doc/8-advanced/stats.md | 4 ++-- src/gui/stats.cpp | 18 ------------------ 3 files changed, 7 insertions(+), 20 deletions(-) create mode 100644 doc/8-advanced/memory-composition.md diff --git a/doc/8-advanced/memory-composition.md b/doc/8-advanced/memory-composition.md new file mode 100644 index 000000000..d01fb766c --- /dev/null +++ b/doc/8-advanced/memory-composition.md @@ -0,0 +1,5 @@ +# memory composition + +this window displays the memory usage of chips that support memory (e.g. for samples). + +![memory composition](memcompo.png) diff --git a/doc/8-advanced/stats.md b/doc/8-advanced/stats.md index 01bc78775..e65f47b77 100644 --- a/doc/8-advanced/stats.md +++ b/doc/8-advanced/stats.md @@ -1,5 +1,5 @@ # statistics -the Statistics dialog shows running stats such as overall audio processing load and per-chip sample memory. +the Statistics window shows audio load (CPU used by emulation/playback). -![statistics dialog](stats.png) +![statistics window](stats.png) diff --git a/src/gui/stats.cpp b/src/gui/stats.cpp index 49c1f6cf6..b8c719267 100644 --- a/src/gui/stats.cpp +++ b/src/gui/stats.cpp @@ -36,24 +36,6 @@ void FurnaceGUI::drawStats() { ImGui::Text("Audio load"); ImGui::SameLine(); ImGui::ProgressBar((double)lastProcTime/maxGot,ImVec2(-FLT_MIN,0),procStr.c_str()); - ImGui::Separator(); - for (int i=0; isong.systemLen; i++) { - DivDispatch* dispatch=e->getDispatch(i); - for (int j=0; dispatch!=NULL && dispatch->getSampleMemCapacity(j)>0; j++) { - size_t capacity=dispatch->getSampleMemCapacity(j); - size_t usage=dispatch->getSampleMemUsage(j); - String usageStr; - if (settings.memUsageUnit==1) { - usageStr=fmt::sprintf("%d/%dKB",usage/1024,capacity/1024); - } else { - usageStr=fmt::sprintf("%d/%d",usage,capacity); - } - ImGui::AlignTextToFramePadding(); - ImGui::Text("%s [%d]", e->getSystemName(e->song.system[i]), j); - ImGui::SameLine(); - ImGui::ProgressBar(((float)usage)/((float)capacity),ImVec2(-FLT_MIN,0),usageStr.c_str()); - } - } } if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_STATS; ImGui::End();