From fca4d5c16a677660928e0262df28a3201d9d24ee Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 26 Jun 2021 15:07:24 +1000 Subject: [PATCH] Fix an edge case where async notifications are not getting fired. --- research/miniaudio_engine.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/research/miniaudio_engine.h b/research/miniaudio_engine.h index 04560b7c..bf7feb38 100644 --- a/research/miniaudio_engine.h +++ b/research/miniaudio_engine.h @@ -9333,6 +9333,7 @@ static ma_result ma_resource_manager_process_job__load_data_buffer_node(ma_resou } if (result != MA_SUCCESS) { + /* TODO: Post a log message here. */ goto done; } @@ -9546,7 +9547,8 @@ static ma_result ma_resource_manager_process_job__load_data_buffer(ma_resource_m If the data node is still loading, we need to repost the job and *not* increment the execution pointer (i.e. we need to not fall through to the "done" label). */ - if (ma_resource_manager_data_buffer_node_result(pJob->loadDataBuffer.pDataBuffer->pNode) == MA_BUSY) { + result = ma_resource_manager_data_buffer_node_result(pJob->loadDataBuffer.pDataBuffer->pNode); + if (result == MA_BUSY) { return ma_resource_manager_post_job(pResourceManager, pJob); } @@ -10838,8 +10840,6 @@ MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, } #endif - //Com_Printf("listenerpos = %f %f %f\n", pListener->position.x, pListener->position.y, pListener->position.z); - /* Multiply the lookat matrix by the spatializer position to transform it to listener space. This allows calculations to work based on the sound being relative to the @@ -10860,8 +10860,6 @@ MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, } #endif - //Com_Printf("relativePos = %f %f %f\n", relativePos.x, relativePos.y, relativePos.z); - /* The direction of the sound needs to also be transformed so that it's relative to the rotation of the listener.