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

Function computeEffectiveGain

src/Audio/src/AudioEngine.cpp:69–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 }
68
69 static float computeEffectiveGain(int32_t handleVolume, ChannelId channel)
70 {
71 auto masterVol = _channelVolumes[static_cast<size_t>(ChannelId::master)];
72 auto channelVol = _channelVolumes[static_cast<size_t>(channel)];
73 return volumeToGain(handleVolume + masterVol + channelVol);
74 }
75
76 static void applyVolume(AudioInstance& inst)
77 {

Callers 1

applyVolumeFunction · 0.85

Calls 1

volumeToGainFunction · 0.85

Tested by

no test coverage detected