coreaudio: fix sleep duration when the buffer is full
The previous calculation was wrong and could lead to two potential issues:
- Too much wake/sleep because the block remaining data is very small
- Too long sleep, if the block is longer than the buffer size, that could lead to underrun
To fix this issue, use the same sleep calculation than wasapi.