View Single Post
Old 07-11-2012, 02:54 AM   #89
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by twobob View Post
Looks like the tones demo I top posted uses about 35 - 40% of the cpu just to do the demo...
...
Would like to see this run side-by-side geekmasters code now to see if the device can handle it

Clearly some optimisation to be done.
That looks like a fun little project. I often find that interleaving the code into one loop uses less CPU that trying to multiprocess it as two apps, or other coprocessing methods that rely on two simultaneous loops.

I like the coroutines method by Simon Tatham (the PuTTY guy), which allows logically interleaving control flow while maintaining visual separation: http://www.chiark.greenend.org.uk/~s...oroutines.html
We could use that to interleave the video and audio code inside one control loop.

Simon Tatham also has a nice collection of simple Java games that might make nice kindlets: http://www.chiark.greenend.org.uk/~sgtatham/puzzles/

Anyway, I am looking forward to adding some some code to gmplay, to play gmv video files that contain interleaved audio and video (using your code above). Thanks. Just need to get caught up at work a bit first before I take some "educational play time".

Re: running side-by-side, you can do that by opening two SSH shells...

Last edited by geekmaster; 07-11-2012 at 04:52 AM.
geekmaster is offline   Reply With Quote