File tree 1 file changed +5
-0
lines changed
source/funkin/ui/debug/charting
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -6322,6 +6322,9 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
6322
6322
6323
6323
public function postLoadInstrumental (): Void
6324
6324
{
6325
+ var playbackRate = ((menubarItemPlaybackSpeed .value ?? 1.0 ) * 2.0 ) / 100.0 ;
6326
+ playbackRate = Math .floor (playbackRate / 0.05 ) * 0.05 ; // Round to nearest 5%
6327
+ playbackRate = Math .max (0.05 , Math .min (2.0 , playbackRate )); // Clamp to 5% to 200%
6325
6328
if (audioInstTrack != null )
6326
6329
{
6327
6330
// Prevent the time from skipping back to 0 when the song ends.
@@ -6331,8 +6334,10 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
6331
6334
audioInstTrack .pause ();
6332
6335
// Keep the track at the end.
6333
6336
audioInstTrack .time = audioInstTrack .length ;
6337
+ audioInstTrack .pitch = playbackRate ;
6334
6338
}
6335
6339
audioVocalTrackGroup .pause ();
6340
+ audioVocalTrackGroup .pitch = playbackRate ;
6336
6341
};
6337
6342
}
6338
6343
else
You can’t perform that action at this time.
0 commit comments