/* If a buffer is mapped we need to write to that first. Once it's consumed we reset the event and unmap it. */
if (/*pDevice->pulse.pMappedBufferCapture != NULL && */pDevice->pulse.mappedBufferFramesRemainingCapture > 0) {
/*
If a buffer is mapped we need to read from that first. Once it's consumed we need to drop it. Note that pDevice->pulse.pMappedBufferCapture can be null in which
case it could be a hole. In this case we just write zeros into the output buffer.
*/
if (pDevice->pulse.mappedBufferFramesRemainingCapture > 0) {