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

Method PlayerTick

Source/SoundDriver.cpp:169–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void CSoundDriver::PlayerTick() {
170 if (!m_pTempoCounter)
171 return;
172 m_pPlayerCursor->Tick();
173 if (parent_)
174 parent_->OnTick();
175
176 int SteppedRows = 0; // // //
177
178 // Fetch next row
179// while (m_pTempoCounter->CanStepRow()) {
180 if (m_pTempoCounter->CanStepRow()) {
181 if (m_bDoHalt)
182 m_bHaltRequest = true;
183 else
184 ++SteppedRows;
185 m_pTempoCounter->StepRow(); // // //
186
187 modfile_->GetChannelOrder().ForeachChannel([&] (stChannelID i) {
188 StepRow(i);
189 });
190
191 if (parent_)
192 parent_->OnStepRow();
193 }
194 m_pTempoCounter->Tick(); // // //
195
196 // Update player
197 if (parent_ && parent_->ShouldStopPlayer()) // // //
198 m_bHaltRequest = true;
199 else if (SteppedRows > 0 && !m_bDoHalt) {
200 // Jump
201 if (m_iJumpToPattern != -1)
202 m_pPlayerCursor->DoBxx(m_iJumpToPattern);
203 // Skip
204 else if (m_iSkipToRow != -1)
205 m_pPlayerCursor->DoDxx(m_iSkipToRow);
206 // or just move on
207 else
208 while (SteppedRows--)
209 m_pPlayerCursor->StepRow();
210
211 m_iJumpToPattern = -1;
212 m_iSkipToRow = -1;
213
214 if (parent_)
215 parent_->OnUpdateRow(m_pPlayerCursor->GetCurrentFrame(), m_pPlayerCursor->GetCurrentRow());
216 }
217}
218
219void CSoundDriver::UpdateChannels() {
220 for (auto &chip : chips_)

Callers

nothing calls this directly

Calls 12

OnTickMethod · 0.80
CanStepRowMethod · 0.80
ForeachChannelMethod · 0.80
OnStepRowMethod · 0.80
DoBxxMethod · 0.80
DoDxxMethod · 0.80
OnUpdateRowMethod · 0.80
GetCurrentRowMethod · 0.80
TickMethod · 0.45
StepRowMethod · 0.45
ShouldStopPlayerMethod · 0.45
GetCurrentFrameMethod · 0.45

Tested by

no test coverage detected