Python2
parent
8066995da5
commit
1eaa9219ae
6
host.py
6
host.py
|
@ -39,7 +39,7 @@ def logmesohard(name):
|
||||||
|
|
||||||
print("Playing {}".format(name))
|
print("Playing {}".format(name))
|
||||||
|
|
||||||
class Sound:
|
class Sound(object):
|
||||||
def __init__(self, paths):
|
def __init__(self, paths):
|
||||||
self.paths = paths
|
self.paths = paths
|
||||||
def create(self):
|
def create(self):
|
||||||
|
@ -48,7 +48,7 @@ class Sound:
|
||||||
|
|
||||||
class SimpleSound(Sound):
|
class SimpleSound(Sound):
|
||||||
def __init__(self, path):
|
def __init__(self, path):
|
||||||
super(SimpleSound,self).__init__([path,])
|
super(SimpleSound, self).__init__([path,])
|
||||||
|
|
||||||
def play(self):
|
def play(self):
|
||||||
logmesohard(self.paths[0])
|
logmesohard(self.paths[0])
|
||||||
|
@ -68,7 +68,7 @@ class RandomSound(Sound):
|
||||||
class ListSound(Sound):
|
class ListSound(Sound):
|
||||||
def __init__(self, paths):
|
def __init__(self, paths):
|
||||||
self._state = self._getsound()
|
self._state = self._getsound()
|
||||||
super().__init__(paths)
|
super(ListSound, self).__init__(paths)
|
||||||
|
|
||||||
def _getsound(self):
|
def _getsound(self):
|
||||||
last_sound = None
|
last_sound = None
|
||||||
|
|
Loading…
Reference in New Issue