MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / loadFromFile

Method loadFromFile

source/sound/MusicPlayer.cpp:36–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36bool ODMusic::loadFromFile(const std::string& filename)
37{
38 if (mMusic.openFromFile(filename) == false)
39 {
40 mMusicState = UNLOADED;
41 return false;
42 }
43
44 // Set convenient values for our use.
45 mMusic.setVolume(MAX_VOLUME);
46 mMusic.setAttenuation(0);
47 mMusic.setLoop(true);
48
49 mMusicState = STOPPED;
50 return true;
51}
52
53void ODMusic::play()
54{

Callers 2

MusicPlayerMethod · 0.80
GameSoundMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected