mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-01 18:42:40 +00:00
memory composition, part 6
This commit is contained in:
parent
1e536b80ad
commit
1e221393c4
3 changed files with 7 additions and 20 deletions
5
doc/8-advanced/memory-composition.md
Normal file
5
doc/8-advanced/memory-composition.md
Normal file
|
@ -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)
|
|
@ -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)
|
||||
|
|
|
@ -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; i<e->song.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();
|
||||
|
|
Loading…
Reference in a new issue