comparison tests/test_audio.nim @ 1303:e0326aa067c8

fix: windows builds
author sam@sambook-windows.localdomain
date Wed, 07 Aug 2024 15:54:22 +0700
parents 3308b88e53a6
children df3c075e5dea
comparison
equal deleted inserted replaced
1302:4f1c3994009d 1303:e0326aa067c8
74 test2() 74 test2()
75 mixer[].stop() 75 mixer[].stop()
76 test3() 76 test3()
77 77
78 while mixer[].isPlaying(): 78 while mixer[].isPlaying():
79 discard mixer[].play("ping", track = "effects", stopOtherSounds = true, level = 0.5)
80 # on windows we re-open stdin and this will not work 79 # on windows we re-open stdin and this will not work
81 when defined(linux): 80 when defined(linux):
81 discard mixer[].play("ping", track = "effects", stopOtherSounds = true, level = 0.5)
82 echo "Press q and enter to exit" 82 echo "Press q and enter to exit"
83 if stdin.readLine() == "q": 83 if stdin.readLine() == "q":
84 mixer[].stop() 84 mixer[].stop()
85 elif defined(windows): 85 elif defined(windows):
86 sleep(5) 86 sleep(1000)
87 mixer[].stop()