| 390 | } }; |
| 391 | |
| 392 | static int32_t getVolumeForSoundId(SoundId id) |
| 393 | { |
| 394 | if (isObjectSoundId(id)) |
| 395 | { |
| 396 | auto obj = getSoundObject(id); |
| 397 | if (obj != nullptr) |
| 398 | { |
| 399 | return obj->volume; |
| 400 | } |
| 401 | return 0; |
| 402 | } |
| 403 | else |
| 404 | { |
| 405 | return kSoundVolumeTable[static_cast<int32_t>(id)]; |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | static int32_t calculateVolumeFromViewport([[maybe_unused]] SoundId id, const World::Pos3& mpos, const Viewport& viewport) |
| 410 | { |
no test coverage detected