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

Function setAttributes

src/Audio/src/AudioEngine.cpp:432–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430 }
431
432 void setAttributes(AudioHandle handle, const AudioAttributes& attribs)
433 {
434 auto* inst = getInstance(handle);
435 if (inst == nullptr)
436 {
437 return;
438 }
439 inst->attribs = attribs;
440 applyVolume(*inst);
441 applyPitch(*inst);
442 applyPan(inst->sourceId, attribs.pan);
443 alSourcei(inst->sourceId, AL_LOOPING, attribs.loop ? AL_TRUE : AL_FALSE);
444 }
445
446 // Channel volume control
447

Callers

nothing calls this directly

Calls 4

getInstanceFunction · 0.85
applyVolumeFunction · 0.85
applyPitchFunction · 0.85
applyPanFunction · 0.85

Tested by

no test coverage detected