MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / play

Method play

framework/jukebox.cpp:40–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 void shuffle() { std::shuffle(trackList.begin(), trackList.end(), rng); }
39
40 void play(PlayList list, PlayMode mode) override
41 {
42 if (!playlistsLoaded)
43 {
44 LogWarning("JukeBox::play() called without any playlists loaded");
45 return;
46 }
47 if (this->list == list)
48 return;
49 this->list = list;
50 if (this->list == PlayList::None)
51 {
52 this->stop();
53 }
54 else
55 {
56 this->play(playlists[list], mode);
57 }
58 }
59
60 void play(const std::vector<UString> &tracks, PlayMode mode) override
61 {

Callers

nothing calls this directly

Calls 5

stopMethod · 0.95
progressTrackMethod · 0.95
clearMethod · 0.45
loadMusicMethod · 0.45
playMusicMethod · 0.45

Tested by

no test coverage detected