r/pythonarcade • • 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

3 comments sorted by

View all comments

Show parent comment

1

u/pvc Apr 02 '19

That looks like a pretty cool library.