MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / GetChannelStateString

Method GetChannelStateString

Source/SongState.cpp:347–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347std::string CSongState::GetChannelStateString(const CFamiTrackerModule &modfile, stChannelID chan) const {
348 if (State.empty())
349 return "State is not ready";
350
351 std::string str = State.find(chan)->second.GetStateString();
352 if (Tempo >= 0)
353 str += " Tempo: " + std::to_string(Tempo);
354 if (Speed >= 0) {
355 if (const auto pGroove = modfile.GetGroove(Speed); pGroove && GroovePos >= 0) {
356 str += " Groove: ";
357 str += {conv::to_digit<char>(Speed >> 4), conv::to_digit<char>(Speed), ' ', '<', '-'};
358 unsigned Size = pGroove->size();
359 for (unsigned i = 0; i < Size; ++i)
360 str += ' ' + std::to_string(pGroove->entry((i + GroovePos) % Size));
361 }
362 else
363 str += " Speed: " + std::to_string(Speed);
364 }
365
366 return str;
367}

Callers 1

RecallChannelStateMethod · 0.45

Calls 5

emptyMethod · 0.80
GetGrooveMethod · 0.80
GetStateStringMethod · 0.45
sizeMethod · 0.45
entryMethod · 0.45

Tested by

no test coverage detected