The Following 2 Users Say Thank You to Aisu For This Useful Post: | ||
![]() |
2007-12-31
, 16:23
|
|
Posts: 3,404 |
Thanked: 4,474 times |
Joined on Oct 2005
@ Germany
|
#2
|
![]() |
2007-12-31
, 17:22
|
Posts: 662 |
Thanked: 238 times |
Joined on Jul 2007
|
#3
|
import pygst
pygst.require('0.10')
import gst
import gobject, sys
def play_uri(uri):
" play an uri like tada.wav "
player = gst.element_factory_make("playbin", "player")
print 'Playing:', uri
player.set_property('uri', uri)
player.set_state(gst.STATE_PLAYING)
play_uri("/home/user/tada.wav")
import gtk; gtk.main()
Nokia-770-36:/home/user# python sound.py
Playing: /home/user/tada.wav
python[2166]: GLIB CRITICAL ** GStreamer - gst_element_make_from_uri: assertion `gst_uri_is_valid (uri)' failed
python[2166]: GLIB CRITICAL ** GStreamer - gst_uri_get_protocol: assertion `gst_uri_is_valid (uri)' failed
![]() |
2007-12-31
, 20:37
|
Posts: 662 |
Thanked: 238 times |
Joined on Jul 2007
|
#4
|
play_uri("file:///home/user/tada.wav")
![]() |
2008-01-01
, 21:35
|
|
Posts: 273 |
Thanked: 104 times |
Joined on Mar 2007
@ Manitoba, Canada
|
#5
|
The Following User Says Thank You to darethehair For This Useful Post: | ||
![]() |
2008-01-02
, 00:59
|
Posts: 662 |
Thanked: 238 times |
Joined on Jul 2007
|
#6
|
I haven't been able to find anything that works to simply play a wav on maemo, I've tried...
But nothing seems to work... could someone please just show me a snippet on how to play a wav on the tablets? Thats it, no need to stop or pause or anything else, just play it. It would be greatly appreciated!
Thanks.