MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / tryAudio

Method tryAudio

source/base/StarAssets.cpp:577–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577AudioConstPtr Assets::tryAudio(String const& path) const {
578 auto components = AssetPath::split(path);
579 validatePath(components, false, false);
580
581 if (auto audioData = as<AudioData>(tryAsset(AssetId{AssetType::Audio, std::move(components)})))
582 return audioData->audio;
583 else
584 return {};
585}
586
587FontConstPtr Assets::font(String const& path) const {
588 auto components = AssetPath::split(path);

Callers 2

updateAmbientMethod · 0.80
updateWeatherMethod · 0.80

Calls 1

validatePathFunction · 0.85

Tested by

no test coverage detected