openal-soft/al/eax_fx_slots.h
Boris I. Bendovsky d420776808
EAX various fixes (#657)
* [EAX] Fix effect GUID validation

Only NULL and REVERB was valid.

* [EAX] Fix default FX slot flags

EAX4 and EAX5 both sets to ENVIRONMENT.

* [EAX] Set default values for legacy FX slots in the initialization

* [EAX] Fix FX slot locking policy

Fail on attempt to load an effect or change a lock for EAX4 "set" call.
Unlock legacy FX slots on any EAX5 call.

* [EAX] Allow DEFER flag for "get" calls.

* [EAX] Make speaker configuration read-only

* [EAX] Initialize speaker configuration

* [EAX] Commit EAX source on a 3D source parameter call

Reference: EAX 4.0 Programmer's Guide

* [EAX] Commit EAX source on a 3D listener parameter call

Reference: EAX 4.0 Programmer's Guide

* [EAX] Commit source when it begins to play

Reference: EAX 4.0 Programmer's Guide
2022-02-08 08:20:46 -08:00

49 lines
732 B
C++

#ifndef EAX_FX_SLOTS_INCLUDED
#define EAX_FX_SLOTS_INCLUDED
#include <array>
#include "al/auxeffectslot.h"
#include "eax_api.h"
#include "eax_fx_slot_index.h"
class EaxFxSlots
{
public:
void initialize(
ALCcontext& al_context);
void uninitialize() noexcept;
const ALeffectslot& get(
EaxFxSlotIndex index) const;
ALeffectslot& get(
EaxFxSlotIndex index);
void unlock_legacy() noexcept;
private:
using Items = std::array<EaxAlEffectSlotUPtr, EAX_MAX_FXSLOTS>;
Items fx_slots_{};
[[noreturn]]
static void fail(
const char* message);
void initialize_fx_slots(
ALCcontext& al_context);
}; // EaxFxSlots
#endif // !EAX_FX_SLOTS_INCLUDED