| 2166 | } |
| 2167 | |
| 2168 | void CMainFrame::OnModuleEstimateSongLength() // // // |
| 2169 | { |
| 2170 | CSongLengthScanner scanner {*GetDoc().GetModule(), *GetTrackerView()->GetSongView()}; |
| 2171 | auto [Intro, Loop] = scanner.GetSecondsCount(); |
| 2172 | auto [IntroRows, LoopRows] = scanner.GetRowCount(); |
| 2173 | |
| 2174 | int Rate = GetDoc().GetModule()->GetFrameRate(); |
| 2175 | |
| 2176 | const LPCWSTR fmt = L"Estimated duration:\n" |
| 2177 | L"Intro: %lld:%02lld.%02lld (%d rows, %lld ticks)\n" |
| 2178 | L"Loop: %lld:%02lld.%02lld (%d rows, %lld ticks)\n" |
| 2179 | L"Tick counts are subject to rounding errors!"; |
| 2180 | AfxMessageBox(FormattedW(fmt, |
| 2181 | static_cast<long long>(Intro + .5 / 6000) / 60, |
| 2182 | static_cast<long long>(Intro + .005) % 60, |
| 2183 | static_cast<long long>(Intro * 100 + .5) % 100, |
| 2184 | IntroRows, |
| 2185 | static_cast<long long>(Intro * Rate + .5), |
| 2186 | static_cast<long long>(Loop + .5 / 6000) / 60, |
| 2187 | static_cast<long long>(Loop + .005) % 60, |
| 2188 | static_cast<long long>(Loop * 100 + .5) % 100, |
| 2189 | LoopRows, |
| 2190 | static_cast<long long>(Loop * Rate + .5))); |
| 2191 | } |
| 2192 | |
| 2193 | void CMainFrame::UpdateTrackBox() |
| 2194 | { |
nothing calls this directly
no test coverage detected