MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / Load

Method Load

src/openrct2/object/AudioObject.cpp:22–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace OpenRCT2
21{
22 void AudioObject::Load()
23 {
24 // Start with base samples
25 _loadedSampleTable.LoadFrom(_sampleTable, 0, _sampleTable.GetCount());
26
27 // Override samples from asset packs
28 auto context = GetContext();
29 auto assetManager = context->GetAssetPackManager();
30 if (assetManager != nullptr)
31 {
32 assetManager->LoadSamplesForObject(GetIdentifier(), _loadedSampleTable);
33 }
34
35 _loadedSampleTable.Load();
36 }
37
38 void AudioObject::Unload()
39 {

Callers

nothing calls this directly

Calls 5

GetContextFunction · 0.85
LoadFromMethod · 0.80
GetAssetPackManagerMethod · 0.80
GetCountMethod · 0.45
LoadSamplesForObjectMethod · 0.45

Tested by

no test coverage detected