Of course it does. Look at your code in OnOk:
for i in files :
play(i)
while pygame.mixer.music.get_busy():
time.sleep(0.05)
You start playing file #1. Then, you sit in that loop waiting uselessly
until the mixer is idle (meaning until the playback is finished). Then
you start playing file #2, and wait for it to finish. You have
specifically asked for one file at a time here. Further, because this
is in your OnOk handler, your user interface will be totally
non-responsive until ALL the files have finished and this routine
returns. Remember that your message loop cannot handle any messages
until a handler returns.
Pygame is naturally asynchronous, but you are intentionally suppressing
that. If you want to start three files playing at once, then just do that:
for i in files:
play(i)
Don't do any waiting.
--
Tim Roberts,
ti...@probo.com
Providenza & Boekelheide, Inc.