| 362 | } |
| 363 | |
| 364 | void PlaybackManager::checkValidPosition() |
| 365 | { |
| 366 | auto& song = mod_.lock()->getSong(curSongNum_); |
| 367 | int orderSize = static_cast<int>(song.getOrderSize()); |
| 368 | if (playingPos_.order >= orderSize) { |
| 369 | playingPos_.set(0, 0); |
| 370 | nextReadPos_ = playingPos_; |
| 371 | } |
| 372 | else if (playingPos_.step >= static_cast<int>(song.getPatternSizeFromOrderNumber(playingPos_.order))) { |
| 373 | if (playingPos_.order == orderSize - 1) { |
| 374 | playingPos_.set(0, 0); |
| 375 | nextReadPos_ = playingPos_; |
| 376 | } |
| 377 | else { |
| 378 | ++playingPos_.order; |
| 379 | playingPos_.step = 0; |
| 380 | nextReadPos_ = playingPos_; |
| 381 | } |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | /// Register update order: volume -> instrument -> effect -> key on |
| 386 | void PlaybackManager::stepProcess() |
nothing calls this directly
no test coverage detected