| 575 | } |
| 576 | |
| 577 | AudioConstPtr 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 | |
| 587 | FontConstPtr Assets::font(String const& path) const { |
| 588 | auto components = AssetPath::split(path); |
no test coverage detected