Skip to content

Commit ff0497c

Browse files
committed
Fixed framespikes fucking with audio
1 parent 97b4a63 commit ff0497c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Managers/AudioMan.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ namespace RTE {
127127

128128
float globalPitch = 1.0F;
129129

130-
float simSpeed = g_TimerMan.GetSimSpeed();
130+
float timeScale = g_TimerMan.GetTimeScale();
131131
// Soften the ratio of the pitch adjustment so it's not such an extreme effect on the audio.
132132
// TODO: This coefficient should probably move to SettingsMan and be loaded from ini. That way this effect can be lessened or even turned off entirely by users. 0.35 is a good default value though.
133-
globalPitch = simSpeed + (1.0F - simSpeed) * 0.35F;
133+
globalPitch = timeScale + (1.0F - timeScale) * 0.35F;
134134

135135
SetGlobalPitch(globalPitch);
136136

0 commit comments

Comments
 (0)