3 #include "fx_slot_index.h"
12 class EaxFxSlotIndexException :
16 explicit EaxFxSlotIndexException(
19 EaxException{"EAX_FX_SLOT_INDEX", message}
22 }; // EaxFxSlotIndexException
28 void EaxFxSlotIndex::set(EaxFxSlotIndexValue index)
30 if(index >= EaxFxSlotIndexValue{EAX_MAX_FXSLOTS})
31 fail("Index out of range.");
36 void EaxFxSlotIndex::set(const GUID &guid)
41 else if (guid == EAX_NULL_GUID)
45 else if (guid == EAXPROPERTYID_EAX40_FXSlot0 || guid == EAXPROPERTYID_EAX50_FXSlot0)
49 else if (guid == EAXPROPERTYID_EAX40_FXSlot1 || guid == EAXPROPERTYID_EAX50_FXSlot1)
53 else if (guid == EAXPROPERTYID_EAX40_FXSlot2 || guid == EAXPROPERTYID_EAX50_FXSlot2)
57 else if (guid == EAXPROPERTYID_EAX40_FXSlot3 || guid == EAXPROPERTYID_EAX50_FXSlot3)
63 fail("Unsupported GUID.");
68 void EaxFxSlotIndex::fail(const char* message)
70 throw EaxFxSlotIndexException{message};