MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / setVolume

Function setVolume

src/Audio/src/AudioEngine.cpp:399–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397 // Attribute control
398
399 void setVolume(AudioHandle handle, int32_t volume)
400 {
401 auto* inst = getInstance(handle);
402 if (inst == nullptr)
403 {
404 return;
405 }
406 inst->attribs.volume = volume;
407 applyVolume(*inst);
408 }
409
410 void setPan(AudioHandle handle, int32_t pan)
411 {

Callers 3

setBgmVolumeFunction · 0.85
updateAmbientNoiseFunction · 0.85
updateSingleVehicleSoundFunction · 0.85

Calls 2

getInstanceFunction · 0.85
applyVolumeFunction · 0.85

Tested by

no test coverage detected