| 8 | std::map< std::string, std::shared_ptr<Sound> > Sound::sMap; |
| 9 | |
| 10 | std::shared_ptr<Sound> Sound::get(const std::string& path) |
| 11 | { |
| 12 | auto it = sMap.find(path); |
| 13 | if(it != sMap.cend()) |
| 14 | return it->second; |
| 15 | |
| 16 | std::shared_ptr<Sound> sound = std::shared_ptr<Sound>(new Sound(path)); |
| 17 | AudioManager::getInstance()->registerSound(sound); |
| 18 | sMap[path] = sound; |
| 19 | return sound; |
| 20 | } |
| 21 | |
| 22 | std::shared_ptr<Sound> Sound::getFromTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& element) |
| 23 | { |
no test coverage detected