Mercurial > games > semicongine
changeset 1089:8abbcdd4d58c
fix: windows audio test
author | sam <sam@basx.dev> |
---|---|
date | Sat, 06 Apr 2024 15:46:41 +0700 |
parents | ac3025fcc324 |
children | 450b8a5042cd |
files | tests/test_audio.nim |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test_audio.nim Sat Apr 06 15:27:09 2024 +0700 +++ b/tests/test_audio.nim Sat Apr 06 15:46:41 2024 +0700 @@ -78,6 +78,11 @@ while mixer[].isPlaying(): discard mixer[].play("ping", track = "effects", stopOtherSounds = true, level = 0.5) - echo "Press q and enter to exit" - if stdin.readLine() == "q": + # on windows we re-open stdin and this will not work + when defined(linux): + echo "Press q and enter to exit" + if stdin.readLine() == "q": + mixer[].stop() + elif defined(windows): + sleep(5) mixer[].stop()