| 217 | } |
| 218 | |
| 219 | void 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 | |
| 248 | void CSoundDriver::QueueNote(stChannelID chan, const stChanNote ¬e, note_prio_t priority) { |
| 249 | if (auto *track = GetTrackerChannel(chan)) |
nothing calls this directly
no test coverage detected