Prematurely stops the current song so that another can be played.
| 262 | |
| 263 | // Prematurely stops the current song so that another can be played. |
| 264 | bool skipCurrentTrack() |
| 265 | { |
| 266 | if (Config::get().audio.playJukeboxMusic == 0) |
| 267 | { |
| 268 | return false; |
| 269 | } |
| 270 | |
| 271 | // By stopping the music, the next time OpenLoco::tick() calls Audio::playBackgroundMusic(), |
| 272 | // it will detect that the channel is not playing anything, and so it will play the next music track. |
| 273 | Audio::stopMusic(); |
| 274 | |
| 275 | return true; |
| 276 | } |
| 277 | |
| 278 | // When the player disables "Play Music" from the top toolbar, or clicks the stop button in the music options. |
| 279 | bool disableMusic() |
no test coverage detected