diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-11-14 16:47:51 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-11-14 16:48:44 +0100 |
commit | a22baa4b553ac08a7f27001fb9a53c441d675727 (patch) | |
tree | 60999173ecd9da6cbe1bc353658e8ee686c6e331 | |
parent | b3e545e0bb5c56cefaa0848ac6471a3139e15a75 (diff) | |
download | xK-origin/master.tar.gz xK-origin/master.tar.xz xK-origin/master.zip |
xA: prevent sound playback GCorigin/master
The beep sound could be cut short.
-rw-r--r-- | xA/xA.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -281,7 +281,11 @@ func beep() { } go func() { <-otoReady - otoContext.NewPlayer(bytes.NewReader(beepSample)).Play() + p := otoContext.NewPlayer(bytes.NewReader(beepSample)) + p.Play() + for p.IsPlaying() { + time.Sleep(time.Second) + } }() } |