Open qcgm1978 opened 9 months ago
Would you try this? https://github.com/kaorahi/lizgoban/tree/issue96_sound
(Usage)
Prepare sound files and put them into external/
directory. Then add "sound_file" into config.json like this.
{
...
"sound_file" : {
"stone": ["stone1.wav", "stone2.wav", "stone3.wav"],
"capture": ["capture.wav"],
"pass": ["pass.wav"]
},
...
}
It may be a fun idea to adjust the sound based on the game situation (settled/unsettled, etc.), though I'm not planning to implement it soon.
Wonderful. I tried it and copied audio files to external folder. All works perfectly. But I want to know what's the meaning there're multi files as stone
's value. Additionally, I believe that default sound files should be provided, even though users can customize their settings.
If you specify two or more sound files, one of them will play randomly each time. I believe this approach is popular for creating a natural sound effect. For the default sound, do you know of any files with explicit licensing for copying and distribution?
Sabaki is licensed under the MIT license. I don't know whether it is appropriate.
In the
draw_stone
method, play the sound afterdraw_last_move
. This is more intuitive. For example, you can make these changes: