Wait until the buffer is drained before closing the device
authorratchov <ratchov@openbsd.org>
Fri, 29 Apr 2022 09:12:57 +0000 (09:12 +0000)
committerratchov <ratchov@openbsd.org>
Fri, 29 Apr 2022 09:12:57 +0000 (09:12 +0000)
commit0add871791821558a4c201885b630835a8a45ed0
treea64a1ba42e52f7d85f4f0e3d226c527391593606
parent214dd8280ca1918f257af21db60567840cf3ab4f
Wait until the buffer is drained before closing the device

Fixes last few samples not being played when very large buffers
are used.
usr.bin/sndiod/dev.c
usr.bin/sndiod/dev.h