Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
修复击键音效有杂音,延迟关闭资源调整到 500 毫秒。
Browse files Browse the repository at this point in the history
  • Loading branch information
tangshimin committed Dec 9, 2022
1 parent 08951fe commit 00e6d90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/ui/Word.kt
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ fun playSound(path: String, volume: Float) {
val clip: Clip = AudioSystem.getLine(info) as Clip
clip.addLineListener{event ->
if (event.type == LineEvent.Type.STOP) {
Timer("clip close", false).schedule(300) {
Timer("clip close", false).schedule(500) {
clip.close()
}
}
Expand Down

0 comments on commit 00e6d90

Please sign in to comment.