Mercurial > games > semicongine
changeset 310:77ae1f34a4e3
fix: no sound on windows release builds
author | sam <sam@basx.dev> |
---|---|
date | Sun, 09 Jul 2023 00:29:55 +0700 |
parents | 81949dafd8f4 |
children | 01f96ae71681 |
files | src/semicongine/platform/windows/audio.nim |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/semicongine/platform/windows/audio.nim Sat Jul 08 21:06:26 2023 +0700 +++ b/src/semicongine/platform/windows/audio.nim Sun Jul 09 00:29:55 2023 +0700 @@ -37,7 +37,7 @@ proc writeSoundData*(soundDevice: var NativeSoundDevice, buffer: int) = while (soundDevice.buffers[buffer].dwFlags and WHDR_DONE) == 0: - discard + echo "" # ugly solution to prevent code elimination, need to find a nicer solution checkWinMMResult waveOutWrite(soundDevice.handle, addr soundDevice.buffers[buffer], UINT(sizeof(WAVEHDR))) proc closeSoundDevice*(soundDevice: var NativeSoundDevice) =