aboutsummaryrefslogtreecommitdiffstats
path: root/al/eax/call.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-03-11 21:48:34 -0800
committerChris Robinson <[email protected]>2023-03-11 21:48:34 -0800
commitc7da1696a4c15910f6b7240ae7cbfc44114bef06 (patch)
tree2a0132222cc5c74c25b5e9e7279541efa24088fc /al/eax/call.cpp
parente7610b90dae0844d8e91c422c4cfbbeffab19c46 (diff)
Rename some class members for styling consistency
Diffstat (limited to 'al/eax/call.cpp')
-rw-r--r--al/eax/call.cpp139
1 files changed, 62 insertions, 77 deletions
diff --git a/al/eax/call.cpp b/al/eax/call.cpp
index f00ab5be..689d5cf1 100644
--- a/al/eax/call.cpp
+++ b/al/eax/call.cpp
@@ -22,12 +22,12 @@ EaxCall::EaxCall(
ALuint property_source_id,
ALvoid* property_buffer,
ALuint property_size)
- : type_{type}, version_{0}, property_set_id_{EaxCallPropertySetId::none}
- , is_deferred_{(property_id & deferred_flag) != 0}
- , property_id_{property_id & ~deferred_flag}, property_source_id_{property_source_id}
- , property_buffer_{property_buffer}, property_size_{property_size}
+ : mCallType{type}, mVersion{0}, mPropertySetId{EaxCallPropertySetId::none}
+ , mIsDeferred{(property_id & deferred_flag) != 0}
+ , mPropertyId{property_id & ~deferred_flag}, mPropertySourceId{property_source_id}
+ , mPropertyBuffer{property_buffer}, mPropertyBufferSize{property_size}
{
- switch (type_)
+ switch(mCallType)
{
case EaxCallType::get:
case EaxCallType::set:
@@ -42,116 +42,111 @@ EaxCall::EaxCall(
}
else if (property_set_guid == EAXPROPERTYID_EAX40_Context)
{
- version_ = 4;
- property_set_id_ = EaxCallPropertySetId::context;
+ mVersion = 4;
+ mPropertySetId = EaxCallPropertySetId::context;
}
else if (property_set_guid == EAXPROPERTYID_EAX50_Context)
{
- version_ = 5;
- property_set_id_ = EaxCallPropertySetId::context;
+ mVersion = 5;
+ mPropertySetId = EaxCallPropertySetId::context;
}
else if (property_set_guid == DSPROPSETID_EAX20_ListenerProperties)
{
- version_ = 2;
- fx_slot_index_ = 0u;
- property_set_id_ = EaxCallPropertySetId::fx_slot_effect;
+ mVersion = 2;
+ mFxSlotIndex = 0u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot_effect;
}
else if (property_set_guid == DSPROPSETID_EAX30_ListenerProperties)
{
- version_ = 3;
- fx_slot_index_ = 0u;
- property_set_id_ = EaxCallPropertySetId::fx_slot_effect;
+ mVersion = 3;
+ mFxSlotIndex = 0u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot_effect;
}
else if (property_set_guid == EAXPROPERTYID_EAX40_FXSlot0)
{
- version_ = 4;
- fx_slot_index_ = 0u;
- property_set_id_ = EaxCallPropertySetId::fx_slot;
+ mVersion = 4;
+ mFxSlotIndex = 0u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot;
}
else if (property_set_guid == EAXPROPERTYID_EAX50_FXSlot0)
{
- version_ = 5;
- fx_slot_index_ = 0u;
- property_set_id_ = EaxCallPropertySetId::fx_slot;
+ mVersion = 5;
+ mFxSlotIndex = 0u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot;
}
else if (property_set_guid == EAXPROPERTYID_EAX40_FXSlot1)
{
- version_ = 4;
- fx_slot_index_ = 1u;
- property_set_id_ = EaxCallPropertySetId::fx_slot;
+ mVersion = 4;
+ mFxSlotIndex = 1u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot;
}
else if (property_set_guid == EAXPROPERTYID_EAX50_FXSlot1)
{
- version_ = 5;
- fx_slot_index_ = 1u;
- property_set_id_ = EaxCallPropertySetId::fx_slot;
+ mVersion = 5;
+ mFxSlotIndex = 1u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot;
}
else if (property_set_guid == EAXPROPERTYID_EAX40_FXSlot2)
{
- version_ = 4;
- fx_slot_index_ = 2u;
- property_set_id_ = EaxCallPropertySetId::fx_slot;
+ mVersion = 4;
+ mFxSlotIndex = 2u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot;
}
else if (property_set_guid == EAXPROPERTYID_EAX50_FXSlot2)
{
- version_ = 5;
- fx_slot_index_ = 2u;
- property_set_id_ = EaxCallPropertySetId::fx_slot;
+ mVersion = 5;
+ mFxSlotIndex = 2u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot;
}
else if (property_set_guid == EAXPROPERTYID_EAX40_FXSlot3)
{
- version_ = 4;
- fx_slot_index_ = 3u;
- property_set_id_ = EaxCallPropertySetId::fx_slot;
+ mVersion = 4;
+ mFxSlotIndex = 3u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot;
}
else if (property_set_guid == EAXPROPERTYID_EAX50_FXSlot3)
{
- version_ = 5;
- fx_slot_index_ = 3u;
- property_set_id_ = EaxCallPropertySetId::fx_slot;
+ mVersion = 5;
+ mFxSlotIndex = 3u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot;
}
else if (property_set_guid == DSPROPSETID_EAX20_BufferProperties)
{
- version_ = 2;
- property_set_id_ = EaxCallPropertySetId::source;
+ mVersion = 2;
+ mPropertySetId = EaxCallPropertySetId::source;
}
else if (property_set_guid == DSPROPSETID_EAX30_BufferProperties)
{
- version_ = 3;
- property_set_id_ = EaxCallPropertySetId::source;
+ mVersion = 3;
+ mPropertySetId = EaxCallPropertySetId::source;
}
else if (property_set_guid == EAXPROPERTYID_EAX40_Source)
{
- version_ = 4;
- property_set_id_ = EaxCallPropertySetId::source;
+ mVersion = 4;
+ mPropertySetId = EaxCallPropertySetId::source;
}
else if (property_set_guid == EAXPROPERTYID_EAX50_Source)
{
- version_ = 5;
- property_set_id_ = EaxCallPropertySetId::source;
+ mVersion = 5;
+ mPropertySetId = EaxCallPropertySetId::source;
}
else if (property_set_guid == DSPROPSETID_EAX_ReverbProperties)
{
- version_ = 1;
- fx_slot_index_ = 0u;
- property_set_id_ = EaxCallPropertySetId::fx_slot_effect;
+ mVersion = 1;
+ mFxSlotIndex = 0u;
+ mPropertySetId = EaxCallPropertySetId::fx_slot_effect;
}
else if (property_set_guid == DSPROPSETID_EAXBUFFER_ReverbProperties)
{
- version_ = 1;
- property_set_id_ = EaxCallPropertySetId::source;
+ mVersion = 1;
+ mPropertySetId = EaxCallPropertySetId::source;
}
else
{
fail("Unsupported property set id.");
}
- if (version_ < 1 || version_ > 5)
- {
- fail("EAX version out of range.");
- }
-
- switch(property_id_)
+ switch(mPropertyId)
{
case EAXCONTEXT_LASTERROR:
case EAXCONTEXT_SPEAKERCONFIG:
@@ -166,39 +161,29 @@ EaxCall::EaxCall(
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.
- is_deferred_ = false;
- break;
- default:
+ mIsDeferred = false;
break;
}
- if(!is_deferred_)
+ if(!mIsDeferred)
{
- if(property_set_id_ != EaxCallPropertySetId::fx_slot && property_id_ != 0)
+ if(mPropertySetId != EaxCallPropertySetId::fx_slot && mPropertyId != 0)
{
- if (property_buffer == nullptr)
- {
+ if(mPropertyBuffer == nullptr)
fail("Null property buffer.");
- }
- if (property_size == 0)
- {
+ if(mPropertyBufferSize == 0)
fail("Empty property.");
- }
}
}
- if(property_set_id_ == EaxCallPropertySetId::source && property_source_id_ == 0)
- {
+ if(mPropertySetId == EaxCallPropertySetId::source && mPropertySourceId == 0)
fail("Null AL source id.");
- }
- if (property_set_id_ == EaxCallPropertySetId::fx_slot)
+ if(mPropertySetId == EaxCallPropertySetId::fx_slot)
{
- if (property_id_ < EAXFXSLOT_NONE)
- {
- property_set_id_ = EaxCallPropertySetId::fx_slot_effect;
- }
+ if(mPropertyId < EAXFXSLOT_NONE)
+ mPropertySetId = EaxCallPropertySetId::fx_slot_effect;
}
}