Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Gosu Song new function suggestion
- - By Maverick Date 2011-10-26 06:26
It'd be rather beneficial in some cases to be able to get the time laps of a song as well as the maximum time length. For instance, perhaps at a specific part of the song, I want some event to happen, it'd be great to access the time lapse as close as possible.

if(levelMusic->lapsedTime() >= Gosu::Song::TimeSignature("2:40"))
    EnemyFactory::releaseTheKracken();


Thoughts>
Parent - - By jlnr (dev) Date 2011-10-26 07:36
Simpler interface aside, if it's really only about the time you could try and see if using Gosu::milliseconds() is good enough? I actually don't know. :)
Parent - - By Maverick Date 2011-10-26 12:00
Even though it sounds like a good idea, I've done something similar before in another library. It's not precise. i.e. the music would delay in the event.
Parent - By jlnr (dev) Date 2011-10-26 18:05
I know some people go crazy over precise beat synchronization, but I thought the Kraken release might be accurate enough. Anyway, since Gosu's audio backend is mostly unified now, one patch would fix all platforms. Go go go! :)
Up Topic Gosu / Gosu Exchange / Gosu Song new function suggestion

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill