Moved play and pause to libsaria/controls.py
They have been moved from libsaria/audio/__init__.py.
This commit is contained in:
parent
f8e4999ad3
commit
c8c79272b6
|
@ -39,17 +39,6 @@ def load(file):
|
|||
return call("LOAD", audio.load, file)
|
||||
|
||||
|
||||
def play():
|
||||
global audio
|
||||
return call("PLAY", audio.play)
|
||||
|
||||
|
||||
def pause():
|
||||
global audio
|
||||
return call("PAUSE", audio.pause)
|
||||
libsaria.event.invite("PREEOS", pause)
|
||||
|
||||
|
||||
def stop():
|
||||
global audio
|
||||
return call("STOP", audio.stop)
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
# Bryan Schumaker (11/23/2010)
|
||||
|
||||
audio = None
|
||||
call = None
|
||||
audio = None
|
||||
call = None
|
||||
invite = None
|
||||
|
||||
def init():
|
||||
global call
|
||||
global audio
|
||||
global invite
|
||||
|
||||
import libsaria
|
||||
call = libsaria.event.call
|
||||
call = libsaria.event.call
|
||||
invite = libsaria.event.invite
|
||||
|
||||
from audio import audio
|
||||
invite("PREEOS", pause)
|
||||
|
||||
def play():
|
||||
return call("PLAY", audio.play)
|
||||
|
||||
def pause():
|
||||
return call("PAUSE", audio.pause)
|
||||
|
|
|
@ -146,7 +146,7 @@ def inc_count(id):
|
|||
def play_id(id):
|
||||
libsaria.sources.cur_lib_id = id
|
||||
libsaria.audio.load(get_attrs(id, "filepath")[0])
|
||||
libsaria.audio.play()
|
||||
libsaria.controls.play()
|
||||
|
||||
def filter(text):
|
||||
global visible
|
||||
|
|
|
@ -53,7 +53,7 @@ class PauseButton(Button):
|
|||
invite("POSTPAUSE", self.hide)
|
||||
invite("POSTSTOP", self.hide)
|
||||
def clicked(self, button):
|
||||
LS.audio.pause()
|
||||
LS.controls.pause()
|
||||
def hide(self, paused):
|
||||
if paused == True:
|
||||
Button.hide(self)
|
||||
|
|
Loading…
Reference in New Issue
Block a user