|
From: Kevin N. <bea...@ya...> - 2007-01-30 03:09:38
|
I got the AJAX callbacks working on the current song and the song queue. It was actually quite easy without extra libraries. As for the wait time, it turns out boost::thread has built in sleep capabilities. You just tell a current thread to sleep and give it an amount of time, and it happens. No new thread needed. Kevin --- Tim Nowaczyk <zi...@cs...> wrote: > On Thu, Jan 25, 2007 at 01:40:33PM -0800, Kevin > Nowaczyk wrote: > > Hey Tim, > > Hopefully you get this and have something to add: > > I've been working on tjukebox again. I created a > PHP > > web client which works pretty well. There's one > thing > > you might be able to help with. The console > client > > keeps the socket connection open so it constantly > > recieves updates from the server on the current > song. > > The web client, on the otherhand, get's it's > > information and closes the socket. I want to try > to > > ensure that the "current song" name is correct. I > > could do this by forcing the entire page to reload > > every 10 second, but that's annoying. I know > > Javascript does not support socket connections, > but It > > can do AJAX. > > > It might be most flexable if the communication > between the clients and > server was in the form of XML. Google for WSDL > and/or SOAP. This way you also > aren't having to do your own raw TCP/IP connections. > > > Do you know how we cound harness the AJAX > functions to > > get the current artist, album, and song from the > > tjukebox server. > > > A first step might be doing this. > > > Also, I want to implement a wait time between > playing > > random songs. > > You pretty much have it figured out. > > The Jukebox server needs a new variable let's call > waittime_thread. > When a new song is added to the playlist if the list > is empty and > waittime_thread is not null, kill waittime_thread > then add the new song. > The function of waittime_thread is then simply to > wait for x minutes > then add a random song to the playlist and then end. > It's been a long > time since I've done any mutli-threaded c++ > programming, so I can't > really be of any more help. > > Good luck. > Tim > > -- > A wink is as good as a nudge to a blind bat. --Eric > Idle > > ----------Tim > Now...@cs...-------------------- > GPG Key ID: 0x4F9A159C > GPG Fingerprint: 0B1C 3D7B 6EB3 B8B6 D408 F7CC BD48 > 8E2D 4F9A 159C > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Tjukebox-general mailing list > Tju...@li... > https://lists.sourceforge.net/lists/listinfo/tjukebox-general > ____________________________________________________________________________________ 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news |