Commit 3fd7c9f1 authored by David Reid's avatar David Reid

Fix a bug when no data callback is specified in the device config.

Public issue https://github.com/mackron/miniaudio/issues/893
parent deafb7e9
......@@ -18949,6 +18949,11 @@ static void ma_device__handle_data_callback(ma_device* pDevice, void* pFramesOut
}
}
ma_device_restore_denormals(pDevice, prevDenormalState);
} else {
/* No data callback. Just silence the output. */
if (pFramesOut != NULL) {
ma_silence_pcm_frames(pFramesOut, frameCount, pDevice->playback.format, pDevice->playback.channels);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment