Hi,
Forgive the remedial question, as I may be missing something obvious
given my noob-ness to both python and pymedia. Given the following
script, I can't get the audio to play. Any idea what I'm doing wrong?
Many thanks,
Garth

#!/usr/bin/python

from fltk import *
import sys
import pymedia.player

window = None
player = None

def startPlay(prt, widget):
        player = pymedia.Player()
        player.start()
        player.startPlayback(sys.argv[1])

def playPause(ptr, widget):
        if player.isPaused():
                player.unpausePlayback()
        else:
                player.pausePlayback()
        
def exitcb(ptr, widget):
        sys.exit(0)

window = Fl_Window(100,100,320, 65,"Button")
b1 = Fl_Button(20,20,80,25, "Play")
b1.callback(startPlay,window)
b2 = Fl_Button(120,20, 80, 25, "Pause")
b2.callback(playPause,window)
b3 = Fl_Button(220,20, 80, 25, "Exit");
b3.callback(exitcb,window)
window.end()
window.show()
Fl.run()

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pymedia-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pymedia-users

Reply via email to