help about helix libraries

Peter Krenesky peter at osuosl.org
Fri Feb 15 14:53:28 EST 2008


Hi Waqas,

I'm the lead dev for the helix python api so i should be able to answer 
any questions you have about it.

The helix engine requires an application "pump" the engine to keep it 
going (like an old fashion well pump).  hxplay.run() continuously pumps 
the engine, blocking till the end of stream is reached. 

what you need to do is call hxplay.doevent() from within the activity 
mainloop.  this allows both pygtk and helix to run at the same time. 

    class Play():
        def idle_function(self):
            try:
                hxplay.doevent()
            except Exception, e:
                print e
            return True


you also need to set the idle function and remove it when the class is 
cleaned up:

    self.idlefunction = gobject.idle_add(self.idle_function)


-Peter



Waqas Toor wrote:
> Hello All,
>
> I am trying to create a Reciter activity, so I need help regarding hxplay
>
> i am trying to create an embeded play using helix library, but the
> problem is that when I play a mp3 file using hxplay.run() method the
> activity gets stuck untill the audio file is complete.
>
> any pointers that what should I do, as hacking watch and listen
> activity give me abstract over view of the player
>
> Regards
>   




More information about the Devel mailing list