# HG changeset patch # User sam # Date 1712393201 -25200 # Node ID 1ba0e5dfbf6803d8cdafcec8af862e4b2eb8a067 # Parent 6406766a222d0065e3fe6c71f77f92e7916f9a22 fix: windows audio test diff -r 6406766a222d -r 1ba0e5dfbf68 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()