[pygtk] How to add a sound file in glade?
Pietro Battiston
toobaz at email.it
Wed May 5 02:02:02 WST 2010
Il giorno mar, 04/05/2010 alle 21.42 +0530, varnikat t ha scritto:
> Hi,
> How to add a sound file in glade?
> I want the sound file to start when window pops up and to stop when
> window closes.
> Are there any default sound files which come with glade?
Glade is for making GUI interfaces, not for handling audio...
But playing an audio file with gstreamer is as easy as
#!/usr/bin/python
import pygst
pygst.require("0.10")
import gst, gtk
player = gst.element_factory_make("playbin2", "player")
player.set_property("uri", "file:///path/to/file")
player.set_state(gst.STATE_PLAYING)
gtk.main()
bye
Pietro
More information about the pygtk
mailing list