mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
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:
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user