Skip to content

Commit fe884c3

Browse files
committed
fixed sound play() func
1 parent 56a4d2b commit fe884c3

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

qork/audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Resource(Resource):
2828
def __init__(self, *args, **kwargs):
2929
super().__init__(*args, **kwargs)
3030

31-
self.full_fn = self.app.resource_path(self.fn)
31+
self.full_fn = self.app.resource_path(self.fn, throw=True)
3232

3333
if self.ext == ".wav":
3434
# self.data = openal.oalOpen(self.fn)

qork/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ def resource_path(self, fn, throw=False):
172172
for dp in self._data_paths:
173173
try:
174174
full_fn = path.join(dp, fn)
175+
print(full_fn)
175176
if os.path.exists(full_fn):
176177
return full_fn
177178
except FileNotFoundError:
@@ -490,6 +491,7 @@ def play(self, fn, **kwarg):
490491
"""
491492
Quick-play a sound
492493
"""
494+
camera = self.state_camera
493495
snd = camera.add(fn, temp=True)
494496
snd.play()
495497
return snd

qork/easy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def clear():
4444

4545

4646
def play(*args, **kwargs):
47-
return APP.scene.play(*args, **kwargs)
47+
return APP.play(*args, **kwargs)
4848

4949

5050
# def music(fn):

0 commit comments

Comments
 (0)