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

Function applyPitch

src/Audio/src/AudioEngine.cpp:81–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 static void applyPitch(AudioInstance& inst)
82 {
83 if (std::abs(inst.attribs.frequency) < 100)
84 {
85 alSourcef(inst.sourceId, AL_PITCH, 1.0f);
86 }
87 else
88 {
89 alSourcef(inst.sourceId, AL_PITCH, freqToPitch(inst.attribs.frequency));
90 }
91 }
92
93 static void applyPan(uint32_t sourceId, int32_t pan)
94 {

Callers 3

createFunction · 0.85
setPitchFunction · 0.85
setAttributesFunction · 0.85

Calls 1

freqToPitchFunction · 0.85

Tested by

no test coverage detected