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

Function applyPan

src/Audio/src/AudioEngine.cpp:93–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 }
92
93 static void applyPan(uint32_t sourceId, int32_t pan)
94 {
95 auto p = panToPosition(pan);
96 alSourcef(sourceId, AL_ROLLOFF_FACTOR, 0.0f);
97 alSourcei(sourceId, AL_SOURCE_RELATIVE, AL_TRUE);
98 alSource3f(sourceId, AL_POSITION, p, 0.0f, -std::sqrt(1.0f - p * p));
99 }
100
101 bool openDevice(const std::string& name)
102 {

Callers 3

createFunction · 0.85
setPanFunction · 0.85
setAttributesFunction · 0.85

Calls 1

panToPositionFunction · 0.85

Tested by

no test coverage detected