| 99 | |
| 100 | |
| 101 | void 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 | |
| 128 | void SoundManager::activateSoundSystem(const std::string& name) { |
no test coverage detected