mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Fix a possible null pointer dereference.
This commit is contained in:
+5
-2
@@ -52305,13 +52305,16 @@ static float ma_calculate_angular_gain(ma_vec3f dirA, ma_vec3f dirB, float coneI
|
||||
|
||||
MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, ma_spatializer_listener* pListener, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)
|
||||
{
|
||||
ma_channel* pChannelMapIn = pSpatializer->pChannelMapIn;
|
||||
ma_channel* pChannelMapOut = pListener->config.pChannelMapOut;
|
||||
ma_channel* pChannelMapIn;
|
||||
ma_channel* pChannelMapOut;
|
||||
|
||||
if (pSpatializer == NULL) {
|
||||
return MA_INVALID_ARGS;
|
||||
}
|
||||
|
||||
pChannelMapIn = pSpatializer->pChannelMapIn;
|
||||
pChannelMapOut = pListener->config.pChannelMapOut;
|
||||
|
||||
/* If we're not spatializing we need to run an optimized path. */
|
||||
if (ma_atomic_load_i32(&pSpatializer->attenuationModel) == ma_attenuation_model_none) {
|
||||
if (ma_spatializer_listener_is_enabled(pListener)) {
|
||||
|
||||
Reference in New Issue
Block a user