py-simple-audio
py-simple-audio copied to clipboard
No direct support for path objects.
I would find it more convenient to not have to cast a path object to a string to get this to work. Not sure if anyone else would agree?
import os
from pathlib import Path
DIR_BASE = Path(os.path.dirname(__file__)).parent
DIR_SOUNDS = Path(DIR_BASE, "sounds")
class Sounds:
ERROR1 = WaveObject.from_wave_file(str(DIR_SOUNDS.joinpath("error1.wav"))) # works
ERROR2 = WaveObject.from_wave_file(DIR_SOUNDS.joinpath("error2.wav")) # doesn't work