r/pythonarcade • u/rb-dahlb • Mar 29 '19
How to use sound.py Player?
Seeing that Issue 245 was closed with the 2.0 release, I tested the code shown in that Issue:
import arcade
import os
path = "c:\\" + os.path.join(*arcade.__file__.split("\\")[1:-1], "examples", "sounds")
player = arcade.Player()
player.load_dir(path)
player.looping(True)
player.play(player.music[0])
arcade.run()It fails with this:
player = arcade.Player()
AttributeError: module 'arcade' has no attribute 'Player'
I'm on Windows, using Python 3.7 and arcade 2.0.1
2
Upvotes
View all comments
Show parent comment
1
u/rb-dahlb Apr 01 '19
OK, thanks for the reply. I have been looking into alternative ways to do this, and I think the SoLoud framework looks interesting for this purpose. But I am not yet familiar enough with Python and packaging to get it working when it is not available as a pip install... maybe someone else is? ;)
http://sol.gfxile.net/soloud/