
Playing the tone might be a hardware issue more than programming. J2ME devices have the tone generator in hardware. 2nd: An interacting user would be using keyboard or mouse (or whatever else input device). Always store the time for an I/O event (im assuming you can capture I/O events in some callback function). Have a separate thread running that takes the difference btwn the I/O time with the current time (sleep this thread according to how frequently u want to check e.g. sleep for like 1 minute...), if no I/O has taken place in >= 5 mins then u can launch u're screen saver, wash a dog or do whatever else u wish. Hope tht helps. ________________________________ From: Mike Muraguri <mickie.mic@gmail.com> To: Skunkworks Mailing List <skunkworks@lists.my.co.ke> Sent: Tuesday, September 13, 2011 11:06 AM Subject: [Skunkworks] C/C++ tone sequence / screensaver in Linux Hi, I'm looking for a way of playing a tone sequence in C/C++ on a Linux operating system. There's an easy way of going this for J2ME devices where a tone sequence is defined as in this case. However, in my case, I want this in C/C++. I've tried projects like beep but without much success. Second one, what's the best way to detect "idle time" in C/C++ using pwrap/pwrap2 as the GUI library, how can you start an event if a user not interacting with the particular program say for 5 minutes? Somewhat like what you would do to activate a screensaver prefferably without using hooks and working in Linux. Please give me any leads on this. Thanks. -- Regards, Mike Muraguri Skype: mickie.mic M: + 254 722 799445 _______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke