Use an atomic load on the master volume.

This commit is contained in:
David Reid
2020-12-04 18:07:11 +10:00
parent e8499f99bb
commit 4cbe200b85
+1 -1
View File
@@ -11305,7 +11305,7 @@ static void ma_device__on_data(ma_device* pDevice, void* pFramesOut, const void*
{
float masterVolumeFactor;
masterVolumeFactor = pDevice->masterVolumeFactor;
ma_device_get_master_volume(pDevice, &masterVolumeFactor); /* Use ma_device_get_master_volume() to ensure the volume is loaded atomically. */
if (pDevice->onData) {
if (!pDevice->noPreZeroedOutputBuffer && pFramesOut != NULL) {