MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / activateSoundSystem

Method activateSoundSystem

src/bzflag/sound.cpp:101–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99
100
101void SoundManager::activateSoundSystem(SoundSystem* sys) {
102 if (!sys) {
103 return;
104 }
105
106 SoundSystem* realSystem = NULL;
107
108 for (size_t i = 0; i < soundSystems.size(); i++) {
109 if (soundSystems[i] == sys) {
110 realSystem = sys;
111 break;
112 }
113 }
114
115 if (!realSystem) {
116 registerSystem(sys);
117 }
118
119 if (currentSystem) {
120 currentSystem->shutdown();
121 }
122
123 currentSystem = sys;
124 currentSystem->startup();
125}
126
127
128void SoundManager::activateSoundSystem(const std::string& name) {

Callers 1

postWindowInitFunction · 0.45

Calls 4

startupMethod · 0.80
sizeMethod · 0.45
shutdownMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected