Mercurial > games > semicongine
changeset 771:00f3fa3fbc6d
fix: no sound on windows release builds
author | sam <sam@basx.dev> |
---|---|
date | Sun, 09 Jul 2023 00:29:55 +0700 |
parents | e9c9777d354d |
children | 5d248fcfddf6 |
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) =