revert sound prescheduling behaviour (#195)

This commit is contained in:
minenice55 2023-01-12 17:34:38 -05:00 committed by GitHub
parent 1f06ca9a1c
commit 3e9ac0292d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ namespace HeavenStudio.Util
{
playInstant = false;
scheduledPitch = cnd.musicSource.pitch;
startTime = cnd.dspStartTimeAsDouble + ((cnd.GetSongPosFromBeat(beat - cnd.startBeatAsDouble))/(double)scheduledPitch);
startTime = (AudioSettings.dspTime + (cnd.GetSongPosFromBeat(beat) - cnd.songPositionAsDouble)/(double)scheduledPitch);
audioSource.PlayScheduled(startTime);
}
}