MCPcopy Create free account
hub / github.com/Soundux/Soundux / getSound

Method getSound

src/core/objects/data.cpp:83–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 return std::nullopt;
82 }
83 std::optional<std::reference_wrapper<Sound>> Data::getSound(const std::uint32_t &id)
84 {
85 auto scopedSounds = Globals::gSounds.scoped();
86 if (scopedSounds->find(id) != scopedSounds->end())
87 {
88 return scopedSounds->at(id);
89 }
90
91 Fancy::fancy.logTime().warning() << "Tried to access non existent sound " << id << std::endl;
92 return std::nullopt;
93 }
94 std::optional<Tab> Data::setTab(const std::uint32_t &id, const Tab &tab)
95 {
96 if (tabs.size() > id)

Callers 5

playSoundMethod · 0.80
setCustomLocalVolumeMethod · 0.80
setCustomRemoteVolumeMethod · 0.80
setHotkeyMethod · 0.80
deleteSoundMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected