Skip to content

Commit 8308fe7

Browse files
committed
fix android mixer implementation: play() must return the channel used as pygame does. Otherwise, on_stop() will be never called in kivy.
1 parent 0a00557 commit 8308fe7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

recipes/android/src/android_mixer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ def __init__(self, what):
194194
sounds[self.serial] = self
195195

196196
def play(self, loops=0, maxtime=0, fade_ms=0):
197-
find_channel(True).play(self, loops=loops)
197+
channel = find_channel(True)
198+
channel.play(self, loops=loops)
199+
return channel
198200

199201
def stop(self):
200202
for i in range(0, num_channels):

0 commit comments

Comments
 (0)