Permalink
Browse files

fix song not ending

  • Loading branch information...
1 parent 487dbc0 commit cf97b6ac3c25117f3e0b6ae404e92b9a7881acda @leafo committed Apr 20, 2015
Showing with 2 additions and 2 deletions.
  1. +2 −2 track.moon
View
@@ -35,6 +35,7 @@ class Track
@finished = false
@start_time = love.timer.getTime!
+ @source\setLooping false
@source\rewind!
@source\setVolume 1
@last_measure = -1
@@ -78,10 +79,9 @@ class Track
@data.measures
check_finished: =>
- if @source\tell("seconds") > @duration!
+ if love.timer.getTime! - @start_time > @duration!
@stop!
@finished = true
-
-- for looping
-- @notes\reset!
-- @start!

0 comments on commit cf97b6a

Please sign in to comment.