mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Use an atomic load on the master volume.
This commit is contained in:
+1
-1
@@ -11305,7 +11305,7 @@ static void ma_device__on_data(ma_device* pDevice, void* pFramesOut, const void*
|
|||||||
{
|
{
|
||||||
float masterVolumeFactor;
|
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->onData) {
|
||||||
if (!pDevice->noPreZeroedOutputBuffer && pFramesOut != NULL) {
|
if (!pDevice->noPreZeroedOutputBuffer && pFramesOut != NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user