SymbiSoft / aspyplayer

Automatically exported from code.google.com/p/aspyplayer
0 stars 0 forks source link

Add repeat mode support #43

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Add repeat mode support. Currently only linear and random are supported

Original issue reported on code.google.com by doug.fer...@gmail.com on 21 Mar 2008 at 12:56

GoogleCodeExporter commented 8 years ago

Original comment by doug.fer...@gmail.com on 21 Mar 2008 at 9:06

GoogleCodeExporter commented 8 years ago

Original comment by doug.fer...@gmail.com on 27 Mar 2008 at 5:06

GoogleCodeExporter commented 8 years ago
Hi,you can do it using a callback, something like this:

def playerCallBack(previous,current,error):
    if (error!=0):
        print "Error"   
    if (previous==audio.EPlaying and current==audio.EOpen):
      next()

def play(i):
  global S,filename
  S=audio.Sound.open(filename)
  S._player.bind(playerCallBack)
  S._player.play(0,0)

Original comment by antivi...@gmail.com on 27 Mar 2008 at 8:16