DivSongTimestamps, part 3

This commit is contained in:
tildearrow 2025-10-29 02:39:52 -05:00
parent 2f11128c8d
commit ecfea6033a
6 changed files with 48 additions and 10 deletions

View file

@ -199,6 +199,32 @@ void FurnaceGUI::drawDebug() {
ImGui::Text("patScroll: %f",patScroll);
ImGui::TreePop();
}
if (ImGui::TreeNode("Song Timestamps")) {
if (ImGui::Button("Recalculate")) {
e->calcSongTimestamps();
}
DivSongTimestamps& ts=e->curSubSong->ts;
ImGui::Text("song duration: %d.%06d (%d ticks; %d rows)",ts.totalSeconds,ts.totalMicros,ts.totalTicks,ts.totalRows);
if (ts.isLoopDefined) {
ImGui::Text("loop region is defined");
} else {
ImGui::Text("no loop region");
}
if (ts.isLoopable) {
ImGui::Text("song can loop");
} else {
ImGui::Text("song will stop");
}
ImGui::Text("loop region: %d:%d - %d:%d",ts.loopStart.order,ts.loopStart.row,ts.loopEnd.order,ts.loopEnd.row);
ImGui::Text("loop start time: %d.%06d",ts.loopStartTime.seconds,ts.loopStartTime.micros);
ImGui::Checkbox("Enable row timestamps (in pattern view)",&debugRowTimestamps);
ImGui::TreePop();
}
if (ImGui::TreeNode("Sample Debug")) {
for (int i=0; i<e->song.sampleLen; i++) {
DivSample* sample=e->getSample(i);