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"))
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. :)
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.
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! :)
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill