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

Method UpdateChannels

Source/SoundDriver.cpp:219–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219void CSoundDriver::UpdateChannels() {
220 for (auto &chip : chips_)
221 chip->RefreshBefore(*apu_);
222
223 ForeachTrack([&] (CChannelHandler &Chan, CTrackerChannel &TrackerChan, stChannelID ID) { // // //
224 if (!modfile_->GetChannelOrder().HasChannel(ID))
225 return;
226
227 // Run auto-arpeggio, if enabled
228 if (int Arpeggio = parent_ ? parent_->GetArpNote(ID) : -1; Arpeggio > 0) // // //
229 Chan.Arpeggiate(Arpeggio);
230
231 // Check if new note data has been queued for playing
232 if (TrackerChan.NewNoteData())
233 Chan.PlayNote(TrackerChan.GetNote()); // // //
234
235 // Pitch wheel
236 Chan.SetPitch(TrackerChan.GetPitch());
237
238 // Channel updates (instruments, effects etc)
239 m_bHaltRequest ? Chan.ResetChannel() : Chan.ProcessChannel();
240 Chan.RefreshChannel();
241 Chan.FinishTick(); // // //
242 });
243
244 for (auto &chip : chips_)
245 chip->RefreshAfter(*apu_);
246}
247
248void CSoundDriver::QueueNote(stChannelID chan, const stChanNote &note, note_prio_t priority) {
249 if (auto *track = GetTrackerChannel(chan))

Callers

nothing calls this directly

Calls 14

RefreshBeforeMethod · 0.80
HasChannelMethod · 0.80
GetArpNoteMethod · 0.80
ArpeggiateMethod · 0.80
NewNoteDataMethod · 0.80
ProcessChannelMethod · 0.80
FinishTickMethod · 0.80
PlayNoteMethod · 0.45
GetNoteMethod · 0.45
SetPitchMethod · 0.45
GetPitchMethod · 0.45
ResetChannelMethod · 0.45

Tested by

no test coverage detected