# HG changeset patch # User sam # Date 1712393201 -25200 # Node ID 8abbcdd4d58cb59b10feef69d5a16c6d74bf1dfe # Parent ac3025fcc3244f2f074d6ec91b8b92682e025a13 fix: windows audio test diff -r ac3025fcc324 -r 8abbcdd4d58c tests/test_audio.nim --- 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()