Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. void Start()
  2. {
  3. //calculate how many seconds is one beat
  4. //we will see the declaration of bpm later
  5. secPerBeat = 60f / bpm;
  6.  
  7. //record the time when the song starts
  8. dsptimesong = (float) AudioSettings.dspTime;
  9.  
  10. //start the song
  11. GetComponent<AudioSource>().Play();
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement