Skip to content

Commit 2dfed03

Browse files
committed
play: implement --headstart
1 parent 13a095b commit 2dfed03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

blitzloop/play.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ def entry():
3333
'--offset', type=float, default=0.0, help='song offset')
3434
parser.add_argument(
3535
'--variant', type=int, default=0, help='song variant')
36+
parser.add_argument(
37+
'--headstart', type=float, default=0.3, help='time offset')
3638
opts = util.get_opts()
3739

3840
fullscreen = opts.fullscreen
3941
s = song.Song(opts.songpath)
4042

41-
headstart = 0.3
42-
4343
if fullscreen:
4444
display = graphics.Display(1920, 1200, fullscreen, None)
4545
else:
@@ -77,7 +77,7 @@ def render():
7777
mpv.poll()
7878
song_time = mpv.get_song_time() or song_time
7979
mpv.draw_fade(song_time)
80-
renderer.draw(song_time + headstart * 2**(speed_i/12.0), song_layout)
80+
renderer.draw(song_time + opts.headstart * 2**(speed_i/12.0), song_layout)
8181
yield None
8282
t2 = time.time()
8383
if opts.st:

0 commit comments

Comments
 (0)