Hi Floris,

> I've found that pygame hasn't support for multiple displays so I guess the
> problem have to be solved with something like os.system('DISPLAY=:0.1 ').
> Unfortunately I can't figure out the point where the "database window" opens
> the "lyrics window"

The playlist GUI (pykaroake.py) calls out to MakePlayer() in pykdb.py to 
start the players. This in turn uses either pycdg.py, pykar.py or 
pympg.py depending on the songfile type. All of these eventually make 
use of InitPlayer() in pykmanager.py to initialise pygame if necessary. 
You may find InitPlayer() is a useful place to do something like this.

That said, I don't know whether it is even possible to set the X display 
in this way. I strongly suspect that it won't be possible to have the 
same process utilising two different X displays (one for WxWidgets and 
one for Pygmae), but I don't know what the rules are there with X. It 
might be necessary to spawn a new process to handle the player windows 
rather than run them as a thread within the existing process. It should 
be possible to insert a different interface between the playlist and the 
players such that two separate processes communicate using something 
like a socket. You'd need to implement two-way communication such that 
the playlist can tell the player process to play/pause etc. and when the 
song finishes the player can callback to the playlist to notify it. 
Hopefully the interface will be clean enough such that you can drop in a 
replacement glue layer to handle the interprocess communication

If you're interested in taking this up I'd be happy to provide further 
info on how it all fits together.

Kelvin.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Pykaraoke-discuss mailing list
Pykaraoke-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss

Reply via email to