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

Function setChannelVolume

src/Audio/src/AudioEngine.cpp:448–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446 // Channel volume control
447
448 void setChannelVolume(ChannelId channel, int32_t volume)
449 {
450 _channelVolumes[static_cast<size_t>(channel)] = volume;
451
452 for (auto& inst : _instances)
453 {
454 if (inst.active && (channel == ChannelId::master || inst.channel == channel))
455 {
456 applyVolume(inst);
457 }
458 }
459 }
460
461 int32_t getChannelVolume(ChannelId channel)
462 {

Callers 2

volumeSliderMouseDownFunction · 0.85
initialiseDSoundFunction · 0.85

Calls 1

applyVolumeFunction · 0.85

Tested by

no test coverage detected