Skip to content

Commit

Permalink
Check the propertyset when matching the propertyid
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Sep 13, 2024
1 parent 29c4fdb commit 46df547
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions al/eax/call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ class EaxCallException : public EaxException {

} // namespace

EaxCall::EaxCall(
EaxCallType type,
const GUID& property_set_guid,
ALuint property_id,
ALuint property_source_id,
ALvoid* property_buffer,
ALuint property_size)
EaxCall::EaxCall(EaxCallType type, const GUID &property_set_guid, ALuint property_id,
ALuint property_source_id, ALvoid *property_buffer, ALuint property_size)
: mCallType{type}, mIsDeferred{(property_id & deferred_flag) != 0}
, mPropertyId{property_id & ~deferred_flag}, mPropertySourceId{property_source_id}
, mPropertyBuffer{property_buffer}, mPropertyBufferSize{property_size}
Expand Down Expand Up @@ -145,23 +140,34 @@ EaxCall::EaxCall(
fail("Unsupported property set id.");
}

switch(mPropertyId)
{
case EAXCONTEXT_LASTERROR:
case EAXCONTEXT_SPEAKERCONFIG:
case EAXCONTEXT_EAXSESSION:
case EAXFXSLOT_NONE:
case EAXFXSLOT_ALLPARAMETERS:
case EAXFXSLOT_LOADEFFECT:
case EAXFXSLOT_VOLUME:
case EAXFXSLOT_LOCK:
case EAXFXSLOT_FLAGS:
case EAXFXSLOT_OCCLUSION:
case EAXFXSLOT_OCCLUSIONLFRATIO:
// EAX allow to set "defer" flag on immediate-only properties.
// If we don't clear our flag then "applyAllUpdates" in EAX context won't be called.
mIsDeferred = false;
break;
if(mPropertySetId == EaxCallPropertySetId::context)
{
switch(mPropertyId)
{
case EAXCONTEXT_LASTERROR:
case EAXCONTEXT_SPEAKERCONFIG:
case EAXCONTEXT_EAXSESSION:
// EAX allow to set "defer" flag on immediate-only properties.
// If we don't clear our flag then "applyAllUpdates" in EAX context won't be called.
mIsDeferred = false;
break;
}
}
else if(mPropertySetId == EaxCallPropertySetId::fx_slot)
{
switch(mPropertyId)
{
case EAXFXSLOT_NONE:
case EAXFXSLOT_ALLPARAMETERS:
case EAXFXSLOT_LOADEFFECT:
case EAXFXSLOT_VOLUME:
case EAXFXSLOT_LOCK:
case EAXFXSLOT_FLAGS:
case EAXFXSLOT_OCCLUSION:
case EAXFXSLOT_OCCLUSIONLFRATIO:
mIsDeferred = false;
break;
}
}

if(!mIsDeferred)
Expand Down

0 comments on commit 46df547

Please sign in to comment.