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

Public issue https://github.com/mackron/miniaudio/issues/893
This commit is contained in:
David Reid
2025-02-22 10:14:04 +10:00
parent deafb7e96f
commit 3fd7c9f199
+5
View File
@@ -18949,6 +18949,11 @@ static void ma_device__handle_data_callback(ma_device* pDevice, void* pFramesOut
} }
} }
ma_device_restore_denormals(pDevice, prevDenormalState); 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);
}
} }
} }