| 20 | namespace 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 | { |
nothing calls this directly
no test coverage detected