diff options
| author | Andre Weissflog <floooh@gmail.com> | 2018-09-24 15:43:12 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2018-09-24 15:43:12 +0200 |
| commit | 1546dac9a9775d9119f3a7eb2d3f21285908ef2a (patch) | |
| tree | 425cf5f589a23d4a87dcfdb389ebb6ce1f5bc26b /sokol_audio.h | |
| parent | 5e6126b1d20521fb80a9fe40c52402c67e77b3a4 (diff) | |
sokol-audio wasapi: change assert check into an if when there's no data to submit
Diffstat (limited to 'sokol_audio.h')
| -rw-r--r-- | sokol_audio.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sokol_audio.h b/sokol_audio.h index e7477919..a9f742dd 100644 --- a/sokol_audio.h +++ b/sokol_audio.h @@ -721,8 +721,9 @@ _SOKOL_PRIVATE DWORD _saudio_wasapi_thread_fn(LPVOID param) { } SOKOL_ASSERT(_saudio_wasapi.thread.dst_buffer_frames >= (int)padding); UINT32 num_frames = _saudio_wasapi.thread.dst_buffer_frames - padding; - SOKOL_ASSERT(num_frames > 0); - _saudio_wasapi_submit_buffer(num_frames); + if (num_frames > 0) { + _saudio_wasapi_submit_buffer(num_frames); + } } return 0; } |