MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / skipCurrentTrack

Function skipCurrentTrack

src/OpenLoco/src/Jukebox.cpp:264–276  ·  view source on GitHub ↗

Prematurely stops the current song so that another can be played.

Source from the content-addressed store, hash-verified

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()

Callers 1

playNextSongFunction · 0.85

Calls 2

getFunction · 0.70
stopMusicFunction · 0.50

Tested by

no test coverage detected