Created
June 8, 2019 12:51
-
-
Save identity2/dd6df0fa240d4545cfc874824c2744a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Update() | |
{ | |
//calculate the position in seconds | |
songPosition = (float) (AudioSettings.dspTime - dsptimesong); | |
//calculate the position in beats | |
songPosInBeats = songPosition / secPerBeat; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment