MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / get

Method get

src/server/gui/core/Sound.cpp:10–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8std::map< std::string, std::shared_ptr<Sound> > Sound::sMap;
9
10std::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
22std::shared_ptr<Sound> Sound::getFromTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& element)
23{

Callers 15

setArgumentMethod · 0.45
onBindViewHolderMethod · 0.45
onCreateMethod · 0.45
onBindViewHolderMethod · 0.45
onMenuItemClickMethod · 0.45
setArgumentMethod · 0.45
setArgumentMethod · 0.45
MameNamesMethod · 0.45
parseElementMethod · 0.45
renderMethod · 0.45
doOnFinishMethod · 0.45
setDocumentMethod · 0.45

Calls 2

registerSoundMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected