File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ void AudioChannel::update(float deltaTime) {
21
21
if (!m_active || !m_currentFile)
22
22
return ;
23
23
24
+ // Don't let the speed change too quickly
24
25
m_currentSpeed = std::lerp (m_currentSpeed, m_targetSpeed, deltaTime * 8 .0f );
25
26
26
27
if (m_fadeTimeRemaining > 0 .0f ) {
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ struct Spinny {
36
36
struct TimeScaleState {
37
37
float currentScale = 1 .0f ;
38
38
float targetScale = 1 .0f ;
39
- float transitionSpeed = 0 .1f ; // Adjust this to control smoothing speed
39
+ float transitionSpeed = 0 .3f ; // Adjust this to control smoothing speed
40
40
};
41
41
42
42
int main (int argc, char *argv[]) {
@@ -197,17 +197,17 @@ int main(int argc, char *argv[]) {
197
197
case SDLK_1:
198
198
timeScale->targetScale = 0 .5f ;
199
199
audioEngine.setSpeed (0 .5f );
200
- // audioEngine.playSound("./assets/sfx/slowdown.wav");
200
+ audioEngine.playSound (" ./assets/sfx/slowdown.wav" );
201
201
break ;
202
202
case SDLK_2:
203
203
timeScale->targetScale = 1 .0f ;
204
204
audioEngine.setSpeed (1 .0f );
205
- // audioEngine.playSound("./assets/sfx/slowdown.wav");
205
+ audioEngine.playSound (" ./assets/sfx/slowdown.wav" );
206
206
break ;
207
207
case SDLK_3:
208
208
timeScale->targetScale = 2 .0f ;
209
209
audioEngine.setSpeed (2 .0f );
210
- // audioEngine.playSound("./assets/sfx/slowdown.wav");
210
+ audioEngine.playSound (" ./assets/sfx/slowdown.wav" );
211
211
break ;
212
212
case SDLK_SPACE:
213
213
audioEngine.playSound (" ./assets/sfx/real-trap-shit.wav" );
You can’t perform that action at this time.
0 commit comments