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

Method fadeOut

source/sound/MusicPlayer.cpp:89–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89void ODMusic::fadeOut()
90{
91 if (mMusicState == UNLOADED)
92 return;
93 if (mMusicState != PLAYING && mMusicState != FADE_IN)
94 return;
95
96 if (mMusic.getVolume() > 0.0f)
97 {
98 mMusicState = FADE_OUT;
99 }
100 else
101 {
102 mMusic.stop();
103 mMusicState = STOPPED;
104 }
105}
106
107void ODMusic::update(float timeSinceLastUpdate)
108{

Callers 2

playMethod · 0.80
stopMethod · 0.80

Calls 1

stopMethod · 0.45

Tested by

no test coverage detected