revert sound prescheduling behaviour (#195)

This commit is contained in:
minenice55 2023-01-12 17:34:38 -05:00 committed by GitHub
parent 5ddb96bcb1
commit 807bd7f05a

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);
}
}