*blog... kind of... *rss
Inspire08 demo log, day 30
... Ok, porting this to LWJGL ended up being a waste of time. The main porting was very quick, like, in 30min I had it done and working. Doing the applet version took more time, about 4 hours or so. And in the end there were some weird bugs with the timer, and after all the time spent trying to understand how to do the Applet version is the last thing I wanted to see. So, back to JOGL.
I also spent more time again on getting the position of the tune. I managed to get something this time. SourceDataLine.getFramePosition() return the amount of samples played, but they numbers aren't as smooth as a normal Timer, like the same number may repeat 5 times, which means that the animation is jumping. I had to do a crap fix for that:
Am I the only one that thinks that it's weird that I have to do this? Still, it kind of works, but sometimes jumps back a tiny bit, I may come back to this code in a few days to try other things, but at least it uses the audio timer (somehow).
I was now starting doing the font system, it will take a bit still as I need to find the best/most dynamic approach.
I felt that closing the previews was a bad idea, so as soon as I have some text on top of the screen working I'll put a new version online so you can see where the thing is going.
0 comments written so far...Status:
-2 days left until Inspire08
Back to the system code... Ok, porting this to LWJGL ended up being a waste of time. The main porting was very quick, like, in 30min I had it done and working. Doing the applet version took more time, about 4 hours or so. And in the end there were some weird bugs with the timer, and after all the time spent trying to understand how to do the Applet version is the last thing I wanted to see. So, back to JOGL.
I also spent more time again on getting the position of the tune. I managed to get something this time. SourceDataLine.getFramePosition() return the amount of samples played, but they numbers aren't as smooth as a normal Timer, like the same number may repeat 5 times, which means that the animation is jumping. I had to do a crap fix for that:
public static long getPosition()
{
/*
* For some reason the SourceDataLine.getFramePosition()
* doesn't give back smooth sequence of numbers, here it's
* a crap fix for it.
*/
if (lastSampleInfo != tune.getPosition())
{
lastSampleInfo = tune.getPosition();
lastTimerInfo = System.currentTimeMillis();
}
return lastSampleInfo + (System.currentTimeMillis() - lastTimerInfo);
}
Am I the only one that thinks that it's weird that I have to do this? Still, it kind of works, but sometimes jumps back a tiny bit, I may come back to this code in a few days to try other things, but at least it uses the audio timer (somehow).
I was now starting doing the font system, it will take a bit still as I need to find the best/most dynamic approach.
I felt that closing the previews was a bad idea, so as soon as I have some text on top of the screen working I'll put a new version online so you can see where the thing is going.
Have your say!
*profile

traditional id: Ricardo Cabello Miguel
based in: London, UK
more: twitter, twitpic and soundcloud.
*post nav
FlexBuilder3 + Eclipse + Ubuntu = More AS3 Tests
Inspire08 demo log, day 36
Inspire08 demo log, day 35
Temps Réel - Breakpoint 08
Diverter
Inspire08 demo log, day 30
Inspire08 demo log, day 29
Inspire08 demo log, day 27 and 28
Inspire08 demo log, day 26 (part 2)
Inspire08 demo log, day 26 (part 1)
Inspire08 demo log, day 25
*latest comments
Banning Internet Explorer
Windosill
Banning Internet Explorer
Banning Internet Explorer
Making history not repeat itself
Layers on top of Flash are possible
Banning Internet Explorer
Making history not repeat itself
Banning Internet Explorer
Banning Internet Explorer