Closed koshaan closed 3 years ago
would maybe either be best to replace or compliment with a way to define this in the upcoming config file. This should perhaps be merged with or succeed issue #34.
I would suggest 3 modes. No sound, specific sound (with a default sound being the current one) and a random that would be a random from a library of sounds. Maybe even allow custom ones.
Sounds like a good idea :D (assuming we distribute multiple sound files).
My thought is to allow the user to specify an arbitrary amount of sound files (by defining the path) in the config file.
Alternativly some of these options could also coexist as command line flags
(note: config format not finalized at all)
[sound]
enable=true
# Could either be a path to an audiofile, an index of the list winsounds or the string 'random', which picks a random file from the list.
winsound = 0
lostsound = 'random'
#This list is only required if winsound is an index or 'random'
winsounds = [
"/users/bob/tada.mp3"
"/users/bob/win.mp3",
"/users/bob/mario.mp3",
]
#This list is only required if lostsound is an index or 'random'
lostsounds = [
"/users/bob/error.mp3"
"/users/bob/lost.mp3",
"/users/bob/gameover.mp3",
]
resources
.I'm considering closing this issue, as I don't see why we need ability to switch between 0, 1 or N with a flag.
Eh, if you want to toggle between 1 and N sounds you'll have to just remove sounds from the folders, or create a new issue so we do it.
Add a --randomsound command that picks a random sound from a library of x sounds, when you successfully submit a problem.