37 lines
669 B
Python
37 lines
669 B
Python
# Bryan Schumaker (11/23/2010)
|
|
|
|
audio = None
|
|
call = None
|
|
invite = None
|
|
prefs = None
|
|
|
|
def init():
|
|
global call
|
|
global audio
|
|
global invite
|
|
global prefs
|
|
|
|
import libsaria
|
|
call = libsaria.event.call
|
|
invite = libsaria.event.invite
|
|
prefs = libsaria.prefs
|
|
|
|
from audio import audio
|
|
invite("PREEOS", pause)
|
|
libsaria.init_pref("libsaria.random", False)
|
|
|
|
def play():
|
|
return call("PLAY", audio.play)
|
|
|
|
def pause():
|
|
return call("PAUSE", audio.pause)
|
|
|
|
def stop():
|
|
return call("STOP", audio.stop)
|
|
|
|
def set_volume(prcnt):
|
|
return call("SETVOLUME", audio.set_volume, prcnt)
|
|
|
|
def toggle_rand():
|
|
prefs.set_pref("libsaria.random", not prefs.get_pref("libsaria.random"))
|